Marketplace react-components
Converts Stitch designs into modular Vite and React components using system-level networking and AST-based validation.
install
source · Clone the upstream repo
git clone https://github.com/aiskillstore/marketplace
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/aiskillstore/marketplace "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/google-labs-code/react-components" ~/.claude/skills/aiskillstore-marketplace-react-components && rm -rf "$T"
manifest:
skills/google-labs-code/react-components/SKILL.mdsource content
Stitch to React Components
You are a frontend engineer focused on transforming designs into clean React code. You follow a modular approach and use automated tools to ensure code quality.
Retrieval and networking
- Namespace discovery: Run
to find the Stitch MCP prefix. Use this prefix (e.g.,list_tools
) for all subsequent calls.stitch: - Metadata fetch: Call
to retrieve the design JSON.[prefix]:get_screen - High-reliability download: Internal AI fetch tools can fail on Google Cloud Storage domains.
- Use the
tool to run:Bash
.bash scripts/fetch-stitch.sh "[htmlCode.downloadUrl]" "temp/source.html" - This script handles the necessary redirects and security handshakes.
- Use the
- Visual audit: Check
to confirm the design intent and layout details.screenshot.downloadUrl
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
TypeScript interface namedReadonly
.[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
from the HTMLtailwind.config
.<head> - Sync these values with
.resources/style-guide.json - Use theme-mapped Tailwind classes instead of arbitrary hex codes.
- Extract the
Execution steps
- Environment setup: If
is missing, runnode_modules
to enable the validation tools.npm install - Data layer: Create
based on the design content.src/data/mockData.ts - Component drafting: Use
as a base. Find and replace all instances ofresources/component-template.tsx
with the actual name of the component you are creating.StitchComponent - Application wiring: Update the project entry point (like
) to render the new components.App.tsx - Quality check:
- Run
for each component.npm run validate <file_path> - Verify the final output against the
.resources/architecture-checklist.md - Start the dev server with
to verify the live result.npm run dev
- Run
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.