stitch-skills README

项目的 README,来自 github.com/google-labs-code/stitch-skills。合并为一个 markdown 文件:README.md。

Stitch Design Skills

A collection of agent skills and plugins for Google Stitch, following the Agent Skills open standard. Compatible with coding agents including Antigravity, Claude Code, Codex, Cursor, GitHub Copilot, and OpenCode.

Prerequisites

These skills require the Stitch MCP server (https://stitch.googleapis.com/mcp).

  1. Create a Stitch API key at stitch.withgoogle.com (Settings → API Keys), or see the Stitch MCP Setup Instructions for OAuth / Google Cloud authentication.
  2. Add the stitch MCP server for your agent below (store API keys in your global/user config or environment variables — never commit keys to git):
Antigravity — ~/.gemini/config/mcp_config.json

Add to ~/.gemini/config/mcp_config.json (global), then verify under Customizations → Installed → MCP Servers (or /mcp in the CLI):

{
  "mcpServers": {
    "stitch": {
      "serverUrl": "https://stitch.googleapis.com/mcp",
      "headers": {
        "X-Goog-Api-Key": "YOUR_STITCH_API_KEY"
      }
    }
  }
}
Claude Code — claude mcp add
claude mcp add --transport http stitch https://stitch.googleapis.com/mcp \
  --header "X-Goog-Api-Key: YOUR_STITCH_API_KEY" \
  --scope user

Verify with claude mcp list or /mcp inside a session.

Codex — ~/.codex/config.toml

Export STITCH_API_KEY in your shell, then add to ~/.codex/config.toml:

[mcp_servers.stitch]
url = "https://stitch.googleapis.com/mcp"

[mcp_servers.stitch.env_http_headers]
X-Goog-Api-Key = "STITCH_API_KEY"

(Alternatively, use [mcp_servers.stitch.http_headers] with a literal key value.)

Cursor — ~/.cursor/mcp.json

Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project, using ${env:STITCH_API_KEY} to avoid committing secrets):

{
  "mcpServers": {
    "stitch": {
      "url": "https://stitch.googleapis.com/mcp",
      "headers": {
        "X-Goog-Api-Key": "${env:STITCH_API_KEY}"
      }
    }
  }
}
OpenCode — opencode.json

Export STITCH_API_KEY in your shell, then add to ~/.config/opencode/opencode.json (global) or project opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "stitch": {
      "type": "remote",
      "url": "https://stitch.googleapis.com/mcp",
      "enabled": true,
      "oauth": false,
      "headers": {
        "X-Goog-Api-Key": "{env:STITCH_API_KEY}"
      }
    }
  }
}
VS Code / GitHub Copilot — .vscode/mcp.json (or user mcp.json)
{
  "servers": {
    "stitch": {
      "type": "http",
      "url": "https://stitch.googleapis.com/mcp",
      "headers": {
        "X-Goog-Api-Key": "${input:stitch_api_key}"
      }
    }
  },
  "inputs": [
    {
      "type": "promptString",
      "id": "stitch_api_key",
      "description": "Google Stitch API Key",
      "password": true
    }
  ]
}

Docs navigation: If a link on stitch.withgoogle.com/docs redirects incorrectly, open the target path under the same host (e.g. https://stitch.withgoogle.com/docs/learn/device-types/).

Quick Start

1. Ask Your Agent to Install (Easiest)

Paste this prompt into your coding agent (Antigravity, Claude Code, Codex, Cursor, GitHub Copilot, OpenCode, etc.):

Install all Stitch Design Skills from https://github.com/google-labs-code/stitch-skills for this coding agent (globally). Read the repository's README.md and use the recommended installation method for my platform, then check whether the Stitch MCP server is configured and guide me if any setup is still needed.

[!TIP] Swap (globally) for (in this workspace only) if you want project-scoped installation, or ask for a specific plugin bundle (stitch-design, stitch-build, or stitch-utilities).

2. Install via CLI

This repository packages 16 skills into 3 skill-only plugins (stitch-design, stitch-build, stitch-utilities). Choose whichever cross-platform installer fits your agent:

Option A — Install skills (npx skills, broadest platform support)
Works across Antigravity, Claude Code, Codex, Cursor, GitHub Copilot, and other Agent Skills–compatible clients:

# Install all 16 Stitch skills (auto-detects your installed agents)
npx skills add google-labs-code/stitch-skills --skill '*'

# Target a specific agent globally (-g) or for the current workspace (omit -g)
npx skills add google-labs-code/stitch-skills --skill '*' -a <agent> -g

# Or install skills selectively via an interactive prompt
npx skills add google-labs-code/stitch-skills

Option B — Install plugin bundles (npx plugins, user scope)
Installs stitch-design, stitch-build, and stitch-utilities as plugins for claude-code, cursor, codex, github-copilot, vscode, grok, and kimi:

# Auto-detect installed targets (installs to user scope)
npx plugins add google-labs-code/stitch-skills

# Or target a specific client explicitly
npx plugins add google-labs-code/stitch-skills --target claude-code
npx plugins add google-labs-code/stitch-skills --target cursor
npx plugins add google-labs-code/stitch-skills --target codex

[!IMPORTANT] Stitch Design Skills often have inter-dependencies (for example, stitch::code-to-design chains stitch::extract-static-html, stitch::extract-design-md, and stitch::upload-to-stitch). If you install selectively, include all required dependencies.

Platform Skills CLI (npx skills -a) Plugins CLI (npx plugins -t) Native / Manual Option
Antigravity antigravity / antigravity-cli — Local agy plugin install / plugins/
Claude Code claude-code claude-code —
Codex codex codex Codex Plugin Marketplace (CLI or UI)
Cursor cursor cursor —
GitHub Copilot / VS Code github-copilot github-copilot / vscode —
OpenCode opencode (see naming note) — Copy into .opencode/skills/ + opencode.json

3. Platform-Specific & Manual Setup

Expand your platform below for native plugin/skill commands or platform-specific caveats:

Antigravity — toggleable plugin bundles (agy plugin or manual)

[!NOTE] npx plugins does not support Antigravity yet. Use npx skills add google-labs-code/stitch-skills --skill '*' -a antigravity -g (or -a antigravity-cli for the CLI) above for a one-command install, or install the three plugin bundles below so you can toggle them under Customizations → Installed.

Clone the repository and install each plugin directory via the Antigravity CLI (syncs automatically with the Antigravity App):

git clone https://github.com/google-labs-code/stitch-skills.git

agy plugin install ./stitch-skills/plugins/stitch-design
agy plugin install ./stitch-skills/plugins/stitch-build
agy plugin install ./stitch-skills/plugins/stitch-utilities

Or copy (or symlink) the plugin directories into ~/.gemini/config/plugins/ (global) or <your-project>/.agents/plugins/ (workspace):

mkdir -p ~/.gemini/config/plugins
cp -R stitch-skills/plugins/stitch-design \
      stitch-skills/plugins/stitch-build \
      stitch-skills/plugins/stitch-utilities \
      ~/.gemini/config/plugins/

Alternatively, register the cloned plugins/ directory without copying by adding it to ~/.gemini/config/plugins.json (global) or .agents/plugins.json (workspace):

{
  "entries": [
    { "path": "/absolute/path/to/stitch-skills/plugins" }
  ]
}

Skills load automatically on the next turn. See the Antigravity Plugins docs for details.

Codex — native plugin marketplace (CLI or UI)

In addition to npx plugins add google-labs-code/stitch-skills --target codex, you can register the Stitch Skills marketplace directly in Codex and install any combination of stitch-design, stitch-build, and stitch-utilities.

Via CLI:

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] The --sparse flags are optional — they limit the checkout to only the listed paths for a faster clone. Omit them to pull the entire repository.

Via the Codex UI:

Navigate to Settings → Plugin Marketplaces → Add and fill in:

Field Value
Source https://github.com/google-labs-code/stitch-skills
Git ref main
Sparse paths (optional) .agents/plugins, plugins/stitch-design, plugins/stitch-build, plugins/stitch-utilities
OpenCode — manual skill copy & naming note

OpenCode does not use npx plugins or the Codex/Claude marketplace layout. Although npx skills ... -a opencode is supported, 8 of the 16 skills use stitch::… names that require manual renaming for OpenCode.

Copy the skill folders you need into .opencode/skills/ (OpenCode also discovers .claude/skills/ and .agents/skills/; see OpenCode skills docs):

mkdir -p .opencode/skills
cp -R plugins/stitch-design/skills/generate-design .opencode/skills/generate-design
# repeat for other skills under plugins/*/skills/

Naming: OpenCode requires skill name frontmatter to be lowercase kebab-case and match the directory name. Skills that use stitch::… names need their name field and folder aligned before OpenCode will load them. Extra frontmatter such as allowed-tools is ignored.

Tool names inside skill instructions may differ from OpenCode builtins (webfetch / bash instead of web_fetch / run_command). Prefer the OpenCode tool names when adapting a skill for OpenCode. For Stitch MCP setup in opencode.json, see Prerequisites.

For all CLI options and detected targets, run npx skills --help, npx plugins --help, or npx plugins targets.

Available Plugins

Design (stitch-design)

Core design workflows for creating, managing, and optimizing designs within Stitch.

Skill Description Prompt Example
stitch::code-to-design Convert frontend code (React, Vue, etc.) to a Stitch Design via HTML extraction + design system + upload "Upload the frontend code at /path/to/dashboard into a Stitch project named 'Dashboard-Migration-2026'."
stitch::generate-design Generate new screens from text or images, edit existing screens, and create design variants · "Make a browse tab for a mobile app for romance and date night ideas."
· "Edit the login screen to add a 'Remember Me' checkbox and change the button color to blue."
· "Generate 3 design variants of the home screen with dark mode and high-density layouts."
stitch::manage-design-system Manage design systems in Stitch — upload DESIGN.md and apply themes to screens "Upload our design system from .stitch/DESIGN.md and apply it to all screens."
stitch::extract-design-md Extract a comprehensive DESIGN.md directly from frontend source code "Scan /src and extract the design system into .stitch/DESIGN.md."
stitch::extract-static-html Extract self-contained static HTML from running web apps, inlining CSS and images "Extract a static HTML snapshot of http://localhost:3000/profile."
stitch::upload-to-stitch Upload local assets (images, mockups, HTML) to a Stitch project "Upload .stitch/landing_page.html to Stitch project projects/987654321."

Build (stitch-build)

Code generation, framework integration, and asset compilation from Stitch designs.

Skill Description Prompt Example
stitch::react-components Convert Stitch screens to React component systems with automated validation and design token consistency · "Convert all screens in Stitch project projects/123 to React components."
· "Sync the app to the last updates of the Stitch project 13039335308618232534."
stitch::react-native Convert Stitch HTML designs to production-ready React Native components with StyleSheet and platform-specific code · "Convert the Stitch design to React Native components with proper theme and navigation."
· "Sync the app to the last updates of the Stitch project 13039335308618232534."
remotion Generate walkthrough videos from Stitch projects using Remotion with smooth transitions and zooming "Generate a walkthrough video of the Stitch project projects/456."
shadcn-ui Expert guidance for integrating and building applications with shadcn/ui components "Set up shadcn/ui and build a data table with sorting and filtering."
react-vite-dashboard Convert Stitch screens to React + Vite dashboards with TanStack Query, DESIGN.md tokens, and Web3 read patterns "Build a DeFi portfolio dashboard from this Stitch screen using our DESIGN.md."

Utilities (stitch-utilities)

Supporting tools for enhancing prompts, generating design specs, and enforcing design standards.

Skill Description Prompt Example
design-md Analyze Stitch projects and generate comprehensive DESIGN.md files in semantic language "Analyze Stitch project projects/123 and generate a DESIGN.md."
enhance-prompt Transform vague UI ideas into polished, Stitch-optimized prompts with UI/UX keywords "Enhance this prompt: 'make a settings page'."
site-md Analyze a project description or site requirements and synthesize a project constitution (SITE.md) for the Stitch Build Loop "Analyze this project brief and create a SITE.md constitution for the Stitch Build Loop."
stitch-loop Generate complete multi-page websites from a single prompt with automated validation "Build a 5-page portfolio website with Stitch."
taste-design Generate DESIGN.md files enforcing premium, anti-generic UI standards "Generate a premium DESIGN.md with strict typography and calibrated colors."

Repository Structure

plugins/
├── stitch-design/          — Core design workflow plugin
│   ├── plugin.json
│   └── skills/
│       ├── code-to-design/
│       ├── generate-design/
│       ├── manage-design-system/
│       ├── extract-design-md/
│       ├── extract-static-html/
│       └── upload-to-stitch/
├── stitch-build/           — Code generation & build plugin
│   ├── plugin.json
│   └── skills/
│       ├── react-components/    — stitch::react-components
│       ├── react-native/
│       ├── react-vite-dashboard/
│       ├── remotion/
│       └── shadcn-ui/
└── stitch-utilities/       — Design utilities & assistants plugin
    ├── plugin.json
    └── skills/
        ├── design-md/
        ├── enhance-prompt/
        ├── site-md/
        ├── stitch-loop/
        └── taste-design/

Each skill follows the Agent Skills standard:

skills/<skill-name>/
├── SKILL.md           — The "Mission Control" for the agent
├── scripts/           — Executable enforcers (Validation & Networking)
├── resources/         — The knowledge base (Checklists & Style Guides)
└── examples/          — The "Gold Standard" syntactically valid references

Adding New Skills

All new skills need to follow the file structure above to implement the Agent Skills open standard.

Great candidates for new skills

This is not an officially supported Google product. This project is not eligible for the Google Open Source Software Vulnerability Rewards Program.

stitch-skills (google-labs-code/stitch-skills)

正在搜索数据库…

这是什么?Stitch Skills 是一个 Agent Skills 技能库,专为配合 Stitch MCP 服务器(谷歌的 AI 设计工具)使用而打造,可让编码智能体生成、编辑和导出 UI 设计,并将其转换为真正的代码。
这是一个技能,还是一组技能和插件?它分为三个插件包:stitch-design、stitch-build 和 stitch-utilities。每个插件包含多个独立技能,这些技能均遵循 Agent Skills 开放标准。
我该如何安装这些技能?在你的编码智能体中添加 Stitch Skills 插件市场(通过命令行 CLI,或在 Codex 中通过 Settings → Plugin Marketplaces 添加),然后安装 stitch-design、stitch-build 和/或 stitch-utilities 插件。OpenCode 则不同,需要手动将技能文件夹复制到 .claude/skills/ 或 .agents/skills/ 中,并在 opencode.json 中添加 Stitch MCP 配置项。
使用这些技能前,我需要先设置 Stitch MCP 服务器吗?需要。只有在 Stitch MCP 服务器已注册并正在运行,且智能体环境中配置了正确的环境变量和凭据后,这些技能才能正常使用。
每个编码智能体中的使用方式都一样吗?不一样。OpenCode 不支持 Codex 和 Claude Code 所用的 npx 插件/插件市场结构,因此技能必须手动安装;技能名称必须改为小写 kebab-case(单词间用短横线连接),以与文件夹名称一致;指令中的部分工具名称(webfetch/bash)也与 OpenCode 的内置工具不同。
什么是 Google Stitch?Stitch 是谷歌的 AI 设计工具。这些技能让编码智能体通过 Stitch MCP 服务器与它交互,从而生成、编辑和管理 UI 界面及设计系统。
stitch-build 插件能对完成的设计做什么?它可以将 Stitch 界面转换为可用于生产环境的 React 或 React Native 组件,集成 shadcn/ui,使用设计令牌构建 React+Vite 仪表板,还能为项目生成 Remotion 演示视频。
我能只安装某一个技能,而不是整个插件包吗?可以,支持选择性安装。但由于技能之间往往相互依赖,选择单个技能时,需要确保包含所有必需的依赖项。
这是谷歌的官方产品吗?不是。README 明确说明,这不是谷歌官方支持的产品,也不符合谷歌开源漏洞奖励计划的参与条件。
大小
0.3 MB
星标
13.4K
时长
10个月
提交 · 90 天