What is the stitch react:components skill?
The react:components skill is a SKILL.md in google-labs-code/stitch-skills, in the stitch-build plugin. It makes an AI coding agent fetch Stitch screens, extract the design tokens, and write modular Vite and React components with Readonly props, mock data, React Router links and a TypeScript check.
The react:components skill, named stitch::react-components in its frontmatter, converts Google Stitch designs into a Vite and React project, or syncs components that already exist. It is part of the stitch-build plugin.
It works in four phases: retrieval, style extraction, architecture and execution. The goal is modular code rather than one large page, with each component getting its own file.
What changes in your agent's output
- Retrieval calls
get_screenfor every screen, downloads the files withscripts/fetch-stitch.shand records a Last Sync Time in.stitch/metadata.json. - Style tokens are lifted from the Tailwind config in the HTML head into
resources/style-guide.json. - Components go in
src/components/, hooks insrc/hooks/and static content insrc/data/mockData.ts, each with aReadonlyprops interface. - Placeholder links become React Router
<Link>elements, anddark:variants follow the theme.
Who the stitch react:components skill is for
Best for
- Turning Stitch prototypes into a real React front end.
- Re-syncing components when a design changes.
- Teams that want typed, modular output instead of a single HTML dump.
Not for
- WordPress output. The skill produces React code, not WordPress pages.
- Designs that did not come from Stitch.
- Choosing components. stitch shadcn-ui helps align the result with shadcn/ui.
Use it with UiChemy
This skill ends in React code. If the goal is a WordPress site, UiChemy is the route: AI to WordPress imports an existing AI build, with Lovable to Elementor as a worked example, and Composer edits the result. Click Get Started on uichemy.com.
How to install Stitch React Components Skill: Stitch Designs to React
git clone https://github.com/google-labs-code/stitch-skills.gitThe skill's own name is react:components, and its frontmatter name is stitch::react-components.Set up the Stitch MCP server
These skills assume the Stitch MCP server is configured in your agent. Follow the Stitch MCP setup docs first.
Clone the repository
Run
git clone https://github.com/google-labs-code/stitch-skills.git. This skill is at plugins/stitch-build/skills/react-components.Copy the skill folder
Copy that folder into your agent's skills folder with every file in it. The project's own plugin installer,
npx plugins add google-labs-code/stitch-skills, is the alternative and installs the whole collection.Invoke it
Ask your agent to convert a named Stitch project's screens into React components with the react:components skill, in a Vite and React project.
Check that it loaded
Run it on one Stitch screen. You should see files in src/components, a mockData file, Readonly props on each component and a metadata file with a sync time. Run npx tsc --noEmit to confirm the output compiles.
Key features
- Retrieval phaseIt gets every screen with
get_screen, downloads files with a fetch script and audits them visually. - Sync tracking
.stitch/metadata.jsonstores a Last Sync Time so later runs know what changed. - Style extractionTokens move from the HTML head Tailwind config into a style-guide JSON file.
- Modular architectureComponents, hooks and mock data each have their own folder and file.
- Typed propsEvery component gets a
Readonly[Name]Propsinterface. - Router linksPlaceholder
href="#"values are replaced with React Router links. - Theme-mapped classesTailwind classes map to the extracted theme, with
dark:variants. - Validation stepAn optional AST validator and a
tsc --noEmitcheck run before the work is called done. - Permission gateThe agent asks before it starts a dev server or runs browser audits.
- Resources and exampleAn architecture checklist, a component template, an API reference and a gold-standard card example are included.
Frequently asked questions
What is the react:components skill?
It is a skill in the stitch-build plugin of google-labs-code/stitch-skills. It converts Google Stitch screens into modular Vite and React components, or syncs existing ones, with typed props, theme-mapped Tailwind classes and validation.
How do I install it?
Configure the Stitch MCP server, then clone google-labs-code/stitch-skills and copy plugins/stitch-build/skills/react-components into your agent's skills folder with its scripts, resources and examples, or use the project's plugin installer. Ask the agent to convert a Stitch project.
What does the output look like?
A Vite and React project with components in src/components, hooks in src/hooks and data in src/data/mockData.ts. Each component has a Readonly props interface, router links replace placeholders, and styles map to extracted theme tokens.
Does it produce WordPress?
No. It writes React code. To land a build in WordPress, UiChemy's AI to WordPress imports an existing AI build, and Lovable to Elementor walks through the same idea for a Lovable project.
Does it check its own work?
It offers an optional AST validator through npm run validate and a tsc --noEmit type check. It asks permission before starting a dev server or running browser audits, so verification is part of the workflow.
Which AI agents can use it?
The README lists Codex, Antigravity, Gemini CLI, Claude Code, Cursor and OpenCode, with OpenCode set up manually. The agent needs the Stitch MCP server configured to retrieve screens. Check your agent's documentation for where skills folders live.
What should I pair it with?
Capture the look with design-md first, since it feeds token extraction, and use stitch shadcn-ui to bring shadcn/ui components in. For React performance rules on the finished result, see vercel-react-best-practices before you ship it to users.



