stitch-mcp-get-screen
Skill45 starsChanged 8 months agoApache-2.0View on GitHub
Retrieves full details of a specific Stitch screen — HTML download URL, screenshot URL, dimensions. This is the final step in design retrieval before code conversion.
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-edit-screensSkill
- stitch-mcp-generate-screen-from-textSkill
- stitch-mcp-generate-variantsSkill
- stitch-mcp-get-projectSkill
- 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, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 23
After list_screens has returned a screenId
- Distinctive: line 95
Always quote the URL to handle special characters.
- Distinctive: line 99
After retrieving the screen, check what the user wants to do with it.
- Very specific: line 101
Check the deviceType in the response first — it shapes which options to suggest:
≈ “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 — Get Screen
Retrieves the full output of a Stitch-generated screen: the HTML source code URL and the screenshot image URL. This is the gateway between Stitch design and framework conversion.
Critical prerequisite
Only use this skill when the user explicitly mentions "Stitch".
If you already have both projectId AND screenId, call this directly — do not call get_project first.
When to use
- After
list_screenshas returned a screenId - User provides a Stitch screen URL and wants to convert it to code
- Retrieving assets for any conversion skill: Next.js, Svelte, HTML, React Native, or SwiftUI
Step 1: Parse IDs from context
The user may provide the screen reference in different formats:
| Input format | → projectId | → screenId |
projects/123/screens/456 | 123 | 456 |
https://stitch.withgoogle.com/projects/123?node-id=456 | 123 | 456 |
| Separate numeric IDs already known | Use as-is | Use as-is |
Step 2: Call the MCP tool
get_screen is mid-migration: name is the current identifier and takes the full resource path, while projectId and screenId are marked deprecated but are still required. Send all three.
{
"name": "get_screen",
"arguments": {
"name": "projects/3780309359108792857/screens/88805abc123def456",
"projectId": "3780309359108792857",
"screenId": "88805abc123def456"
}
}The prefix rule differs per field, which is the whole reason this wrapper exists:
✅ name: "projects/3780309359108792857/screens/88805abc123def456"
❌ name: "88805abc123def456"
✅ projectId: "3780309359108792857"
❌ projectId: "projects/3780309359108792857"
✅ screenId: "88805abc123def456"
❌ screenId: "screens/88805abc123def456"
nameis the full path; the other two are bare. Omittingnamefails — it's required despite the deprecated pair still being mandatory too.
Output schema
{
"name": "projects/3780309359108792857/screens/88805abc123def456",
"htmlCode": {
"downloadUrl": "https://storage.googleapis.com/stitch-output/..."
},
"screenshot": {
"downloadUrl": "https://storage.googleapis.com/stitch-screenshots/..."
},
"figmaExport": {
"downloadUrl": "https://storage.googleapis.com/stitch-figma/..."
},
"width": 390,
"height": 844,
"deviceType": "MOBILE"
}Step 3: Download the HTML reliably
AI fetch tools frequently fail on Google Cloud Storage URLs. Use the bash script:
bash scripts/fetch-stitch.sh "[htmlCode.downloadUrl]" "temp/source.html"Always quote the URL to handle special characters.
Step 4: Determine framework and route to conversion
After retrieving the screen, check what the user wants to do with it.
Check the deviceType in the response first — it shapes which options to suggest:
deviceType | Sensible defaults to suggest |
DESKTOP | Next.js, Svelte, HTML |
MOBILE | Next.js (PWA), Svelte, HTML, React Native, SwiftUI |
AGNOSTIC | Any |
Then route based on user intent:
| User intent | → Load skill |
| "Convert to Next.js", "React app", "App Router" | stitch-nextjs-components |
| "Convert to Svelte", "SvelteKit" | stitch-svelte-components |
| "Convert to HTML", "PWA", "Capacitor", "Ionic", "web app" | stitch-html-components |
| "React Native", "Expo", "iOS and Android", "cross-platform" | stitch-react-native-components |
| "SwiftUI", "Xcode", "native iOS", "iOS only" | stitch-swiftui-components |
| "Extract design system", "get the colors/fonts" | stitch-design-system |
| "Just show me the screenshot" | Present screenshot.downloadUrl |
| No framework mentioned, desktop design | Ask: Next.js, Svelte, or HTML? |
| No framework mentioned, mobile design | Ask: React Native, SwiftUI, or HTML (Capacitor)? |
References
scripts/fetch-stitch.sh— Reliable GCS HTML downloader
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.

