Skip to content
SkillMixed1,891 tokens in use

stitch::react-components

Converts Stitch designs into modular Vite and React components, or syncs existing components to the latest Stitch screens, with AST validation.

10,975 stars on the repository Apache License 2.0google-labs-code/stitch-skills · plugins/stitch-build/skills/react-components
npx skills add google-labs-code/stitch-skills
View source

Install command as written in the repository's README

Skill label

measured from its files

What installing stitch::react-components costs

43tokens idle
1,891tokens in use
2,203tokens, up to

Idle is what sits in context while the skill is installed. In use is its instructions, loaded when it runs. Up to adds the files its instructions link. Counts are approximate, made offline with cl100k_base.

Model dependence Mixed

Script-ledMixedModel-led

Scripts do part of the work and the model's judgement does the rest.

This describes the skill's structure, how much of it is scripts. It does not say how well it works. Scripts: scripts/fetch-stitch.sh, scripts/validate.js.

Touches

shelldeclared and detectednetworkdetectedwrites filesdeclared

Declared tags come from the skill's frontmatter; detected ones from its scripts, its code blocks and the commands it names in inline code. This is detected, not audited.

How it scores

Quality

How well the skill is written, counted from its own files: its frontmatter, its steps, examples, stated output and constraints, its size and whether every file it ships is one it names.How we score it →
Good
  • Frontmatter4/15
  • Structure25/25
  • Examples6/15
  • Output15/15
  • Size15/15
  • Resources5/15

Security

Starts at 100 and loses points for each thing in the skill's files that a reader should look at first.How we score it →
Good
  • File that was not read−15

    a file the skill ships that was not read, so what it does is unknown

    resources/component-template.tsx
  • Runs shell commands−2

    does this on the machine, as the frontmatter declares

    scripts/fetch-stitch.sh, line 16
  • Reaches the network−10

    does this on the machine, and the frontmatter does not say so

    scripts/fetch-stitch.sh, line 23

Repository health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
Good
  • Development activity80
  • Maintenance52
  • Community68
  • Maturity32
  • Momentum40

This skill turns screens from a Google Stitch project into a React codebase. It downloads each screen’s HTML and screenshot through the Stitch MCP server, pulls the Tailwind tokens out of the page head, and writes modular components with typed props, hooks and mock data.

It also works as a sync tool: when the Stitch project changes, it refreshes the local design files and updates the matching components. A validation script checks every component for a Props interface before the work counts as done.

What You Get

  • A src/components folder with one file per reusable pattern such as cards, badges and search bars
  • Custom hooks in src/hooks that hold event handlers and logic
  • A src/data/mockData.ts file that holds all static text, image URLs and lists
  • A resources/style-guide.json synced to the Tailwind config of the current Stitch project
  • A .stitch/metadata.json file with project ID, device type, screens and last sync time

Common Use Cases

  • Converting a freshly designed Stitch project into a Vite and React app
  • Syncing an existing React app to the newest Stitch screen updates
  • Wiring multi-page navigation with React Router links in place of href placeholders

What Makes It Unique

Every phase ends in a gate the agent has to satisfy before it moves on. Screens are always fetched through get_screen and a download script, the style guide is rewritten from the current project, and each component needs an exported-style Props interface that the bundled validator checks.

Under The Hood

The skill calls the Stitch MCP tools to read project and screen metadata, then runs a bundled shell script that downloads the HTML and screenshot files from Google Cloud Storage URLs. It reads and writes files in the working project, runs npm install when needed, and on request runs the validate script, tsc and the dev server. Validation and dev server steps wait for the user’s permission.

Join founders building with open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on SubstackJoin 750+ subscribers