一键导入
stitch-design
Automate high-fidelity UI prototyping with Google Stitch MCP. Use when the user needs to generate, iterate, or refine UI screens via Stitch prompts.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Automate high-fidelity UI prototyping with Google Stitch MCP. Use when the user needs to generate, iterate, or refine UI screens via Stitch prompts.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | stitch-design |
| description | Automate high-fidelity UI prototyping with Google Stitch MCP. Use when the user needs to generate, iterate, or refine UI screens via Stitch prompts. |
Automate high-fidelity UI prototype generation using Google Stitch via MCP tools. This skill covers prompt engineering, generation, evaluation, iteration, multi-page consistency, and asset delivery.
Stitch MCP Server must be available. Verify with:
# Claude Code: check MCP tool availability
# Confirm tools: generate_screen_from_text, get_screen, edit_screens, generate_variants, list_screens
If unavailable, guide user to configure MCP in their Claude Code settings or ~/.claude/settings.json.
Identify: target platform, page type, visual style, core components, color palette, typography, constraints.
Follow these principles strictly -- they are derived from official Stitch team guidance and battle-tested community patterns:
| Rule | Detail |
|---|---|
| Broad first, detail later | Start with a high-level concept to explore direction, then drill into per-screen details |
| Global style first | Define colors / fonts / vibe BEFORE specific elements |
| Single change per prompt | Each prompt modifies ONE dimension only |
| Visual precision | Use Hex codes (#FFF8F0), material adjectives (soft glow shadow, warm off-white) |
| Reserved zones | Explicitly mention system UI areas (WeChat capsule, iOS status bar, Android nav bar) |
| Plain text preferred | Official recommendation: use natural language, NOT XML/JSON structures |
| Adjectives set the vibe | Words like vibrant, minimalist, brutalist directly influence color/font/image choices |
| Reference by name | Always specify page name + component name + position (e.g. "primary button on sign-up form") |
Assemble requirements into this format:
Platform: [iOS / Android / Web / WeChat Mini Program]
Screen: [page name]
Style: [visual style keywords + adjectives]
Layout: [layout description]
Components: [component list with positions]
Colors: [primary #HEX, secondary #HEX, background #HEX]
Typography: [font suggestions]
Constraints: [reserved areas / special limits]
Example -- recipe sharing app detail page:
Platform: iOS (iPhone 15 Pro, 393x852)
Screen: Recipe Detail
Style: Warm editorial, clean white background, food photography focus
Layout: Full-screen hero image at top, scrollable content below
Components:
- Top: full-width hero image of the dish (16:9 ratio)
- Below image: recipe title (large serif), author avatar + name, rating stars
- Info row: prep time / cook time / servings as icon + label pairs
- Bottom: floating "Start Cooking" button, full-width
Colors: primary #E85D3A, secondary #F4A261, background #FEFCFB
Typography: Playfair Display for titles, Inter for body
Constraints: iOS status bar reserved, bottom safe area for home indicator
# Use MCP tool
result = generate_screen_from_text(
projectId="<project_id>",
prompt="<assembled prompt>",
deviceType="MOBILE" # or DESKTOP / TABLET
)
# Record: projectId, screenId from result
If output_components contains suggestions, present them to user for selection before proceeding.
Retrieve the screen and assess on these dimensions:
screen = get_screen(
name="projects/<pid>/screens/<sid>",
projectId="<pid>",
screenId="<sid>"
)
| Dimension | Check |
|---|---|
| Layout | Spacing, alignment, visual hierarchy clear? |
| Color consistency | Matches specified palette? |
| Component completeness | All requested UI components present? |
| Platform fit | System UI areas unobstructed? |
| Overall quality | Feels high-fidelity, not wireframe-level? |
If evaluation fails on any dimension:
edit_screens:edit_screens(
projectId="<pid>",
selectedScreenIds=["<sid>"],
prompt="<targeted fix prompt>"
)
Once satisfied:
design/ directory# List all screens in project for reference
screens = list_screens(projectId="<pid>")
When generating multiple pages for the same app:
Using the design context from the Home Screen, generate a [PageName] screen
with the same color palette (#FF8C42 primary, #FFF8F0 background),
typography, and component styling...
When user is exploring direction:
generate_screen_from_textgenerate_variants(
projectId="<pid>",
selectedScreenIds=["<sid>"],
prompt="Generate 3 style variants",
variantOptions={
"numVariants": 3,
"creativeRange": "HIGH",
"focusAspects": ["color_palette", "layout"]
}
)
When cross-page component styles diverge:
Redesign the [component] on this page to exactly match [Page X]:
[describe the exact style -- colors, shapes, borders, shadows]
Example:
Redesign the slider on this page to exactly match Screen 2:
solid amber fill blob, white circular thumb with warm amber border,
no center track line.
Change all UI text to Simplified Chinese:
- "Searching..." -> "正在搜索..."
- "Connect" -> "连接"
- "Settings" -> "设置"
- "Intensity" -> "强度"
Stitch can modify images within generated screens. Key techniques:
Target all images of a type at once:
Change background of all product images on the landing page to light taupe.
Reference by person, position, or label:
On the Team page, the image of "Dr. Carter (Lead Dentist)": update her lab coat to black.
When changing theme, explicitly ask images to follow:
Update theme to light orange. Ensure all images and illustrative icons
match this new color scheme.
For hero/background images, give photographic direction:
Music player page for "Suburban Legends." Album art is a macro, zoomed-in
photo of ocean water. Page background and imagery should reflect this.
Precise typography and border control techniques:
Use a playful sans-serif font for all body text.
Change all headings to a bold serif font.
Make all buttons have fully rounded corners (pill shape).
Give all input fields a 2px solid black border with 8px border-radius.
Apply font + color + border in a single themed prompt:
Book discovery app: use a serif font for all text, light green (#A8D5BA)
as brand accent color, rounded pill buttons, and subtle card shadows.
For complex screens, use an AI (Gemini / ChatGPT / Claude) to transform a simple user idea into a structured Stitch prompt before sending it.
"A dashboard for marathon runners"Use this meta-prompt to generate Stitch prompts:
You are a Stitch Prompt Engineer. Given a brief app idea,
generate a detailed Stitch prompt using this structure:
Platform: [detect from context or default to iOS]
Screen: [infer the most important page]
Style: [pick 3-4 visual adjectives that match the domain]
Layout: [describe spatial organization]
Components: [list 5-8 specific UI elements with positions]
Colors: [generate a harmonious 3-color palette with hex codes]
Typography: [suggest appropriate font pairing]
Constraints: [platform-specific reserved areas]
User idea: "{{user_input}}"
| Tip | Source |
|---|---|
| Decompose complex pages into sequential prompts (structure -> filters -> alignment) | tempo (factory dashboard case) |
| Screenshot after every successful step -- Stitch may reset designs | tempo |
| Use ChatGPT/Gemini to pre-generate structured component-block prompts for reuse | John Kenny |
| For mobile: ultra-detailed first prompt (~5000 chars) gets ~60% match, then micro-tune | Hoang Anh Huynh |
| Stitch experimental mode is more accurate than standard mode | Yusouph Sadick |
| Use Annotate feature for same-screen iteration (official recommendation) | Stitch team (Vincent, Rishabh) |
| Failure | Workaround |
|---|---|
| Edit completely rebuilds layout | Decompose: do structure first, then style, then details |
| Cross-page styles inconsistent | Use Consistency Patch with explicit style description |
| Small detail edits (checkbox, alignment) don't work | Known Stitch limitation; note for user and suggest manual CSS fix |
| Prompt too vague, result off-target | Add visual precision: hex colors, material adjectives, exact positions |