1.3 KiB
1.3 KiB
Stitch to React Components Skill
Install
npx add-skill google-labs-code/stitch-skills --skill react:components --global
Example Prompt
Convert my Landing Page screen in my Podcast Stitch Project to a React component system.
Skill Structure
This repository follows the Agent Skills open standard. Each skill is self-contained with its own logic, validation scripts, and design tokens.
skills/react-components/
├── SKILL.md — Core instructions & workflow
├── package.json — Validator dependencies
├── scripts/ — Networking & AST validation
├── resources/ — Style guides & API references
└── examples/ — Gold-standard code samples
How it Works
When activated, the agent follows a high-fidelity engineering pipeline:
- Retrieval: Uses a system-level
curlscript to bypass TLS/SNI issues on Google Cloud Storage. - Mapping: Cross-references Stitch metadata with the local
style-guide.jsonto ensure token consistency. - Generation: Scaffolds components using a strict Atomic Design pattern.
- Validation: Runs an automated AST check using
@swc/coreto prevent hardcoded hex values or missing interfaces. - Audit: Performs a final self-correction check against a 20-point architecture checklist.