stitch-mcp-edit-screens
Skill45 starsChanged 8 months agoApache-2.0View on GitHub
Edits existing Stitch screens with text prompts — the iteration tool. Change colors, layout, content, or style without regenerating from scratch. Supports refinement loops via output_components suggestions.
In this repository36 other files it gives its agents.
- AGENTS.mdAGENTS.md
- stitch-a11ySkill
- stitch-animateSkill
- stitch-design-mdSkill
- stitch-design-systemSkill
- stitch-html-componentsSkill
- stitch-ideateSkill
- stitch-loopSkill
- stitch-mcp-apply-design-systemSkill
- stitch-mcp-create-design-system-from-design-mdSkill
- stitch-mcp-create-design-systemSkill
- stitch-mcp-create-projectSkill
- stitch-mcp-delete-projectSkill
- stitch-mcp-generate-screen-from-textSkill
- stitch-mcp-generate-variantsSkill
- stitch-mcp-get-projectSkill
- stitch-mcp-get-screenSkill
- stitch-mcp-list-design-systemsSkill
- stitch-mcp-list-projectsSkill
- stitch-mcp-list-screensSkill
- stitch-mcp-update-design-systemSkill
- stitch-mcp-upload-design-mdSkill
- stitch-nextjs-componentsSkill
- stitch-orchestratorSkill
- stitch-react-componentsSkill
- stitch-react-native-componentsSkill
- stitch-remotionSkill
- stitch-setupSkill
- stitch-shadcn-uiSkill
- stitch-skill-creatorSkill
- stitch-svelte-componentsSkill
- stitch-swiftui-componentsSkill
- stitch-ued-guideSkill
- stitch-ui-design-spec-generatorSkill
- stitch-ui-design-variantsSkill
- stitch-ui-prompt-architectSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
After generation, user says "make it darker", "change the font", "move the nav to the side"
- Very specific: line 99
If the user accepts: call edit_screens again with the suggestion as the new prompt
- Distinctive: line 105
Do NOT retry during this window
- Distinctive: line 106
Do NOT assume failure if it takes > 60 seconds
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Stitch MCP — Edit Screens
Edits one or more existing screens using a text prompt. This is the primary iteration tool — instead of regenerating a screen from scratch (60–180s), you can refine what you already have with targeted changes.
Critical prerequisite
Only use this skill when the user explicitly mentions "Stitch".
You must have both a projectId AND at least one screenId before calling this. If you don't:
- List screens via
stitch-mcp-list-screensto find screen IDs - Parse from context:
projects/123/screens/456→ projectId:123, screenId:456
When to use
- User wants to modify an existing Stitch screen (change colors, layout, content, style)
- After generation, user says "make it darker", "change the font", "move the nav to the side"
- The orchestrator's Step 5b offers "Edit this screen"
- Any iterative refinement on a Stitch design
Call the MCP tool
{
"name": "edit_screens",
"arguments": {
"projectId": "3780309359108792857",
"selectedScreenIds": ["88805abc123def456"],
"prompt": "Change the background to dark mode (#09090B). Make the primary color indigo (#818CF8). Increase the font size of the header to 32px bold.",
"deviceType": "DESKTOP",
"modelId": "GEMINI_3_1_PRO"
}
}Parameter reference
projectId — numeric ID only, no prefix
✅ "3780309359108792857"
❌ "projects/3780309359108792857"selectedScreenIds — array of numeric screen IDs
✅ ["88805abc123def456"]
❌ ["projects/123/screens/88805abc123def456"]
❌ ["screens/88805abc123def456"]Select one or more screens to edit. All selected screens receive the same edit instruction.
prompt — the edit instruction
Apply the same quality bar as generation prompts:
- Be specific: "Change background to #09090B" not "make it darker"
- Name exact components: "the header navigation" not "the top part"
- Include values: hex colors, px sizes, specific content text
- One focused change per call produces better results than many changes at once
deviceType — optional
Same enum as generate_screen_from_text: MOBILE, DESKTOP, TABLET, AGNOSTIC
modelId — optional
| Value | Use when |
GEMINI_3_1_PRO | Recommended — complex layouts, high fidelity |
GEMINI_3_FLASH | Fast iteration, wireframes, simple changes |
GEMINI_3_PRO | Deprecated. Still works but will be removed. Use GEMINI_3_1_PRO instead. |
Handling output_components
The response may contain output_components with suggestions:
{
"outputComponents": [
{ "text": "I've updated the background color and adjusted contrast ratios." },
{ "suggestion": "Would you also like me to update the sidebar to match the dark theme?" }
]
}When you see suggestions:
- Present them to the user
- If the user accepts: call
edit_screensagain with the suggestion as the newprompt - This creates a natural refinement loop — keep going until the user is satisfied
Timing
Same as generation: 60–180 seconds is normal.
- Do NOT retry during this window
- Do NOT assume failure if it takes > 60 seconds
- Each call creates a new edit — retries mean duplicate edits
After editing
- Re-fetch the screen:
stitch-mcp-get-screenwith the same projectId and screenId - Show the updated screenshot to the user
- Offer:
- "Continue editing?" → another
edit_screenscall - "Generate variants of this version?" →
stitch-mcp-generate-variants - "Convert to code?" → framework conversion workflow
- "Continue editing?" → another
Anti-patterns
- Never send vague edit prompts — "make it better" will produce unpredictable results
- Never use
projects/IDformat for projectId or screenId — both must be numeric - Never batch unrelated edits — "change the color AND completely redo the layout" works poorly
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

