跳到主内容
智客 ZICQ

技能库 智客分类:设计创意 react-vite-dashboard

React Vite Dashboard

将 Stitch 设计转换为生产 使用 TanStack Query 的回放 + Vite 仪表板, DESIGN.md 的可访问符, 和 Web3 的已备图案(ethers/viem).

3242 安装量

官方网址:skills.sh

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

将 Stitch 设计转换为生产 使用 TanStack Query 的回放 + Vite 仪表板, DESIGN.md 的可访问符, 和 Web3 的已备图案(ethers/viem).

何时用

官方 description 未单独写出 Use when。按规范,代理会在用户任务与这段 description 的关键词匹配时激活本技能。

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:Stitch to React + Vite Dashboard、Prerequisites、Workflow、HTML → React mapping、DESIGN.md integration、Web3 dashboard conventions。 其中含规范建议的小节:分步指令。

文件分析

文件分析:这是一份仅含 SKILL.md 的指令型技能,代理激活后整份正文进入上下文。

官方 description(原文)

Convert Stitch designs into production React + Vite dashboards with TanStack Query, accessible tokens from DESIGN.md, and Web3-ready patterns (ethers/viem).

Stitch to React + Vite DashboardPrerequisitesWorkflowHTML → React mappingDESIGN.md integrationWeb3 dashboard conventionsFile structureQuality checklistStitch docs note

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
name
react-vite-dashboard
description
Convert Stitch designs into production React + Vite dashboards with TanStack Query, accessible tokens from DESIGN.md, and Web3-ready patterns (ethers/viem).
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「react-vite-dashboard」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-20ebc87de7c87464-%E5%8F%8D%E5%B0%84-Vite-%E5%89%AA%E8%B4%B4%E6%9D%BF.html
请存为 .cursor/skills/react-vite-dashboard/SKILL.md 或 .claude/skills/react-vite-dashboard/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/google-labs-code/stitch-skills' --list

npx skills add 'https://github.com/google-labs-code/stitch-skills' --skill 'react-vite-dashboard'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版
--- name: react-vite-dashboard description: Convert Stitch designs into production React + Vite dashboards with TanStack Query, accessible tokens from DESIGN.md, and Web3-ready patterns (ethers/viem). allowed-tools: - "stitch*:*" - "Read" - "Write" - "Bash" - "web_fetch" --- # Stitch to React + Vite Dashboard You are a frontend engineer building **data-dense dashboards** from Stitch screens. Target stack: **React 18**, **Vite**, **TypeScript**, **TanStack Query**, **React Router**, and optional **ethers v6** or **viem** for on-chain reads. ## Prerequisites - Stitch MCP configured ([setup guide](https://stitch.withgoogle.com/docs/mcp/setup/)) - A project `DESIGN.md` (see the `design-md` skill) for token fidelity - Vite + React + TypeScript scaffold (`npm create vite@latest`) ## Workflow 1. **Discover MCP prefix** — run `list_tools`, note the Stitch prefix (e.g. `stitch:`). 2. **Fetch screen** — `[prefix]:get_screen` with project and screen IDs. 3. **Download assets** — persist HTML/screenshot under `.stitch/designs/{screen}.html` and `.png`. 4. **Read DESIGN.md** — map `colors.*`, `typography.*`, `spacing.*` to CSS variables in `src/index.css`. 5. **Generate components** — split into `src/components/`, `src/pages/`, `src/hooks/`. 6. **Wire data** — use TanStack Query for async fetches; keep presentational components pure. ## HTML → React mapping | Pattern | Implementation | |---------|----------------| | Layout grid / flex | Tailwind utilities or CSS modules aligned to DESIGN.md spacing tokens | | Cards / panels | `
` with tokenized border-radius and elevation fallbacks for forced-colors | | Tables | Semantic `` or TanStack Table; never div-only grids for tabular data | | Buttons | `` with visible focus ring (preserve browser default unless DESIGN.md defines focus tokens) | | Forms | `` + ``; associate errors with `aria-describedby` | | Loading | Skeleton components; `aria-busy` on containers during fetch | | Wallet connect | Isolate in `WalletProvider`; never embed private keys in generated code | ## DESIGN.md integration ```css /* src/index.css — example token bridge */ :root { --color-primary: /* from DESIGN.md colors.primary */; --font-body: /* typography.body-md.fontFamily */; } ``` Run the design.md linter locally before shipping UI: ```bash npx @google/design.md lint DESIGN.md ``` ## Web3 dashboard conventions - Read-only contract calls via `useReadContract` (viem/wagmi) or ethers `Contract` + TanStack Query `queryFn`. - Format token amounts with `formatUnits`; show network name and chain ID in settings footer. - Surface transaction errors in plain language; link to block explorer when `txHash` exists. - Gas-sensitive flows: batch reads, avoid redundant `eth_call` in render loops. ## File structure ``` src/ ├── components/ # Presentational UI from Stitch ├── pages/ # Route-level screens ├── hooks/ # useQuery wrappers, wallet hooks ├── lib/ # ABI helpers, formatters └── styles/ # Token CSS variables ``` ## Quality checklist - [ ] WCAG 2.2 AA: contrast from DESIGN.md component pairs passes linter - [ ] Keyboard navigable: focus order matches visual order - [ ] Responsive: test at 375px and 1280px widths - [ ] No secrets in repo: RPC URLs from env (`VITE_*` prefix only for public endpoints) - [ ] TypeScript strict: no `any` on contract ABIs ## Stitch docs note When following links on [stitch.withgoogle.com/docs](https://stitch.withgoogle.com/docs/), use the full `https://stitch.withgoogle.com/docs/...` URL if relative navigation redirects incorrectly.

相关技能

设计创意

Automation Workflows

设计和实施自动化工作流程,以节省时间和规模化操作作为独家. 用于识别重复任务实现自动化,构建跨工具的工作流程,设置触发器和行动,或优化现有自动化. 包括自动化机会识别,工作流程设计,工具选择(Zapier,Make,n8n),测试,和维护. 触发"自动","自动","工作流程自动…

设计创意

Ui Ux Pro Max

UI/UX设计智能及建筑抛光接口实施指导. 当用户要求UI设计,UX流量,信息架构,视觉风格方向,设计系统/托盘,组件规格,副本/显微镜,可访问性,或生成/critique/refine前端UI(HTML/CSS/JS,React,Next.js,Vue,Svelte,Tailw…

设计创意

Frontend Design

创建美丽现代UI的专家前端设计指南. 在构建起落架页面,仪表板,或任何用户界面时使用.

设计创意

N8n Workflow Automation

设计和输出 n8n 工作流程 JSON 有强力触发器, idempotency, 错误处理, 记录, 重试, 以及 人入"一站"审查队列. 当您需要可审计的自动化时使用.