.agents/skills/stitch-ui-design/SKILL.md
Knowledge on how to use Stitch MCP to generate high-fidelity UI designs from textual wireframes, extract production-ready code, and manage design systems. Integrates with UX Concept and Design System workflows.
npx skillsauth add JoelBonito/gestion-chs stitch-ui-designInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Purpose: Generate high-fidelity visual mockups using Google Stitch MCP, bridging the gap between textual wireframes (Phase 3) and design system creation (Phase 7). Core Principle: Wireframes define WHAT; Stitch visualizes HOW it looks. Never generate without reading the UX Concept first.
Read REQUIRED files always, OPTIONAL only when needed:
| File | Status | When to Read | |------|--------|--------------| | prompt-engineering.md | REQUIRED | Always read before generating any screen | | wireframe-to-prompt.md | REQUIRED | When converting UX Concept wireframes to Stitch prompts | | design-system-integration.md | Optional | When extracting design tokens or syncing Stitch Design Systems | | validation-checklist.md | Optional | When validating generated screens before delivery | | code-handoff.md | Optional | When extracting code from approved mockups for implementation |
prompt-engineering.md + wireframe-to-prompt.md = ALWAYS READ. Others = only when relevant.
| Tool | Purpose | When to Use |
|------|---------|-------------|
| mcp__stitch__create_project | Create a new Stitch project container | Start of a new project or design session |
| mcp__stitch__list_projects | List all accessible projects | Find existing project to reuse |
| mcp__stitch__get_project | Get project details by name | Verify project exists and retrieve metadata |
| Tool | Purpose | When to Use |
|------|---------|-------------|
| mcp__stitch__generate_screen_from_text | Generate a screen from a text prompt | Core generation tool — produce visual mockups |
| mcp__stitch__generate_variants | Generate design variants of an existing screen | Explore alternative designs for stakeholder review |
| mcp__stitch__list_screens | List all screens in a project | Inventory existing screens before generating new ones |
| mcp__stitch__get_screen | Get screen details and output | Review a generated screen, check for suggestions |
| mcp__stitch__fetch_screen_image | Download the generated screen image | Save mockup PNG for offline reference or documentation |
| mcp__stitch__fetch_screen_code | Extract the generated HTML/React code | CRITICAL — Get production-ready code from mockups |
| mcp__stitch__edit_screens | Edit/refine an existing screen | Iterate on a screen without regenerating from scratch |
| Tool | Purpose | When to Use |
|------|---------|-------------|
| mcp__stitch__create_design_system | Create a design system in Stitch | After Design System doc is defined (Phase 7) |
| mcp__stitch__list_design_systems | List available design systems | Check for reusable DS before creating a new one |
| mcp__stitch__apply_design_system | Apply a design system to screens | Enforce visual consistency across all mockups |
| mcp__stitch__update_design_system | Update an existing design system | When design tokens change and DS needs sync |
generate_screen_from_text:
projectId (required): Project ID (numeric string)prompt (required): Detailed description of the screen to generatedeviceType (optional): MOBILE (default) or DESKTOPmodelId (optional): GEMINI_3_FLASH (default, faster) or GEMINI_3_PRO (higher quality)fetch_screen_code:
projectId (required): Project IDscreenId (required): Screen ID from the generated screenfetch_screen_image:
projectId (required): Project IDscreenId (required): Screen ID from the generated screenedit_screens:
projectId (required): Project IDscreenId (required): Screen ID to editprompt (required): Description of changes to applygenerate_variants:
projectId (required): Project IDscreenId (required): Screen ID to create variants fromcreate_design_system:
projectId (required): Project IDname (required): Design system namedescription (optional): Description of the design systemapply_design_system:
projectId (required): Project IDdesignSystemId (required): Design system ID to applyscreenId (required): Screen to apply the design system toGEMINI_3_PRO for key screens (Dashboard, Landing, Onboarding). GEMINI_3_FLASH for secondary screens (Settings, Lists).
Read docs/01-Planejamento/03-ux-concept.md (fallback: docs/planning/03-ux-concept.md). Extract:
Read docs/01-Planejamento/01-product-brief.md (fallback: docs/planning/01-product-brief.md). Extract:
1. Call list_projects to check for existing project
2. If none found: call create_project with project title
3. Record the project ID for all subsequent operations
Load wireframe-to-prompt.md and follow the 7-step algorithm for each screen.
For each screen from the UX Concept:
Load validation-checklist.md and verify all generated screens.
Create the output document with all screen IDs, project ID, and coverage mapping.
This step is the difference between 30 minutes and 3 hours of implementation work. Stitch generates production-ready HTML/React code alongside every mockup. Skipping this step means rewriting from scratch what already exists.
After screens are approved by the user:
mkdir -p docs/01-Planejamento/03.5-visual-mockups/generated-code
fetch_screen_code(projectId, screenId)generated-code/{screenName}-{deviceType}.html
generated-code/dashboard-mobile.html, generated-code/login-desktop.htmlcode-handoff.md for the protocol on converting this code to React components## Generated Code
| Screen | Device | Code File | Status |
|--------|--------|-----------|--------|
| Dashboard | MOBILE | [dashboard-mobile.html](generated-code/dashboard-mobile.html) | Extracted |
| Dashboard | DESKTOP | [dashboard-desktop.html](generated-code/dashboard-desktop.html) | Extracted |
Rule: Code is ~90% production-ready. Use it as the base for React components — add state, handlers, and TypeScript types. Do NOT rewrite from scratch.
Save mockup images for offline reference and documentation:
fetch_screen_image(projectId, screenId)docs/01-Planejamento/03.5-visual-mockups/images/Optional but recommended: Images allow stakeholder review without Stitch access.
When refinements are needed after initial generation:
edit_screens(projectId, screenId, prompt) — describe only what to changegenerate_variants(projectId, screenId) to create variationscreate_design_system or list_design_systems to manage DS in Stitchapply_design_system to enforce DS on individual screensdesign-system-integration.md for the full DS sync protocolfetch_screen_code for updated screensRule:
edit_screensfor refinement,generate_screen_from_textfor new screens,generate_variantsfor exploration. Never regenerate what can be edited.
| Scenario | Use Stitch? | Notes |
|----------|-------------|-------|
| /define workflow Phase 3.5 | YES | After UX Concept, before Architecture |
| /ui-ux-pro-max Step 2c | YES | After design system, to validate tokens visually |
| Building new feature with wireframes | YES | Convert wireframes to visual reference |
| Quick prototype for stakeholder review | YES | Fast visual validation |
| Implementing code from existing designs | NO | Use the actual design files instead |
| Text-only documentation | NO | Stitch is for visual mockups |
| Bug fixing or debugging | NO | Not relevant |
Never generate without reading UX Concept first. Stitch prompts must be derived from wireframe descriptions, not invented. If no UX Concept exists, create wireframes first.
Apply anti-cliche rules from @frontend-specialist. No default purple, no glassmorphism, no standard hero split, no generic SaaS palette. Cross-reference with prompt-engineering.md checklist.
Generate both MOBILE and DESKTOP for key screens. At minimum: Landing/Home, Dashboard, and primary user flow screens. Secondary screens can be MOBILE-only.
Use GEMINI_3_PRO for key screens. Dashboard, Landing, Onboarding, and any screen that defines the visual identity. Use GEMINI_3_FLASH for repetitive or utility screens.
Present to user before proceeding. After generating screens, show the user the results and ask for approval. Never silently proceed to the next phase.
Document all IDs. Record Stitch project ID and every screen ID in the output document. These are needed for future reference and iteration.
Do not retry on timeout. If generate_screen_from_text times out, the generation may still succeed server-side. Use get_screen to check later instead of re-generating.
| Component | Relationship | Direction |
|-----------|-------------|-----------|
| @ux-researcher | Produces wireframes (Section 4 of UX Concept) | Input to this skill |
| @frontend-specialist | Consumes mockups + generated code for design system + implementation | Output from this skill |
| frontend-design skill | Provides anti-cliche rules and design principles | Rules applied to prompts |
| /define workflow | Phase 3.5 uses this skill for visual mockups + code extraction | Workflow integration |
| /ui-ux-pro-max workflow | Step 2c uses this skill for visual preview + DS sync | Workflow integration |
| Design System document | Mockups inform tokens; Stitch DS enforces consistency | Bidirectional |
| Stitch Design System | Mirror of Design System doc inside Stitch platform | Sync via create/apply/update tools |
When generating mockups, create:
File: docs/01-Planejamento/03.5-visual-mockups.md (or docs/planning/03.5-visual-mockups.md)
# Visual Mockups: {Project Name}
## Metadata
- **Based on:** 03-ux-concept.md
- **Date:** {YYYY-MM-DD}
- **Stitch Project ID:** {project_id}
- **Model:** GEMINI_3_PRO / GEMINI_3_FLASH
## Generated Screens
| # | Screen Name | Device | Screen ID | Model | Status |
|---|------------|--------|-----------|-------|--------|
| 1 | [Name] | MOBILE | [id] | PRO | Approved/Pending |
| 2 | [Name] | DESKTOP | [id] | FLASH | Approved/Pending |
## Coverage
| UX Concept Screen | MOBILE | DESKTOP | States |
|-------------------|--------|---------|--------|
| [Screen 1] | Yes | Yes | Success |
| [Screen 2] | Yes | No | Success, Empty |
## Insights for Design System
- **Primary color observed:** [color from mockups]
- **Typography style:** [serif/sans/display from mockups]
- **Geometry:** [sharp/rounded/mixed from mockups]
- **Key patterns:** [notable UI patterns from mockups]
## Generated Code (Step 8)
| Screen | Device | Code File | Status |
|--------|--------|-----------|--------|
| [Name] | MOBILE | [generated-code/{name}-mobile.html](generated-code/{name}-mobile.html) | Extracted |
| [Name] | DESKTOP | [generated-code/{name}-desktop.html](generated-code/{name}-desktop.html) | Extracted |
> Code is ~90% production-ready. See `code-handoff.md` for the conversion protocol to React components.
## Stitch Design System (Step 10, if applicable)
- **DS ID:** [design_system_id]
- **DS Name:** [name]
- **Applied to screens:** [list of screen IDs]
Note: Always integrate the guidelines from
@frontend-specialistto ensure generated designs are truly premium and unique. Loadprompt-engineering.mdbefore every generation session.
tools
n8n workflow automation principles, patterns, and validation. Expression syntax, node configuration, MCP tools usage, code node patterns.
testing
# Example Skill > Template skill for specialist squads. Replace with your domain-specific knowledge. ## Overview This skill provides domain-specific knowledge and patterns for the squad. ## When to Use - When the squad needs domain expertise - When applying domain-specific patterns - When reviewing domain-related outputs ## Key Principles 1. **Principle 1:** Description of the first principle 2. **Principle 2:** Description of the second principle 3. **Principle 3:** Description of the th
development
Web application testing principles. E2E, Playwright, deep audit strategies.
development
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".