Skip to content
Skillv1.0.0

stitch-react-components

Convert Stitch HTML and screenshots into modular Vite/React/TypeScript components, or sync existing components to updated Stitch designs, with local architecture and validation checks.

by practicalswan(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from practicalswan/agent-skills (stitch-react-components/SKILL.md). Install upstream with npx skills add practicalswan/agent-skills --skill stitch-react-components. Copyright stays with the author (Apache-2.0).

Stitch React Components

This skill is a catalog-normalized import from https://github.com/google-labs-code/stitch-skills at commit 7b53207b94e62911777d53d4238b5f8c88c2b519, source path plugins/stitch-build/skills/react-components. The upstream control file was corrected for this workspace: the verified Stitch MCP surface here is design-system oriented, so screen lookup, screen generation, and screen editing tools must be used only when the current host explicitly exposes them.

When to Use This Skill

  • Use when a Stitch screen or export should become modular React components or an existing React surface must be synchronized with newer Stitch evidence.
  • The task involves Google Stitch project IDs, .stitch/ artifacts, DESIGN.md files, Stitch exports, or Stitch-specific validation.
  • The broader stitch-design router points here as the narrowest workflow.

Workflow

  1. Acquire source HTML and screenshots from .stitch/designs/, Stitch web exports, or current host-listed screen tools.
  2. Do not assume get_screen or list_screens exists in this workspace.
  3. Record available project and screen identifiers plus the sync timestamp in .stitch/metadata.json when that evidence exists.
  4. Extract current color, typography, spacing, and radius tokens from the exported HTML before editing components.
  5. Move static copy, image URLs, and lists into src/data/mockData.ts.
  6. Create small components with Readonly prop interfaces and isolate interactions in hooks.
  7. Map Stitch theme values into Tailwind/theme tokens, replace placeholder links with real application routes, and cover dark-mode states instead of scattering raw hex values.
  8. Run the bundled validator where dependencies are available, then run the app build or dev check.

Local Assets

  • examples/, resources/, references/, or reference/ are upstream support material when present. Treat SKILL.md as the source of truth if a support file mentions an unavailable MCP tool.
  • scripts/ are optional helpers. On Windows, prefer PowerShell or Node equivalents unless Git Bash or WSL is actually available.
  • Keep generated .stitch/ files out of commits unless the user explicitly wants them as durable examples.

Corrected Stitch MCP Surface

Verified in this workspace on 2026-06-15: create_project, upload_design_md, create_design_system_from_design_md, list_design_systems, and apply_design_system. This 2026-07-29 source refresh did not re-verify a broader live MCP surface. Do not claim list_projects, list_screens, get_project, get_screen, generate_screen_from_text, edit_screens, or generate_variants were used unless the current host exposes those exact tools in the active tool list.

Anti-Patterns

  • Claiming a Stitch screen-generation, screen-editing, or screen-retrieval MCP call succeeded when the active host does not expose that tool.
  • Uploading files, screenshots, HTML, markdown, or design assets to Stitch without user-approved destination and artifact details.
  • Reading, printing, storing, or committing Stitch API keys, MCP config secrets, cookies, or credential-bearing files.
  • Treating generated design or code as final without local render, syntax, or artifact verification.
  • Collapsing this workflow into a broader frontend/design skill when Stitch-specific files, project IDs, or design-system assets matter.

Verification Protocol

Before claiming this skill was applied successfully:

  1. Pass/fail: Every component has typed props or an explicit reason it has no props.
  2. Pass/fail: Static content is separated from component structure.
  3. Pass/fail: Generated project code does not carry irrelevant upstream license headers.
  4. Pass/fail: The rendered app was checked locally or the blocker is documented.
  5. Pressure-test scenario: Repeat the workflow with Stitch MCP screen tools unavailable and confirm the fallback path remains honest and actionable.
  6. Success metric: The user can identify the exact artifact, project/design-system target, and verification evidence without relying on unstated MCP behavior.

Cross-Client Portability

This skill is written to stay usable across GitHub Copilot, Claude Code, and Codex.

  • GitHub Copilot: keep the folder in a Copilot-visible skill path or wrap the workflow in project instructions when folder discovery is unavailable.
  • Claude Code: keep the folder in a local skills directory or a compatible plugin source.
  • Codex: install or sync the folder into $CODEX_HOME/skills/stitch-react-components and restart Codex after major changes.

MCP Availability And Fallback

Preferred MCP Server: Stitch MCP

  • Fallback prompt: "Use the Stitch React Components skill without Stitch MCP. Use local Stitch exports and browser screenshots when MCP screen retrieval is unavailable. Show the exact files, commands, manual Stitch UI steps, and verification evidence used before concluding."
  • Verified Stitch MCP tools in this workspace are design-system/project oriented; use broader screen tools only when the current host exposes them.
  • Use local scripts, exported HTML/screenshots, the Stitch web UI, and project metadata files as the fallback evidence path.

Related Skills

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/practicalswan-agent-skills-stitch-react-components/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

practicalswan-agent-skills-stitch-react-components.ocm.jsonjson
{
  "ocm": "1",
  "id": "practicalswan-agent-skills-stitch-react-components",
  "kind": "skill",
  "name": "stitch-react-components",
  "description": "Convert Stitch HTML and screenshots into modular Vite/React/TypeScript components, or sync existing components to updated Stitch designs, with local architecture and validation checks.",
  "publisher": "practicalswan",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "coding"
    ],
    "tags": [
      "skill-md",
      "stitch",
      "react",
      "typescript",
      "components",
      "frontend",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Convert Stitch HTML and screenshots into modular Vite/React/TypeScript components, or sync existing components to updated Stitch designs, with local architecture and validation checks."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/practicalswan/agent-skills",
      "path": "stitch-react-components/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/practicalswan/agent-skills/blob/HEAD/stitch-react-components/SKILL.md",
      "key": "practicalswan/agent-skills/stitch-react-components/SKILL.md"
    },
    "license": "Apache-2.0"
  },
  "instructions": "# Stitch React Components\n\nThis skill is a catalog-normalized import from `https://github.com/google-labs-code/stitch-skills` at commit `7b53207b94e62911777d53d4238b5f8c88c2b519`, source path `plugins/stitch-build/skills/react-components`. The upstream control file was corrected for this workspace: the verified Stitch MCP surface here is design-system oriented, so screen lookup, screen generation, and screen editing tools must be used only when the current host explicitly exposes them.\n\n## When to Use This Skill\n\n- Use when a Stitch screen or export should become modular React components or an",
  "cost": {
    "context_tokens": 1444
  }
}

Fetch it by URL: GET /api/v1/registry/practicalswan-agent-skills-stitch-react-components/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.