stitch::code-to-design
google-labs-code/stitch-skills
Convert existing frontend code (React, Vue, Angular) into Stitch Design projects.
What is stitch::code-to-design?
Transforms frontend applications and components into Stitch Design by extracting static HTML, analyzing design systems, and uploading both to your Stitch project. Use this skill whenever you need to migrate or save existing web apps into Stitch.
- Extracts self-contained HTML from running dev servers or built applications
- Analyzes source code and stylesheets to generate a design system (DESIGN.md)
- Uploads extracted HTML and design system to your Stitch project
- Chains three sub-skills (extract-static-html, extract-design-md, upload-to-stitch) in sequence
- Preserves design system metadata and asset links during migration
How to install stitch::code-to-design
npx skills add https://github.com/google-labs-code/stitch-skills --skill stitch::code-to-design- A running local dev server (npm run dev, ng serve, etc.) OR a built web application directory with index.html
- Target Stitch projectId (retrieve via list_projects if unknown)
- Stitch API Key for upload operations
How to use stitch::code-to-design
- 1.Run the extract-static-html skill to generate a standalone HTML file from your dev server or build output
- 2.Verify the extracted HTML file in a browser (optional but recommended)
- 3.Run the extract-design-md skill to analyze your source code and generate DESIGN.md
- 4.Use the manage-design-system skill to upload DESIGN.md and create the design system in Stitch
- 5.Use the upload-to-stitch skill to upload the HTML file, specifying the route path as the screen title
Use cases
- Migrating an existing React/Vite application into Stitch for design iteration
- Converting Angular components and templates into a Stitch design system
- Saving a Vue.js app as a Stitch Design with extracted theme and component definitions
- Moving a Next.js project into Stitch while preserving design tokens and styling
- Uploading individual pages or routes from a running dev server as Stitch screens
- Frontend developers migrating projects to Stitch
- Design system maintainers converting code-based systems to Stitch
- Teams moving from React/Angular/Vue to Stitch-based workflows
- Developers wanting to iterate on existing web apps using Stitch's design tools
stitch::code-to-design FAQ
Either works. You can point to a running dev server (e.g., Vite, ng serve) or a built directory containing index.html and assets.
React + Vite, Next.js, Angular, Vue, and other frontend frameworks that produce standard HTML and CSS.
Yes. The extract-design-md skill analyzes theme files, stylesheets, and component definitions to create a complete design system in DESIGN.md.
Yes. Specify the route path (e.g., '/dashboard', '/settings/profile') as the screen title when uploading with upload-to-stitch.
Check that your dev server is running and accessible, or verify that your built application directory contains a valid index.html with all required assets.
Full instructions (SKILL.md)
Source of truth, from google-labs-code/stitch-skills.
name: stitch::code-to-design description: >- Convert frontend code (Vite, React, Angular, Vue, etc.) to a Stitch Design by chaining static HTML extraction, design system extraction, and file upload. ALWAYS use this skill when the user's intent is to move existing web apps or React/Angular/Vue components into Stitch (e.g., requests to "save", "migrate", or "upload"). You must use this skill even for simple "save" operations, as it is the only way to ensure the design system is extracted and assets are properly linked. allowed-tools:
- "stitch*:*"
- "Bash"
- "Read"
- "Write"
- "web_fetch"
Code to Design
Transform your existing frontend code (React + Vite, Next.js, Angular, Vue, etc.) into a Stitch Design so you can iterate and improve it using Stitch.
This skill orchestrates three other skills in sequence:
extract-static-html: Extract a single self-contained HTML file from your build output or running dev server (e.g., Vite dev server or Angular CLIng serve).extract-design-md: Analyze the source code (including Angularangular.json, external.htmltemplates, theme files, and components) to create a design system (DESIGN.md).upload-to-stitch: Upload that HTML file and the design system to your Stitch project.
Workflow
Follow these steps to convert your existing code.
Prerequisites
- A running local dev server (e.g.
npm run dev,ng serve) OR a built web application directory containingindex.htmland assets. - Target Stitch
projectId(uselist_projectsif unknown).
Steps
1. Extract Self-Contained HTML
Delegate to the extract-static-html skill to generate a standalone HTML file.
Read skills/extract-static-html/SKILL.md for detailed instructions and script usage.
Expected output: A single file like /path/to/extracted/standalone.html.
2. Verify HTML (Optional — User-Driven)
After extraction, inform the user of the output file path so they can manually verify in a browser if desired. Do not block on verification — proceed directly to Step 3.
If the user reports issues after reviewing, fix them before continuing.
3. Extract Design System (File)
Delegate to the extract-design-md skill to analyze the project's source files
(components, stylesheets, theme configs) and produce a design system. Read
skills/extract-design-md/SKILL.md for the
full analysis workflow.
Write .stitch/DESIGN.md following the extract-design-md skill's output
structure.
4. Upload DESIGN.md and Create Design System in Stitch
Delegate to the manage-design-system skill to upload the DESIGN.md and
create the design system in Stitch. Read
skills/manage-design-system/SKILL.md for
the full workflow (upload script usage, create_design_system_from_design_md
call, and required schemas). Pass
--generated-by 'stitch::code-to-design' when uploading.
5. Upload HTML to Stitch
Use the same upload-to-stitch skill's script to upload the extracted HTML file.
Read skills/upload-to-stitch/SKILL.md for detailed instructions and script usage.
You will need:
- The path to the standalone HTML file generated in Step 1.
- Your Stitch API Key (same key used in Step 4).
- The target
projectId. - The
--generated-byargument set to'stitch::extract-static-html'. - The
--titleargument set to the route path of the page (e.g.,'/dashboard','/settings/profile','/inbox') so that the screen name/title in Stitch clearly identifies its route in the application.
Related skills
More from google-labs-code/stitch-skills and the wider catalog.

stitch::extract-design-md
Extract a comprehensive design system (DESIGN.md) from frontend source code without building or rendering.

stitch::extract-static-html
Extract self-contained static HTML from web apps by inlining CSS and images.

stitch::generate-design
Generate and edit UI screens from text prompts, images, or mockups using Stitch MCP with design system integration.

stitch::manage-design-system
Manage design systems in Stitch to create a single source of truth for consistent UI across screens.

stitch::react-components
Convert Stitch designs to modular React components with automated validation and sync.

stitch::react-native
Convert Stitch HTML designs to production-ready React Native components with automatic theme extraction and syncing.