Agent skill · Stitch Skills
/react-components Turn Stitch screens into modular, validated React code
react-components converts Stitch screens into a Vite and React app, or syncs existing components with newer designs. It runs in gated phases: download every screen with a bundled script and inspect its screenshot, extract Tailwind tokens into a style guide, then write components that follow strict architecture rules checked by an AST-based validator.
Works with
- Codex
- Claude Code
- Cursor
- Any Agent Skills host
- OpenCode
Used forFrontend and UI
When to use it
- A Stitch project is approved and you need it as a working React codebase.
- Designs changed in Stitch and your existing components need to match again.
- You want generated code split into components, hooks and data rather than one page file.
How it works
- 1Fetch every screen
The agent calls get_screen for each screen, downloads HTML and full-width screenshots with fetch-stitch.sh, asks before replacing local copies and views each screenshot.
- 2Extract tokens
It pulls colours, fonts, spacing and radii from each file's tailwind.config into resources/style-guide.json for this project only.
- 3Apply architecture rules
Reusable patterns become separate components, logic moves into hooks, content into mockData.ts, and every file gets a Readonly Props interface.
- 4Wire navigation
Placeholder links become React Router links with active states, and the logo always links home.
- 5Validate with permission
With your consent it runs the validator on each file, tsc --noEmit and the architecture checklist before starting a dev server.
What it steers the agent away from
- Monolithic page files with hardcoded text and hex colours
- Reusing tokens from a previous project
- Starting dev servers or browser checks without asking
Install this skill
It installs with the Stitch Skills pack.
CodexAdds the marketplace; then install stitch-design, stitch-build and stitch-utilities as needed. The sparse flags are optional.
codex plugin marketplace add google-labs-code/stitch-skills --ref main \
--sparse .agents/plugins \
--sparse plugins/stitch-design \
--sparse plugins/stitch-build \
--sparse plugins/stitch-utilitiesClaude CodeInstalls the plugin suite into the current project.
npx plugins add google-labs-code/stitch-skills --scope project --target claude-codeCursorInstalls the plugin suite into the current workspace.
npx plugins add google-labs-code/stitch-skills --scope workspace --target cursorAny Agent Skills host (selective)Lets you pick individual skills; include the ones they depend on.
npx skills add google-labs-code/stitch-skillsOpenCodeCopy each skill folder by hand and add the Stitch MCP server as a remote entry in opencode.json; skills named stitch::… need renaming to kebab-case.
mkdir -p .opencode/skills
cp -R plugins/stitch-design/skills/generate-design .opencode/skills/generate-designCommands come from the author’s README; check it for changes before you run them.
Questions
Does it support dark mode?
Yes. It is told to add dark: variants to every colour class in every component.
Why does it insist on its own download script?
According to the skill, an agent's built-in fetching often breaks on Google Cloud Storage download links, so the script deals with the redirects.
More guides from Stitch Skills
/remotionMake a walkthrough video from your Stitch screensProduces a walkthrough video of a Stitch project's screens in Remotion with transitions, zooms and text overlays.Read the guide →/extract-design-mdReverse-engineer a design system from frontend sourceBuilds a Stitch-ready DESIGN.md from frontend source files, Tailwind configs and theme tokens without running the app.Read the guide →/generate-designGenerate and refine Stitch screens from better promptsCreates Stitch screens from text or images, edits existing ones and generates up to five variants, after rewriting the prompt.Read the guide →/stitch-loopBuild a multi-page site with an autonomous Stitch loopBuilds a site page by page in Stitch, passing a baton file between iterations and wiring each new page into navigation.Read the guide →
Also in this pack
/shadcn-uiGuides finding, installing and customising shadcn/ui components through the shadcn MCP tools and CLI.↗/code-to-designMoves an existing web app into Stitch by snapshotting it as static HTML, deriving its DESIGN.md and uploading both.↗/extract-static-htmlCaptures a running app as one self-contained HTML file with inlined CSS and images, via Puppeteer or a browser agent.↗/manage-design-systemCreates or updates a Stitch design system from DESIGN.md and applies it to a project's screens through MCP calls.↗/upload-to-stitchUploads local images, mockups, HTML or markdown to a Stitch project with a script that avoids MCP token limits.↗/design-mdReads an existing Stitch project's screens and writes a DESIGN.md describing its look in Stitch-friendly language.↗/enhance-promptTurns a rough UI idea into a structured Stitch prompt with platform, page sections, UI terms and DESIGN.md context.↗/site-mdDrafts a .stitch/SITE.md with mission, visual vibe, sitemap and roadmap to drive the multi-page build loop.↗/taste-designWrites a DESIGN.md with strict anti-generic rules for type, colour, asymmetric layout and motion to steer Stitch output.↗
Summary by trendhub. The skill itself lives in google-labs-code/stitch-skills/plugins/stitch-build/skills/react-components by Google Labs Code (Apache-2.0); read the full, current text there.