What it is
Generates and edits screens in Stitch from text, images, or existing screens, then downloads the HTML and screenshots. It is for designers and frontend collaborators who already have Stitch MCP connected. It does not build design systems (it delegates to manage-design-system) and does not replace human visual review.
Core workflow
| Stage | Content |
|---|---|
| Trigger | A new screen from a description or reference image, an edit to an existing screen, or layout, colour, and content variants. |
| Input | The user prompt, an optional image or mockup, projectId, and an existing design-system ID. |
| Steps | Run prompt enhancement: find the project and design system, replace vague wording with UI terms, keep only layout, content, and structure; call generate_screen_from_text or edit_screens by mode; surface outputComponents; download HTML and screenshots to .stitch/designs; switch to the edit flow when needed. |
| Output | The new or edited screen, local HTML and screenshots, and an updated .stitch/metadata.json. |
| Boundary | Generation prompts must not contain hex codes, fonts, or roundness tokens (edit prompts may use hex for precise colour); create a design system first if none exists. |
| Getting started: set up the design system before generating, and describe only layout and content in the prompt. |
Traits
- Four flows: generate from text, generate from image, edit, and variants.
- Prompt enhancement is mandatory before generating: analyse the project, replace vague terms, structure the prompt.
- After every tool call, surface the text description and suggestions in outputComponents.
- When the result misses, edit rather than regenerate unless the fundamental layout is wrong.
Who it is for and who it is not for
| Good fit | Poor fit |
|---|---|
| Projects that already have Stitch and a design system | Environments without Stitch MCP |
| Producing MOBILE, DESKTOP, or TABLET screens | Only wanting a design-spec document |
| Landing results as local HTML and screenshots | Offline or fully local generation |
How it differs
| Need | Use |
|---|---|
| Generate or edit a screen | generate-design |
| Define tokens and theme first | manage-design-system |
| Move existing code into Stitch | code-to-design |
| Only sharpen the wording of an idea | enhance-prompt |
Source-level risks
| Risk | Source | Impact |
|---|---|---|
| Hard dependency on Stitch MCP and a remote service | allowed-tools lists stitch*:* and tool names | The flow cannot run without MCP |
| Tokens leaking into prompts conflict with project settings | CAUTION block | Inconsistent output that must be redone |
| Remote assets fetched with curl | Download steps writing .stitch/designs | Network or naming failures leave local assets missing |
| File ends mid-sentence | Tail stops at “The metadata file trac” | Metadata update rules are incomplete |
| Depends on external references | references/design-mappings.md and others | Missing files leave term mapping unsupported |