Back to search
stitch-skills-cn
MCP serverGitHub
[中文化] A library of Agent Skills designed to work with the Stitch MCP server. Each skill follows the Agent Skills open standard, for compatibility with coding agents such as Antigravity, Gemini CLI, Claude Code, Cursor.
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Checked today
Badge for your README
Markdown
[](/listings/yangshun2005--stitch-skills-cn)HTML
<a href="/listings/yangshun2005--stitch-skills-cn"><img src="/api/listings/yangshun2005--stitch-skills-cn/badge.svg" alt="findsafeskills safety rating" /></a>Install
i
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
README.md · README · 288 lines
- > **[中文化] stitch-skills**
- >
- > 此项目是 [google-labs-code/stitch-skills](https://github.com/google-labs-code/stitch-skills) 的中文翻译版本。
- > - 原项目 Stars: 11045
- > - 主语言: TypeScript
- > - 许可证: Apache-2.0
- > - 翻译日期: 2026-11-21
- > - 原始 README: [README_en.md](README_en.md)
- >
- > 说明:下方 README 正文为**原项目文档的中文翻译**,力求忠于原文;本页顶部的「中文快速上手」为**面向中文用户的补充导读**(非原文内容),目的是让你不用读完整篇 README 就能先把项目跑起来。
- >
- > 如有翻译不准确之处,欢迎提 Issue 或 PR。
- ---
- ## 🚀 中文快速上手(补充导读,非原文)
- ### 这是什么 / 解决什么问题
- Stitch Design Skills 是 Google Stitch 的一套 agent skills 与插件集合,遵循 Agent Skills 开放标准,可配合 Codex、Antigravity、Gemini CLI、Claude Code、Cursor、OpenCode 等编码 agent 使用。它把「设计稿生成、代码转设计、设计系统管理、设计转 React 组件」等流程封装成可被 agent 调用的技能,解决在 Stitch 中做设计到代码转换时缺少标准化操作入口的问题。
- ### 快速上手(最短路径)
- 1. 先完成 Stitch MCP 的配置:按原文链接(https://stitch.withgoogle.com/docs/mcp/setup/)注册 Stitch MCP server,并设置好相应的环境变量与凭据。原文强调这些技能依赖 Stitch MCP 已配置并在 agent 环境中运行。
- 2. 按你使用的 agent 选择安装方式(推荐插件方式):
- - Codex(CLI):
- ```bash
- codex plugin marketplace add google-labs-code/stitch-skills --ref main \
- --sparse .agents/plugins \
- --sparse plugins/stitch-design \
- --sparse plugins/stitch-build \
- --sparse plugins/stitch-utilities
- ```
- - Claude Code:
- ```bash
- npx plugins add google-labs-code/stitch-skills --scope project --target claude-code
- ```
- - Cursor:
- ```bash
- npx plugins add google-labs-code/stitch-skills --scope workspace --target cursor
- ```
- 3. 注册 marketplace 后,按需安装 `stitch-design`、`stitch-build`、`stitch-utilities` 中的任意组合。
- 4. 若只想装部分技能,可用:
- ```bash
- npx skills add google-labs-code/stitch-skills
- ```
- 原文提醒:这些技能常有相互依赖,选择性安装时需包含所有必需依赖。
- 5. OpenCode 用户需手动安装:把所需技能文件夹复制到 `.opencode/skills/`(例如 `cp -R plugins/stitch-design/skills/generate-design .opencode/skills/generate-design`),并在 `opencode.json` 或 `~/.config/opencode/opencode.json` 中添加 Stitch MCP 远程条目(`url` 填 Stitch MCP 设置流程给出的端点)。
- ### 环境要求
- - 操作系统:原文未说明。
- - 硬件:原文未说明。
- - 依赖:需要配置并运行 Stitch MCP server,并设置相应环境变量与凭据;使用插件安装方式需要能运行 `codex`、`npx` 等命令。
- - 版本要求:原文未说明。
- - 国内网络环境可能需要更换镜像源或加速下载(原文未提及,此为通用提示)。
- ### 常见坑与注意事项
- - 必须先完成 Stitch MCP 配置,否则技能无法正常工作;原文明确这是前置条件。
- - 选择性安装技能时要注意依赖关系,漏装依赖会导致技能不可用。
- - OpenCode 不支持 `npx plugins` / `npx skills` 或 Codex/Claude 的 marketplace 布局,必须手动复制技能并配置 MCP;且技能 `name` 需为小写 kebab-case 并与目录名一致,`stitch::…` 这类命名需改名后才能被加载。
- - 原文提到 Stitch 文档站部分链接可能跳转错误,需在同一 host 下打开目标路径。
- ---
- ---
- # Stitch Design Skills
- 面向 [Google Stitch](https://stitch.withgoogle.com) 的 agent 技能与插件集合,遵循 [Agent Skills](https://agentskills.io) 开放标准。兼容 Codex、Antigravity、Gemini CLI、Claude Code、Cursor 和 OpenCode(手动安装)等编码 agent。
- ## 快速开始
- ### 1. 安装插件(推荐)
- 全局安装完整 Stitch 插件套件的最快方式。
- #### Codex
- 添加 Stitch Skills 市场,然后安装所需插件。
- <details open>
- <summary><strong>通过 CLI</strong>(推荐)</summary>
- ```bash
- codex plugin marketplace add google-labs-code/stitch-skills --ref main \
- --sparse .agents/plugins \
- --sparse plugins/stitch-design \
- --sparse plugins/stitch-build \
- --sparse plugins/stitch-utilities
- ```
- > [!TIP]
- > `--sparse` 标志是可选的——它们将检出范围限制为仅列出的路径,以加快克隆速度。省略它们则拉取整个仓库。
- </details>
- <details>
- <summary><strong>通过 Codex UI</strong></summary>
- 导航至 **Settings → Plugin Marketplaces → Add** 并填写:
- | 字段 | 值 |
- |---|---|
- | **Source** | `https://github.com/google-labs-code/stitch-skills` |
- | **Git ref** | `main` |
- | **Sparse paths** | *(可选)* `.agents/plugins`、`plugins/stitch-design`、`plugins/stitch-build`、`plugins/stitch-utilities` |
- </details>
- 市场注册完成后,可任意组合安装:
- - **`stitch-design`** — 设计相关技能
- - **`stitch-build`** — 构建与组件技能
- - **`stitch-utilities`** — 工具与辅助技能
- #### Claude Code 与 Cursor
- ```bash
- # Claude Code — 安装到当前项目
- npx plugins add google-labs-code/stitch-skills --scope project --target claude-code
- ```
- ```bash
- # Cursor — 安装到当前工作区
- npx plugins add google-labs-code/stitch-skills --scope workspace --target cursor
- ```
- #### OpenCode
- OpenCode **不**使用 `npx plugins` / `npx skills` 或 Codex/Claude 市场布局。
- 需手动安装技能和 Stitch MCP 服务器:
- **1. 技能** — 将所需技能文件夹复制到可发现路径:
- ```bash
- # 项目本地(推荐)
- mkdir -p .opencode/skills
- cp -R plugins/stitch-design/skills/generate-design .opencode/skills/generate-design
- # 对 plugins/*/skills/ 下的其他技能重复此操作
- ```
- OpenCode 也会发现 `.claude/skills/` 和 `.agents/skills/`(参见 [OpenCode 技能文档](https://opencode.ai/docs/skills/))。
- > **命名:** OpenCode 要求技能 frontmatter 中的 `name` 为小写 kebab-case 且与目录名一致。使用 `stitch::…` 名称(或其他非 kebab 形式)的技能需先重命名 `name` 字段和文件夹,OpenCode 才能加载。`allowed-tools` 等额外 frontmatter 会被忽略。
- **2. Stitch MCP** — 完成 [Stitch MCP 设置](https://stitch.withgoogle.com/docs/mcp/setup/)后,在项目 `opencode.json` 或 `~/.config/opencode/opencode.json` 中添加远程 MCP 条目:
- ```json
- {
- "$schema": "https://opencode.ai/config.json",
- "mcp": {
- "stitch": {
- "type": "remote",
- "url": "YOUR_STITCH_MCP_URL",
- "enabled": true
- }
- }
- }
- ```
- 将 `YOUR_STITCH_MCP_URL` 替换为 Stitch MCP 设置流程中的端点(该指南中的凭据/环境变量仍然适用)。
- 技能说明中的工具名称可能与 OpenCode 内置工具不同(`webfetch` / `bash` 而非 `web_fetch` / `run_command`)。为 OpenCode 适配技能时,优先使用 OpenCode 工具名称。
- ### 2. 选择性安装技能
- 仅选择所需的特定技能。
- > [!IMPORTANT]
- > Stitch Design Skills 常有相互依赖。若选择性地安装技能,请确保包含所有必需的依赖。
- ```bash
- npx skills add google-labs-code/stitch-skills
- ```
- 可运行以下命令查看插件和技能的帮助文档:
- ```bash
- npx plugins --help
- npx skills --help
- ```
- ## 前置条件
- 这些技能需要在 agent 环境中配置并运行 **Stitch MCP** 服务器。请确保已遵循 [Stitch MCP 设置说明](https://stitch.withgoogle.com/docs/mcp/setup/)注册服务器并设置相应的环境变量和凭据。
- > **文档导航:** 若 [stitch.withgoogle.com/docs](https://stitch.withgoogle.com/docs/) 上的链接重定向错误,请在同一主机下打开目标路径(例如 `https://stitch.withgoogle.com/docs/learn/device-types/`)。
- ## 可用插件
- ### 设计(`stitch-design`)
- 在 Stitch 中创建、管理和优化设计的核心设计工作流。
- | 技能 | 描述 | 提示示例 |
- |---|---|---|
- | [stitch::code-to-design](plugins/stitch-design/skills/code-to-design/) | 通过 HTML 提取 + 设计系统 + 上传,将前端代码(React、Vue 等)转换为 Stitch Design | *"将 `/path/to/dashboard` 的前端代码上传到名为 'Dashboard-Migration-2026' 的 Stitch 项目。"* |
- | [stitch::generate-design](plugins/stitch-design/skills/generate-design/) | 从文本或图片生成新屏幕、编辑现有屏幕并创建设计变体 | · *"为一个关于浪漫和约会之夜点子的移动应用制作一个浏览标签页。"*<br>· *"编辑登录屏幕,添加 'Remember Me' 复选框并将按钮颜色改为蓝色。"*<br>· *"生成 3 个主屏幕的设计变体,采用深色模式和高密度布局。"* |
- | [stitch::manage-design-system](plugins/stitch-design/skills/manage-design-system/) | 管理 Stitch 中的设计系统——上传 DESIGN.md 并将主题应用到屏幕 | *"从 `.stitch/DESIGN.md` 上传我们的设计系统并应用到所有屏幕。"* |
- | [stitch::extract-design-md](plugins/stitch-design/skills/extract-design-md/) | 直接从前端源代码提取完整的 DESIGN.md | *"扫描 `/src` 并将设计系统提取到 `.stitch/DESIGN.md`。"* |
- | [stitch::extract-static-html](plugins/stitch-design/skills/extract-static-html/) | 从运行中的 Web 应用提取自包含的静态 HTML,内联 CSS 和图片 | *"提取 `http://localhost:3000/profile` 的静态 HTML 快照。"* |
- | [stitch::upload-to-stitch](plugins/stitch-design/skills/upload-to-stitch/) | 将本地资源(图片、模型图、HTML)上传到 Stitch 项目 | *"将 `.stitch/landing_page.html` 上传到 Stitch 项目 `projects/987654321`。"* |
- ---
- ### 构建(`stitch-build`)
- 从 Stitch 设计进行代码生成、框架集成和资源编译。
- | 技能 | 描述 | 提示示例 |
- |---|---|---|
- | [stitch::react-components](plugins/stitch-build/skills/react-components/) | 将 Stitch 屏幕转换为 React 组件系统,带自动验证和设计令牌一致性 | · *"将 Stitch 项目 `projects/123` 中的所有屏幕转换为 React 组件。"*<br>· *"将应用同步到 Stitch 项目 `13039335308618232534` 的最新更新。"* |
- | [stitch::react-native](plugins/stitch-build/skills/react-native/) | 将 Stitch HTML 设计转换为生产就绪的 React Native 组件,带 StyleSheet 和平台特定代码 | · *"将 Stitch 设计转换为具有适当主题和导航的 React Native 组件。"*<br>· *"将应用同步到 Stitch 项目 `13039335308618232534` 的最新更新。"* |
- | [remotion](plugins/stitch-build/skills/remotion/) | 使用 Remotion 从 Stitch 项目生成带平滑过渡和缩放的演示视频 | *"生成 Stitch 项目 `projects/456` 的演示视频。"* |
- | [shadcn-ui](plugins/stitch-build/skills/shadcn-ui/) | 使用 shadcn/ui 组件集成和构建应用的专业指导 | *"设置 shadcn/ui 并构建一个带排序和筛选的数据表。"* |
- | [react-vite-dashboard](plugins/stitch-build/skills/react-vite-dashboard/) | 将 Stitch 屏幕转换为 React + Vite 仪表板,带 TanStack Query、DESIGN.md 令牌和 Web3 读取模式 | *"使用我们的 DESIGN.md 从此 Stitch 屏幕构建一个 DeFi 投资组合仪表板。"* |
- ---
- ### 工具(`stitch-utilities`)
- 用于增强提示、生成设计规范和强制执行设计标准的辅助工具。
- | 技能 | 描述 | 提示示例 |
- |---|---|---|
- | [design-md](plugins/stitch-utilities/skills/design-md/) | 分析 Stitch 项目并以语义语言生成完整的 DESIGN.md 文件 | *"分析 Stitch 项目 `projects/123` 并生成 DESIGN.md。"* |
- | [enhance-prompt](plugins/stitch-utilities/skills/enhance-prompt/) | 将模糊的 UI 想法转化为精炼的、Stitch 优化的提示,带 UI/UX 关键词 | *"增强此提示:'make a settings page'。"* |
- | [site-md](plugins/stitch-utilities/skills/site-md/) | 分析项目描述或站点需求,为 Stitch Build Loop 合成项目章程(SITE.md) | *"分析此项目简报并为 Stitch Build Loop 创建 SITE.md 章程。"* |
- | [stitch-loop](plugins/stitch-utilities/skills/stitch-loop/) | 从单个提示生成完整的多页面网站,带自动验证 | *"使用 Stitch 构建一个 5 页的作品集网站。"* |
- | [taste-design](plugins/stitch-utilities/skills/taste-design/) | 生成强制执行高级、反通用 UI 标准的 DESIGN.md 文件 | *"生成一个带严格排版和校准颜色的高级 DESIGN.md。"* |
- ## 仓库结构
- ```text
- plugins/
- ├── stitch-design/ — 核心设计工作流插件
- │ ├── plugin.json
- │ └── skills/
- │ ├── code-to-design/
- │ ├── generate-design/
- │ ├── manage-design-system/
- │ ├── extract-design-md/
- │ ├── extract-static-html/
- │ └── upload-to-stitch/
- ├── stitch-build/ — 代码生成与构建插件
- │ ├── plugin.json
- │ └── skills/
- │ ├── react-components/ — stitch::react-components
- │ ├── react-native/
- │ ├── react-vite-dashboard/
- │ ├── remotion/
- │ └── shadcn-ui/
- └── stitch-utilities/ — 设计工具与助手插件
- ├── plugin.json
- └── skills/
- ├── design-md/
- ├── enhance-prompt/
- ├── site-md/
- ├── stitch-loop/
- └── taste-design/
- ```
- 每个技能遵循 Agent Skills 标准:
- ```text
- skills/<skill-name>/
- ├── SKILL.md — agent 的"任务控制中心"
- ├── scripts/ — 可执行执行器(验证与网络)
- ├── resources/ — 知识库(检查清单与风格指南)
- └── examples/ — "黄金标准"语法有效参考
- ```
- ## 添加新技能
- 所有新技能需遵循上述文件结构以实现 Agent Skills 开放标准。
- ### 新技能的优秀候选
- * **验证**:将 Stitch HTML 转换为其他 UI 框架并验证语法的技能。
- * **解耦数据**:将静态设计内容转换为外部模拟数据文件的技能。
- * **生成设计**:从给定数据集在 Stitch 中生成新设计屏幕的技能。
- 这不是 Google 官方支持的产品。本项目不符合 [Google 开源软件漏洞奖励计划](https://bughunters.google.com/open-source-security)的资格。
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.