stitch-design-projects
БесплатноЗапускает вложенные скриптыНе проверенBuild or recreate UI screens in Google Stitch via MCP.
от jiayaoqijia★ 81 звезда на GitHubОб этом скилле
Stitch design projects
When to use
Use when the user wants a UI built or recreated in Google Stitch: "bikin di Stitch", "recreate Figma ini di Stitch", "kasih link project Stitch". Not for building a web app — Stitch is a design tool; the deliverable is a project of screens the user can open and edit.
Access
Stitch is reached over MCP at https://stitch.googleapis.com/mcp with an API key in
X-Goog-Api-Key. The key lives in ~/.hermes/secrets/stitch_api_key (mode 600). Register it in
~/.hermes/.env as STITCH_API_KEY and reference ${STITCH_API_KEY} in the mcp_servers: block of
config.yaml; never print the key back to chat.
An MCP server added to config mid-session is not registered as a tool until the gateway
restarts. Do not conclude the capability is missing: call the endpoint directly with JSON-RPC
(scripts/stitch_rpc.py) while the config change waits for a restart.
Procedure
- Create the project and hand the user the link immediately — that is usually the real question.
create_project {title}returnsname: projects/<id>; the URL ishttps://stitch.withgoogle.com/projects/<id>. - Seed the design system with
upload_design_md {projectId, designMdBase64}. Write DESIGN.md with the user's tokens first (seedesign-md); Stitch uses it as the source of truth for type, color and radius. It returns a screen instance used as the preview. - Create each screen with
generate_screen_from_text {projectId, prompt, deviceType: MOBILE}. There is no import-a-screen call: a screen must exist before it can be updated. Reuse an existingdesignSystemasset id on later calls so the model does not drift. - Overwrite the HTML with
update_screenand push the screenshot in the same call.update_screen {name, htmlCodeBase64, screenshotBase64, updateMask:["html_code","screenshot"]}. HTML alone is not enough: the project keeps showing the generated preview untilscreenshotBase64replaces it, which reads to the user as "bedanya design" — the screen visibly does not match. Render your own HTML to PNG at the frame size first (headless Chromium, scale 2), push both, then re-download the screen screenshot and compare hashes: equal hash = the user sees your design. Encode the HTML base64 (UTF-8) and keep one self-contained document per screen: inline CSS, no external fonts beyond a Google Fonts link, no local file paths. - Verify each screen with
download_fileon the screen'sscreenshot.name(or open the project URL) before moving on. A 200 fromupdate_screenis not a rendered screen. The file is JSON with a base64dataString, not a raw PNG — decode before viewing or the image reader rejects it. - Batch. One screen per call is the norm; report progress per batch rather than promising all of them at once. Keep the generated HTML in a working dir so a failed push can be retried without regenerating.
Figma as the source
See references/figma-to-stitch.md for the extraction recipe (tokens, frames, PNG export, the
rasterized-text trap) and the fidelity order that survives review.
Numbered rules that came from real attempts
create_design_system_from_design_mdis not guaranteed byprojectId+deviceTypealone — a call with only those returnedRequest contains an invalid argument. Read its full input schema (tools/list), checklist_design_systemsafterwards, and treat theupload_design_mdstep as the part that definitely lands.- Frame size is a hard constraint. Set the HTML body to the user's frame (e.g. 390×844) and let content overflow vertically; do not let the document grow wider or Stitch shows a shrunken page.
- Every interactive control needs its states drawn, not just the happy path: checkbox checked and unchecked, switch on/off, radio selected/unselected, button default/pressed/disabled/loading, field empty/filled/focus/error/disabled, badges success/pending/failed. The user asks for this explicitly because their Figma usually stops at the default state.
- Copy comes from the design, not from imagination. Recreating a screen means the same strings, same numbers, same labels. If a label is unreadable, say so instead of inventing plausible text.
- No device chrome. Do not draw the phone status bar (time, signal, battery) or the home indicator: the screen starts at the app header. Do's standing rule for every mockup.
- Never publish or share a Stitch project without being asked. Default visibility is private; leave it that way.
Verification
- Project exists and is owned by the user:
get_project {name: "projects/<id>"}→sharingSettingsshows their email asOWNER. - Screen count grows as batches land:
list_screens {projectId}. - The pushed HTML round-trips:
download_filethehtml_codefile and diff the first lines against what you sent. - Screenshot, not JSON, is the proof the design looks right.
Установить stitch-design-projects в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл stitch-design-projects?
Build or recreate UI screens in Google Stitch via MCP.
Как установить скилл stitch-design-projects?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл stitch-design-projects запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic