react:components

react:components — an installable skill for AI agents, published by google-labs-code/stitch-skills.

INSTALLATION
npx skills add https://github.com/google-labs-code/stitch-skills --skill react:components
Run in your project or agent environment. Adjust flags if your CLI version differs.

SKILL.md

$27

Architectural rules

  • Modular components: Break the design into independent files. Avoid large, single-file outputs.
  • Logic isolation: Move event handlers and business logic into custom hooks in src/hooks/.
  • Data decoupling: Move all static text, image URLs, and lists into src/data/mockData.ts.
  • Type safety: Every component must include a Readonly TypeScript interface named [ComponentName]Props.
  • Project specific: Focus on the target project's needs and constraints. Leave Google license headers out of the generated React components.
  • Style mapping:
  • Extract the tailwind.config from the HTML <head>.
  • Sync these values with resources/style-guide.json.
  • Use theme-mapped Tailwind classes instead of arbitrary hex codes.

Execution steps

  • Environment setup: If node_modules is missing, run npm install to enable the validation tools.
  • Data layer: Create src/data/mockData.ts based on the design content.
  • Component drafting: Use resources/component-template.tsx as a base. Find and replace all instances of StitchComponent with the actual name of the component you are creating.
  • Application wiring: Update the project entry point (like App.tsx) to render the new components.
  • Quality check:
  • Run npm run validate <file_path> for each component.
  • Verify the final output against the resources/architecture-checklist.md.
  • Start the dev server with npm run dev to verify the live result.

Troubleshooting

  • Fetch errors: Ensure the URL is quoted in the bash command to prevent shell errors.
  • Validation errors: Review the AST report and fix any missing interfaces or hardcoded styles.
BrowserAct

Let your agent run on any real-world website

Bypass CAPTCHA & anti-bot for free. Start local, scale to cloud.

Explore BrowserAct Skills →

Stop writing automation&scrapers

Install the CLI. Run your first Skill in 30 seconds. Scale when you're ready.

Start free
free · no credit card