
Stitch Design
- 19 installs
- 7 repo stars
- Updated August 2, 2026
- practicalswan/agent-skills
stitch-design is a Claude Code skill for design & ui/ux.
About
stitch-design is a Claude Code skill for design & ui/ux. It helps solo builders move faster with AI-assisted development.
- stitch-design
- Design & UI/UX
- AI-coding skill
Stitch Design by the numbers
- 19 all-time installs (skills.sh)
- Ranked #1,383 of 1,880 Design & UI/UX skills by installs in the Skillselion catalog
- Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/practicalswan/agent-skills --skill stitch-designAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 19 |
|---|---|
| repo stars | ★ 7 |
| Last updated | August 2, 2026 |
| Repository | practicalswan/agent-skills ↗ |
How do I helps with design & ui/ux tasks.?
Helps with design & ui/ux tasks.
Who is it for?
Best when you're working on design & ui/ux and need structured help with stitch design.
Skip if: Teams with no design & ui/ux needs, or anyone wanting a generic chat assistant without this specific workflow.
When should I use this skill?
When you need to helps with design & ui/ux tasks., or when stitch-design is a claude code skill for design & ui/ux.
What you get
Structured output aligned to stitch-design: stitch-design, Design & UI/UX.
Files
Stitch Design
Comprehensive toolkit for Google Stitch projects — combining design system documentation, React component conversion, autonomous build loops, prompt engineering, video walkthroughs, and shadcn/ui component integration. Based on google-labs-code/stitch-skills.
- Leverage native parallel subagent dispatch and 200k+ context windows where available.
When to Use This Skill
Use symptom -> action triggers: when one matches, apply this skill and verify with the protocol below.
- Analyzing Stitch projects and generating DESIGN.md files
- Converting Stitch screens to modular React/TypeScript components
- Building multi-page websites autonomously via the Stitch build loop
- Enhancing vague UI prompts into Stitch-optimized structured prompts
- Creating walkthrough videos from Stitch projects using Remotion
- Integrating and customizing shadcn/ui components in React apps
---
Part 1: Design System Documentation (design-md)
Analyze Stitch project screens and synthesize a semantic design system into DESIGN.md.
Prerequisites
- Access to Stitch MCP Server
- A Stitch project with at least one designed screen
Workflow
1. Retrieval: Use Stitch MCP to fetch project screens, HTML code, and metadata 2. Extraction: Identify design tokens — colors, typography, spacing, component patterns 3. Translation: Convert CSS/Tailwind values into descriptive design language 4. Synthesis: Generate comprehensive DESIGN.md
Analysis Steps
1. Extract Project Identity — Title, Project ID from JSON 2. Define the Atmosphere — Evocative adjectives for mood (e.g., "Airy", "Minimalist") 3. Map Color Palette — Descriptive name + hex code + functional role 4. Translate Geometry & Shape — Corner roundness, spacing patterns 5. Describe Depth & Elevation — Shadows, layering
DESIGN.md Output Structure
**Project ID:** [ID]
## 1. Visual Theme & Atmosphere
## 2. Color Palette & Roles
## 3. Typography Rules
## 4. Component Stylings
## 5. Layout PrinciplesGuidelines
- Use descriptive design language, not technical jargon
- Include exact hex codes alongside descriptive names
- Explain the "why" behind design decisions
Pitfalls to Avoid
- Using raw CSS class names without translation
- Omitting color codes or using only descriptive names
- Being too vague in atmosphere descriptions
---
Part 2: React Component Conversion (react-components)
Convert Stitch screens into modular Vite and React component systems with AST-based validation.
Retrieval
1. Discover Stitch MCP prefix via list_tools 2. Fetch design JSON with get_screen 3. Download HTML using system-level curl for reliability 4. Check screenshot.downloadUrl for visual verification
Architectural Rules
- Modular components: Independent files, avoid monoliths
- Logic isolation: Event handlers in custom hooks (
src/hooks/) - Data decoupling: Static text/URLs in
src/data/mockData.ts - Type safety:
ReadonlyTypeScript interface for every component - Style mapping: Extract Tailwind config from HTML
<head>, use theme-mapped classes
Execution Steps
1. Environment setup: npm install if needed 2. Create src/data/mockData.ts from design content 3. Draft components using template, replace StitchComponent with actual names 4. Wire up in App.tsx 5. Quality check: run validation, verify against architecture checklist
Part 3: Build Loop (stitch-loop)
Autonomous baton-passing pattern for building complete multi-page websites.
Execution Protocol
1. Read the Baton — next-prompt.md contains current task 2. Consult Context Files — DESIGN.md for visual system, SITE.md for site constitution 3. Generate with Stitch — Create/edit screens using Stitch MCP 4. Integrate into Site — Move from queue/ to site/public/ 5. Update Site Documentation — Keep SITE.md current 6. Prepare Next Baton — Write new next-prompt.md for the next iteration
File Structure
project/
├── next-prompt.md # The baton — current task
├── stitch.json # Stitch project ID
├── DESIGN.md # Visual design system
├── SITE.md # Site vision, sitemap, roadmap
├── queue/ # Staging area for Stitch output
└── site/public/ # Production pages---
Part 4: Prompt Enhancement (enhance-prompt)
Transform vague UI ideas into polished, Stitch-optimized prompts.
Enhancement Pipeline
Step 1: Assess the Input
| Element | Check for | If missing... |
|---|---|---|
| Platform | "web", "mobile", "desktop" | Add based on context |
| Page type | "landing page", "dashboard" | Infer from description |
| Structure | Numbered sections | Create logical structure |
| Visual style | Adjectives, mood, vibe | Add appropriate descriptors |
| Colors | Specific values or roles | Add design system or suggest |
| Components | UI-specific terms | Translate to proper keywords |
Step 2: Check for DESIGN.md
- If exists: Extract color palette, typography, component styles
- If missing: Recommend creating one with the design-md workflow
Step 3: Apply Enhancements
- UI/UX Keywords: Replace vague terms with specific component names
- Amplify the Vibe: Add atmospheric adjectives
- Structure the Page: Create numbered section layout
- Format Colors: Use design system block
Step 4: Format the Output
- Stitch-optimized prompt with design system block and numbered structure
---
Part 5: Remotion Video Walkthroughs (remotion)
Generate walkthrough videos from Stitch projects using Remotion.
Prerequisites
- Stitch MCP Server and Remotion MCP Server (or CLI)
- Node.js and npm
Workflow
1. Gather Screen Assets — List screens, download screenshots, create manifest 2. Generate Remotion Components — ScreenSlide.tsx, WalkthroughComposition.tsx 3. Preview and Refine — Open Remotion Studio, adjust timing 4. Render Video — Produce final MP4
Video Architecture
- ScreenSlide.tsx: Individual screen with zoom/fade animations (3-5 sec per screen)
- WalkthroughComposition.tsx: Sequences slides with transitions
- config.ts: Frame rate (30fps), dimensions, duration calculation
File Structure
project/
├── video/
│ ├── src/
│ │ ├── WalkthroughComposition.tsx
│ │ ├── ScreenSlide.tsx
│ │ └── components/
│ ├── public/assets/screens/
│ └── remotion.config.ts
├── screens.json
└── output.mp4Advanced Features
- Dynamic text extraction from Stitch HTML
- Interactive hotspots for clickable elements
- Voiceover integration
- Multiple video patterns (slideshow, feature highlight, user flow)
---
Part 6: shadcn/ui Integration (shadcn-ui)
Expert guidance for integrating shadcn/ui components into React applications.
Core Principles
- Full ownership: Components in your codebase, not node_modules
- Complete customization: Modify styling, behavior, structure freely
- No version lock-in: Update selectively
- Zero runtime overhead: Just the code you need
Setup
npx shadcn@latest create
npx shadcn@latest init
npx shadcn@latest add button card dialogComponent Architecture
src/
├── components/
│ ├── ui/ # shadcn components (don't modify directly)
│ └── [custom]/ # your composed components
├── lib/
│ └── utils.ts # cn() utility
└── app/
└── page.tsxThe cn() Utility
import { clsx, type ClassValue } from "clsx"
import { twMerge } from "tailwind-merge"
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
}Customization
- Theme: Edit CSS variables in
globals.css - Variants: Use
class-variance-authority(cva) - Extending: Create wrapper components in
components/(notcomponents/ui/)
Available Components (50+)
- Layout: Accordion, Card, Separator, Tabs, Collapsible
- Forms: Button, Input, Label, Checkbox, Radio Group, Select, Textarea
- Data Display: Table, Badge, Avatar, Progress, Skeleton
- Overlays: Dialog, Sheet, Popover, Tooltip, Dropdown Menu
- Navigation: Navigation Menu, Breadcrumb, Pagination
- Feedback: Alert, Alert Dialog, Toast, Command
Best Practices
1. Keep ui/ pure — don't modify originals directly 2. Compose, don't fork — create wrapper components 3. Use the CLI for installation 4. Maintain cn() for all class merging 5. Preserve ARIA attributes and keyboard handlers 6. Test in light and dark modes
Troubleshooting
- Import errors: Check
components.jsonaliases andtsconfig.jsonpaths - Style conflicts: Ensure Tailwind config includes component paths
- Missing deps: Run CLI installation to auto-install dependencies
---
Anti-Patterns
- Starting from a generic template without adapting it: The output may look polished but still miss the real audience or medium.
- Ignoring final render or export review: Layout bugs often appear only after the asset is opened in its destination tool.
- Fixing content and presentation in one pass: It becomes hard to tell whether a problem is structural or visual.
Verification Protocol
Before claiming "skill applied successfully":
1. Pass/fail: The Stitch Design guidance is tied to a concrete route, component, screen, or design artifact. 2. Pass/fail: Component states cover loading, empty, error, success, and responsive breakpoints where applicable. 3. Pass/fail: Accessibility, visual hierarchy, and interaction behavior are reviewed against the shared component rubric. 4. Pressure-test scenario: Review the component on a narrow mobile viewport, keyboard-only path, and slow-loading state. 5. Success metric: Zero generic UI approval; every approval cites rendered behavior or source evidence.
References & Resources
Documentation
- Stitch MCP Commands — All 5 Stitch MCP commands with parameters and workflow patterns
- shadcn/ui Components — 40+ components with CSS variable theming and composite patterns
Scripts
- Stitch to React — PowerShell script to set up Vite+React+TypeScript+Tailwind+shadcn projects
Examples
- Design System Example — Complete DESIGN.md example generated from Stitch screen data
---
<!-- PORTABILITY:START -->
Cross-Client Portability
This skill is written to stay usable across GitHub Copilot, Claude Code, Codex, and Gemini CLI.
- GitHub Copilot: keep the folder in a Copilot-visible skill or plugin path, or wrap the workflow as project instructions if the host does not support portable skill folders directly.
- Claude Code: keep the folder in a local skills directory or a compatible plugin or marketplace source.
- Codex: install or sync the folder into
$CODEX_HOME/skills/<skill-name>and restart Codex after major changes. - Gemini CLI: this repository generates a project command named
/skills:stitch-designfrom this skill. Rebuild commands withpython scripts/export-gemini-skill.py stitch-designand then run/commands reloadinside Gemini CLI.
<!-- PORTABILITY:END -->
<!-- MCP:START -->
MCP Availability And Fallback
Preferred MCP Server: Stitch MCP
- Fallback prompt: "Use the Stitch Design skill without MCP. Rely on the local
SKILL.md, bundled references or scripts, and manual verification. Show the exact commands, evidence, and final checks you used before concluding." - Use screenshots, HTML prototypes, Figma exports, and local design notes when Stitch MCP is not exposed by the host.
- Treat generated React or design assets as drafts that still need local browser verification.
<!-- MCP:END -->
Related Skills
- frontend-design: Use it when the workflow also needs UI composition and front-end design direction.
- premium-frontend-ui: Use it when the workflow also needs high-fidelity UI polish and interaction detail.
- web-design-reviewer: Use it when the workflow also needs browser-based UI review and responsive QA.
- canvas-design: Use it when the workflow also needs visual composition and presentation-ready diagram work.
Changelog
[2026-04-25] - Version 1.2 Verification Protocol Refresh
Added
- Added a
Verification Protocolsection with skill-specific pass/fail checks, one pressure-test scenario, and a measurable success metric. - Added guidance to leverage native parallel subagent dispatch and 200k+ context windows where available.
Changed
- Updated
SKILL.mdfrontmatter toversion: "1.2"andlast_updated: 2026-04-25. - Reframed activation guidance toward symptom -> action triggers and standardized two-stage review wording where applicable.
[2026-04-24] - Version 1.1 Refresh
Changed
- Updated the SKILL frontmatter version to
1.1for the 2026-04-24 catalog refresh.
[2026-04-24] - Skill Refresh
Changed
- Standardized the SKILL frontmatter with version metadata, last-updated date, tags, and a concise catalog description.
- Reformatted the portability and MCP guidance with a preferred server line, a copy-paste fallback prompt, and consistent bullet lists.
- Added a catalog-standard Anti-Patterns section and refreshed the Related Skills links at the end of the skill.
[2026-04-24] - Catalog Audit Cleanup
Fixed
- Removed obsolete standalone Skill Paths guidance that duplicated the generated portability section.
All notable changes to this skill will be documented in this file.
[2026-04-04] - Cross-Client Portability Refresh
Changed
- Added a standard portability note covering GitHub Copilot, Claude Code, Codex, and Gemini CLI.
- Documented the preferred MCP server surface for this skill and a local no-MCP fallback workflow.
Tested
- Validated
SKILL.mdfrontmatter, portability sections, and Gemini export readiness withpython scripts/validate-skills.py.
[2026-03-09] - Workspace Modernization
Added
- Added a 2026-03-09 maintenance entry after reviewing the skill; the existing structure and guidance remained suitable.
[2026-02-28] — Description Rewrite & Cross-References
Changed
- Rewrote skill description to ~200 characters with clear, specific activation keywords
- Improved keyword specificity to reduce overlap with related skills
Added
## Related Skillscross-reference table with 2-4 related skills and "Use When" guidance
Design System Example: FoodieHub
Complete example showing how to generate a DESIGN.md from Stitch project screen data.
---
Step 1: Raw Stitch Screen Data
After calling mcp_stitch_list_screens for the FoodieHub project, the response includes HTML for each screen. Below is a simplified extraction of design-relevant data from three screens.
Screen: Home Page (Desktop)
<div class="min-h-screen bg-white">
<!-- Nav -->
<nav class="flex items-center justify-between px-8 py-4 border-b border-gray-200">
<span class="text-2xl font-bold text-orange-600">FoodieHub</span>
<div class="flex gap-6">
<a class="text-sm font-medium text-gray-700 hover:text-orange-600">Recipes</a>
<a class="text-sm font-medium text-gray-700 hover:text-orange-600">Meal Plans</a>
<a class="text-sm font-medium text-gray-700 hover:text-orange-600">Community</a>
</div>
<button class="px-4 py-2 bg-orange-600 text-white rounded-lg text-sm font-medium">Sign In</button>
</nav>
<!-- Hero -->
<section class="px-8 py-16 bg-gradient-to-r from-orange-50 to-amber-50 text-center">
<h1 class="text-5xl font-bold text-gray-900 mb-4">Discover Delicious Recipes</h1>
<p class="text-lg text-gray-600 max-w-xl mx-auto">Find, save, and share your favorite meals.</p>
<div class="mt-8 flex gap-4 justify-center">
<input class="px-4 py-3 rounded-lg border border-gray-300 w-80 text-sm" placeholder="Search recipes..." />
<button class="px-6 py-3 bg-orange-600 text-white rounded-lg font-medium">Search</button>
</div>
</section>
<!-- Recipe Cards Grid -->
<section class="px-8 py-12 grid grid-cols-3 gap-6">
<div class="rounded-xl border border-gray-200 overflow-hidden shadow-sm hover:shadow-md transition-shadow">
<img class="w-full h-48 object-cover" src="pasta.jpg" />
<div class="p-4">
<span class="text-xs font-medium px-2 py-1 bg-green-100 text-green-700 rounded-full">Vegetarian</span>
<h3 class="text-lg font-semibold text-gray-900 mt-2">Creamy Pesto Pasta</h3>
<p class="text-sm text-gray-500 mt-1">30 min · Easy · 4 servings</p>
<div class="flex items-center gap-2 mt-3">
<img class="w-6 h-6 rounded-full" src="avatar.jpg" />
<span class="text-xs text-gray-500">Chef Maria</span>
</div>
</div>
</div>
</section>
</div>Screen: Recipe Detail (Desktop)
<div class="max-w-4xl mx-auto px-8 py-8">
<img class="w-full h-80 rounded-2xl object-cover" src="detail.jpg" />
<h1 class="text-3xl font-bold text-gray-900 mt-6">Creamy Pesto Pasta</h1>
<div class="flex gap-4 mt-3">
<span class="text-sm text-gray-500">⏱ 30 min</span>
<span class="text-sm text-gray-500">👤 4 servings</span>
<span class="text-sm text-gray-500">📊 Easy</span>
</div>
<div class="flex gap-2 mt-4">
<button class="px-4 py-2 bg-orange-600 text-white rounded-lg text-sm">Save Recipe</button>
<button class="px-4 py-2 border border-gray-300 text-gray-700 rounded-lg text-sm">Share</button>
</div>
<!-- Ingredients & Steps in 2-column layout -->
<div class="grid grid-cols-3 gap-8 mt-8">
<div class="col-span-1 bg-orange-50 rounded-xl p-6">
<h2 class="text-lg font-semibold text-gray-900 mb-4">Ingredients</h2>
<ul class="space-y-2 text-sm text-gray-700">...</ul>
</div>
<div class="col-span-2">
<h2 class="text-lg font-semibold text-gray-900 mb-4">Instructions</h2>
<ol class="space-y-4 text-sm text-gray-700">...</ol>
</div>
</div>
</div>Screen: Profile Page (Desktop)
<div class="max-w-4xl mx-auto px-8 py-8">
<div class="flex items-center gap-6">
<img class="w-20 h-20 rounded-full border-2 border-orange-200" src="profile.jpg" />
<div>
<h1 class="text-2xl font-bold text-gray-900">Chef Maria</h1>
<p class="text-sm text-gray-500">Food blogger · 127 recipes · 4.2k followers</p>
</div>
<button class="ml-auto px-4 py-2 bg-orange-600 text-white rounded-lg text-sm">Follow</button>
</div>
<div class="mt-8 border-b border-gray-200">
<div class="flex gap-8">
<button class="pb-3 border-b-2 border-orange-600 text-sm font-medium text-orange-600">Recipes</button>
<button class="pb-3 text-sm font-medium text-gray-500">Meal Plans</button>
<button class="pb-3 text-sm font-medium text-gray-500">Saved</button>
</div>
</div>
</div>---
Step 2: Extracted Design Tokens
From the screen HTML above, the following tokens are extracted:
Colors
| Source Class | Hex | Role |
|---|---|---|
text-orange-600, bg-orange-600 | #EA580C | Primary brand / CTA |
bg-orange-50, from-orange-50 | #FFF7ED | Primary tint / hero background |
bg-amber-50 | #FFFBEB | Warm accent background |
bg-green-100, text-green-700 | #DCFCE7 / #15803D | Vegetarian/success tag |
text-gray-900 | #111827 | Heading text |
text-gray-700 | #374151 | Body text |
text-gray-500 | #6B7280 | Secondary/muted text |
text-gray-300, border-gray-300 | #D1D5DB | Borders, input outlines |
border-gray-200 | #E5E7EB | Dividers, card borders |
bg-white | #FFFFFF | Page background |
Typography
| Element | Classes | Size | Weight |
|---|---|---|---|
| Logo | text-2xl font-bold | 1.5rem | 700 |
| Hero H1 | text-5xl font-bold | 3rem | 700 |
| Page H1 | text-3xl font-bold | 1.875rem | 700 |
| Section H2 | text-lg font-semibold | 1.125rem | 600 |
| Card Title | text-lg font-semibold | 1.125rem | 600 |
| Body | text-sm | 0.875rem | 400 |
| Caption | text-xs | 0.75rem | 400/500 |
| Nav Link | text-sm font-medium | 0.875rem | 500 |
Border Radius
| Usage | Class | Value |
|---|---|---|
| Buttons | rounded-lg | 0.5rem |
| Cards | rounded-xl | 0.75rem |
| Hero image | rounded-2xl | 1rem |
| Tags | rounded-full | 9999px |
| Avatars | rounded-full | 9999px |
Shadows
| Usage | Class | Description |
|---|---|---|
| Card default | shadow-sm | Subtle elevation |
| Card hover | shadow-md | Medium elevation on interaction |
---
Step 3: Generated DESIGN.md
# FoodieHub — Design System
> Design tokens and component patterns extracted from the FoodieHub Stitch project.
## Brand Identity
- **Name:** FoodieHub
- **Tagline:** Discover Delicious Recipes
- **Personality:** Warm, appetizing, approachable, community-driven
## Color Palette
### Primary
| Name | Hex | HSL | Usage |
|------|-----|-----|-------|
| Orange 600 | `#EA580C` | 25 93% 48% | Primary buttons, links, active tabs, brand color |
| Orange 50 | `#FFF7ED` | 33 100% 96% | Hero backgrounds, ingredient panels, light tints |
| Amber 50 | `#FFFBEB` | 48 100% 96% | Gradient pair for hero section |
### Neutral
| Name | Hex | Usage |
|------|-----|-------|
| Gray 900 | `#111827` | Headings, primary text |
| Gray 700 | `#374151` | Body text, nav links |
| Gray 500 | `#6B7280` | Secondary text, metadata |
| Gray 300 | `#D1D5DB` | Input borders, outlines |
| Gray 200 | `#E5E7EB` | Dividers, card borders |
| White | `#FFFFFF` | Page background, card backgrounds |
### Semantic
| Name | Hex | Usage |
|------|-----|-------|
| Green 700 | `#15803D` | Success, vegetarian tags |
| Green 100 | `#DCFCE7` | Tag backgrounds |
### CSS Variables (shadcn/ui mapping)
:root { --primary: 25 93% 48%; / Orange 600 / --primary-foreground: 0 0% 100%; --secondary: 33 100% 96%; / Orange 50 / --secondary-foreground: 25 93% 48%; --background: 0 0% 100%; --foreground: 222 47% 11%; / Gray 900 / --muted: 220 13% 91%; / Gray 200 / --muted-foreground: 220 9% 46%;/ Gray 500 / --accent: 48 100% 96%; / Amber 50 / --accent-foreground: 222 47% 11%; --destructive: 0 84% 60%; --border: 220 13% 91%; --input: 220 13% 87%; --ring: 25 93% 48%; --radius: 0.5rem; }
## Typography
**Font Family:** System default (Inter recommended for production)
| Scale | Size | Weight | Line Height | Usage |
|-------|------|--------|-------------|-------|
| Display | 3rem (48px) | Bold (700) | 1.1 | Hero headlines |
| H1 | 1.875rem (30px) | Bold (700) | 1.2 | Page titles |
| H2 | 1.5rem (24px) | Semibold (600) | 1.3 | Section headings |
| H3 | 1.125rem (18px) | Semibold (600) | 1.4 | Card titles, subsections |
| Body | 0.875rem (14px) | Regular (400) | 1.5 | Paragraphs, descriptions |
| Caption | 0.75rem (12px) | Medium (500) | 1.4 | Tags, metadata, timestamps |
## Component Styles
### Buttons
| Variant | Background | Text | Border | Radius | Padding |
|---------|-----------|------|--------|--------|---------|
| Primary | Orange 600 | White | None | 0.5rem | 16px 24px |
| Secondary/Outline | White | Gray 700 | Gray 300 1px | 0.5rem | 16px 24px |
| Ghost (nav link) | Transparent | Gray 700 → Orange 600 on hover | None | — | — |
### Cards
- **Border:** 1px Gray 200
- **Radius:** 0.75rem (rounded-xl)
- **Shadow:** shadow-sm default, shadow-md on hover
- **Transition:** `transition-shadow` for smooth hover effect
- **Image:** Full-width, h-48, object-cover, overflow-hidden
- **Padding:** 1rem (16px) on content area
### Tags/Badges
- **Radius:** rounded-full (pill shape)
- **Padding:** 4px 8px
- **Font:** text-xs font-medium
- **Variants:**
- Vegetarian: Green 100 bg + Green 700 text
- Default: Gray 100 bg + Gray 600 text
### Navigation
- **Desktop:** Horizontal flex, gap-6, text-sm font-medium
- **Active tab:** border-b-2 border-orange-600, text-orange-600
- **Inactive tab:** text-gray-500
- **Top bar:** border-b border-gray-200, px-8 py-4
### Forms
- **Input:** px-4 py-3, rounded-lg, border border-gray-300
- **Placeholder:** text-sm, gray-400
- **Focus:** ring-2 ring-orange-600 (recommended)
### Profile/Avatar
- **Size:** w-20 h-20 (large), w-6 h-6 (inline)
- **Shape:** rounded-full
- **Border:** 2px orange-200 (profile), none (inline)
## Layout Principles
- **Max width:** max-w-4xl for content pages, full-width for home
- **Horizontal padding:** px-8 (32px) on all sections
- **Section spacing:** py-12 to py-16 between major sections
- **Grid:** 3-column for card grids, 1/3 + 2/3 for detail pages
- **Responsive breakpoints:** md (768px) for 2-col, lg (1024px) for 3-col
## Spacing Scale
| Token | Value | Usage |
|-------|-------|-------|
| xs | 4px | Tight gaps within elements |
| sm | 8px | Tag padding, tight spacing |
| md | 16px | Card padding, section inner spacing |
| lg | 24px | Component gaps, grid gaps |
| xl | 32px | Page horizontal padding |
| 2xl | 48px | Section vertical padding |
| 3xl | 64px | Hero vertical padding |---
Summary
This example demonstrates the full workflow:
1. Fetch Stitch screens with mcp_stitch_list_screens 2. Extract design tokens from HTML classes and inline styles 3. Map Tailwind classes to concrete values (hex, rem, px) 4. Organize into a structured DESIGN.md with sections for colors, typography, components, layout, and spacing 5. Include CSS variable definitions for shadcn/ui theming
MIT License
Copyright (c) 2026 Sithu Win San
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
shadcn/ui Component Integration Reference
Reference for shadcn/ui components, installation, customization, and common integration patterns.
Installation
Project Setup
# Initialize shadcn/ui in an existing Vite + React + TypeScript project
npx shadcn-ui@latest init
# Follow prompts:
# Style: Default or New York
# Base color: Slate, Gray, Zinc, Neutral, Stone
# CSS variables: Yes (recommended)Adding Components
# Add individual components
npx shadcn-ui@latest add button
npx shadcn-ui@latest add card
npx shadcn-ui@latest add dialog
# Add multiple at once
npx shadcn-ui@latest add button card dialog input label---
Available Components
Layout & Container
| Component | Install Command | Description |
|---|---|---|
| Card | npx shadcn-ui@latest add card | Container with header, content, footer sections |
| Sheet | npx shadcn-ui@latest add sheet | Slide-out panel from any edge |
| Separator | npx shadcn-ui@latest add separator | Visual divider (horizontal/vertical) |
| ScrollArea | npx shadcn-ui@latest add scroll-area | Custom scrollable container |
| Collapsible | npx shadcn-ui@latest add collapsible | Expandable/collapsible content section |
| Resizable | npx shadcn-ui@latest add resizable | Resizable panel groups |
Form & Input
| Component | Install Command | Description |
|---|---|---|
| Button | npx shadcn-ui@latest add button | Button with variants: default, destructive, outline, secondary, ghost, link |
| Input | npx shadcn-ui@latest add input | Text input field |
| Label | npx shadcn-ui@latest add label | Accessible form label |
| Textarea | npx shadcn-ui@latest add textarea | Multi-line text input |
| Select | npx shadcn-ui@latest add select | Dropdown select with search |
| Checkbox | npx shadcn-ui@latest add checkbox | Checkbox with label |
| RadioGroup | npx shadcn-ui@latest add radio-group | Radio button group |
| Switch | npx shadcn-ui@latest add switch | Toggle switch |
| Slider | npx shadcn-ui@latest add slider | Range slider |
| Form | npx shadcn-ui@latest add form | Form wrapper with react-hook-form + zod validation |
| InputOTP | npx shadcn-ui@latest add input-otp | One-time password input |
Data Display
| Component | Install Command | Description |
|---|---|---|
| Table | npx shadcn-ui@latest add table | Styled HTML table |
| Badge | npx shadcn-ui@latest add badge | Status/category labels |
| Avatar | npx shadcn-ui@latest add avatar | User avatar with fallback |
| Calendar | npx shadcn-ui@latest add calendar | Date picker calendar |
| Skeleton | npx shadcn-ui@latest add skeleton | Loading placeholder |
| Progress | npx shadcn-ui@latest add progress | Progress bar |
Overlay & Feedback
| Component | Install Command | Description |
|---|---|---|
| Dialog | npx shadcn-ui@latest add dialog | Modal dialog |
| AlertDialog | npx shadcn-ui@latest add alert-dialog | Confirmation dialog |
| Popover | npx shadcn-ui@latest add popover | Floating content panel |
| Tooltip | npx shadcn-ui@latest add tooltip | Hover tooltip |
| Toast | npx shadcn-ui@latest add toast | Notification toasts |
| Alert | npx shadcn-ui@latest add alert | Inline alert message |
| Sonner | npx shadcn-ui@latest add sonner | Toast notifications (sonner-based) |
Navigation
| Component | Install Command | Description |
|---|---|---|
| Tabs | npx shadcn-ui@latest add tabs | Tabbed interface |
| NavigationMenu | npx shadcn-ui@latest add navigation-menu | Site navigation |
| Menubar | npx shadcn-ui@latest add menubar | Horizontal menu bar |
| DropdownMenu | npx shadcn-ui@latest add dropdown-menu | Dropdown with items, separators, sub-menus |
| ContextMenu | npx shadcn-ui@latest add context-menu | Right-click context menu |
| Command | npx shadcn-ui@latest add command | Command palette (⌘K style) |
| Breadcrumb | npx shadcn-ui@latest add breadcrumb | Breadcrumb navigation |
| Pagination | npx shadcn-ui@latest add pagination | Page navigation |
---
Theming with CSS Variables
Setup in src/index.css
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
:root {
--background: 0 0% 100%;
--foreground: 222.2 84% 4.9%;
--card: 0 0% 100%;
--card-foreground: 222.2 84% 4.9%;
--popover: 0 0% 100%;
--popover-foreground: 222.2 84% 4.9%;
--primary: 222.2 47.4% 11.2%;
--primary-foreground: 210 40% 98%;
--secondary: 210 40% 96.1%;
--secondary-foreground: 222.2 47.4% 11.2%;
--muted: 210 40% 96.1%;
--muted-foreground: 215.4 16.3% 46.9%;
--accent: 210 40% 96.1%;
--accent-foreground: 222.2 47.4% 11.2%;
--destructive: 0 84.2% 60.2%;
--destructive-foreground: 210 40% 98%;
--border: 214.3 31.8% 91.4%;
--input: 214.3 31.8% 91.4%;
--ring: 222.2 84% 4.9%;
--radius: 0.5rem;
}
.dark {
--background: 222.2 84% 4.9%;
--foreground: 210 40% 98%;
--card: 222.2 84% 4.9%;
--card-foreground: 210 40% 98%;
--primary: 210 40% 98%;
--primary-foreground: 222.2 47.4% 11.2%;
--secondary: 217.2 32.6% 17.5%;
--secondary-foreground: 210 40% 98%;
--muted: 217.2 32.6% 17.5%;
--muted-foreground: 215 20.2% 65.1%;
--accent: 217.2 32.6% 17.5%;
--accent-foreground: 210 40% 98%;
--destructive: 0 62.8% 30.6%;
--destructive-foreground: 210 40% 98%;
--border: 217.2 32.6% 17.5%;
--input: 217.2 32.6% 17.5%;
--ring: 212.7 26.8% 83.9%;
}
}Customizing Colors
Override CSS variables to match a Stitch design's color palette:
:root {
/* Map Stitch design tokens to shadcn variables */
--primary: 24 95% 53%; /* Orange from Stitch palette */
--primary-foreground: 0 0% 100%;
--accent: 142 71% 45%; /* Green accent */
--accent-foreground: 0 0% 100%;
--radius: 0.75rem; /* Match Stitch border-radius */
}---
Common UI Patterns
Data Table with Sorting and Filtering
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"
import { Input } from "@/components/ui/input"
import { Button } from "@/components/ui/button"
import { Badge } from "@/components/ui/badge"
function DataTable({ data, columns }) {
const [filter, setFilter] = useState("")
const [sortKey, setSortKey] = useState(null)
const filtered = data.filter(row =>
Object.values(row).some(v => String(v).toLowerCase().includes(filter.toLowerCase()))
)
return (
<div className="space-y-4">
<Input placeholder="Filter..." value={filter} onChange={e => setFilter(e.target.value)} />
<Table>
<TableHeader>
<TableRow>
{columns.map(col => (
<TableHead key={col.key} onClick={() => setSortKey(col.key)} className="cursor-pointer">
{col.label}
</TableHead>
))}
</TableRow>
</TableHeader>
<TableBody>
{filtered.map(row => (
<TableRow key={row.id}>
{columns.map(col => (
<TableCell key={col.key}>{row[col.key]}</TableCell>
))}
</TableRow>
))}
</TableBody>
</Table>
</div>
)
}Command Palette
import { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "@/components/ui/command"
function CommandPalette({ open, onOpenChange, items }) {
return (
<CommandDialog open={open} onOpenChange={onOpenChange}>
<CommandInput placeholder="Type a command or search..." />
<CommandList>
<CommandEmpty>No results found.</CommandEmpty>
<CommandGroup heading="Actions">
{items.map(item => (
<CommandItem key={item.id} onSelect={item.onSelect}>
{item.icon} {item.label}
</CommandItem>
))}
</CommandGroup>
</CommandList>
</CommandDialog>
)
}Multi-Step Form
import { Card, CardContent, CardFooter, CardHeader, CardTitle } from "@/components/ui/card"
import { Button } from "@/components/ui/button"
import { Progress } from "@/components/ui/progress"
function MultiStepForm({ steps }) {
const [current, setCurrent] = useState(0)
const progress = ((current + 1) / steps.length) * 100
return (
<Card className="max-w-lg mx-auto">
<CardHeader>
<CardTitle>{steps[current].title}</CardTitle>
<Progress value={progress} className="mt-2" />
</CardHeader>
<CardContent>{steps[current].component}</CardContent>
<CardFooter className="flex justify-between">
<Button variant="outline" onClick={() => setCurrent(c => c - 1)} disabled={current === 0}>
Previous
</Button>
<Button onClick={() => setCurrent(c => c + 1)} disabled={current === steps.length - 1}>
{current === steps.length - 1 ? "Submit" : "Next"}
</Button>
</CardFooter>
</Card>
)
}Dashboard Layout
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"
function DashboardLayout({ stats, charts, tables }) {
return (
<div className="space-y-6 p-6">
{/* Stats Row */}
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">
{stats.map(stat => (
<Card key={stat.label}>
<CardHeader className="pb-2">
<CardTitle className="text-sm font-medium text-muted-foreground">{stat.label}</CardTitle>
</CardHeader>
<CardContent>
<div className="text-2xl font-bold">{stat.value}</div>
<p className="text-xs text-muted-foreground">{stat.change}</p>
</CardContent>
</Card>
))}
</div>
{/* Tabbed Content */}
<Tabs defaultValue="overview">
<TabsList>
<TabsTrigger value="overview">Overview</TabsTrigger>
<TabsTrigger value="analytics">Analytics</TabsTrigger>
<TabsTrigger value="reports">Reports</TabsTrigger>
</TabsList>
<TabsContent value="overview">{charts}</TabsContent>
<TabsContent value="analytics">{tables}</TabsContent>
<TabsContent value="reports">Report content</TabsContent>
</Tabs>
</div>
)
}---
Stitch-to-shadcn Mapping
When converting Stitch screen designs to shadcn/ui components:
| Stitch Element | shadcn/ui Component | Notes |
|---|---|---|
| Hero section | Card with large padding | Use CardHeader + CardContent |
| Navigation bar | NavigationMenu or Sheet (mobile) | Combine with Button for actions |
| Grid of items | Card in CSS Grid | grid grid-cols-1 md:grid-cols-3 gap-4 |
| Form fields | Form + Input + Label | Use react-hook-form + zod for validation |
| Modal/popup | Dialog or AlertDialog | AlertDialog for confirmations |
| Sidebar | Sheet (side="left") | Or custom sidebar with Collapsible |
| Data list | Table | Add sorting/filtering as needed |
| Status label | Badge | Variants: default, secondary, destructive, outline |
| Loading state | Skeleton | Match layout shape of real content |
| Notification | Toast or Sonner | Sonner for stacked notifications |
Stitch MCP Command Reference
Quick reference for all Stitch MCP tools available for design project management and screen generation.
Commands
mcp_stitch_list_projects
Lists all Stitch projects accessible to the user.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
filter | string | No | AIP-160 filter. view=owned (default), view=shared |
Response Format:
{
"projects": [
{
"name": "projects/4044680601076201931",
"projectId": "4044680601076201931",
"title": "My Design Project",
"createTime": "2025-01-15T10:30:00Z",
"updateTime": "2025-02-01T14:20:00Z"
}
]
}Usage Examples:
// List your own projects
mcp_stitch_list_projects()
// List projects shared with you
mcp_stitch_list_projects({ filter: "view=shared" })---
mcp_stitch_get_project
Retrieves detailed information about a specific project by name or title.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectName | string | Yes | Project title or full resource name |
Response Format:
{
"name": "projects/4044680601076201931",
"projectId": "4044680601076201931",
"title": "FoodieHub",
"screens": [...],
"createTime": "2025-01-15T10:30:00Z"
}Usage Examples:
// Get project by title
mcp_stitch_get_project({ projectName: "FoodieHub" })---
mcp_stitch_list_screens
Lists all screens within a specified project.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | Project ID (numeric, without projects/ prefix) |
Response Format:
{
"screens": [
{
"screenId": "98b50e2ddc9943efb387052637738f61",
"name": "Home Page",
"deviceType": "DESKTOP",
"html": "<div>...</div>",
"imageUrl": "https://..."
}
]
}Usage Examples:
// List all screens in a project
mcp_stitch_list_screens({ projectId: "4044680601076201931" })---
mcp_stitch_create_project
Creates a new Stitch project container for UI designs.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
title | string | No | Project title |
Response Format:
{
"name": "projects/5678901234567890123",
"projectId": "5678901234567890123",
"title": "New Project"
}Usage Examples:
mcp_stitch_create_project({ title: "E-Commerce Redesign" })---
mcp_stitch_edit_screens
Edits existing screens using a text prompt. Can take several minutes to complete.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | Project ID (without projects/ prefix) |
selectedScreenIds | string[] | Yes | Screen IDs to edit (without screens/ prefix) |
prompt | string | Yes | Text prompt describing desired changes |
deviceType | string | No | MOBILE, DESKTOP, TABLET, AGNOSTIC |
modelId | string | No | GEMINI_3_PRO or GEMINI_3_FLASH |
Usage Examples:
mcp_stitch_edit_screens({
projectId: "4044680601076201931",
selectedScreenIds: ["98b50e2ddc9943efb387052637738f61"],
prompt: "Add a dark mode toggle in the top navigation bar",
deviceType: "DESKTOP"
})Warning: This action can take several minutes. Do NOT retry on timeout.
---
Workflow Patterns
Discovery Workflow
Standard approach for exploring a Stitch workspace:
Step 1: List all projects
mcp_stitch_list_projects()
Step 2: Get project details (use title from step 1)
mcp_stitch_get_project({ projectName: "FoodieHub" })
Step 3: List screens (use projectId from step 2)
mcp_stitch_list_screens({ projectId: "4044680601076201931" })
Step 4: Extract design tokens from screen HTML/JSON
Parse colors, fonts, spacing from the screen response dataDesign Token Extraction
When screen data is returned, extract design tokens from the HTML content:
1. Colors:
- Search for hex codes (#RRGGBB), rgb(), hsl() values
- Look for Tailwind classes (bg-*, text-*, border-*)
- Map to semantic roles (primary, secondary, accent, background)
2. Typography:
- Extract font-family declarations
- Identify heading sizes (text-xs through text-9xl)
- Note font-weight patterns
3. Spacing:
- Identify padding/margin patterns (p-*, m-*, gap-*)
- Map to a consistent spacing scale
4. Components:
- Identify recurring UI patterns (cards, buttons, nav items)
- Note border-radius, shadow, and border patternsIterative Edit Loop
For autonomous multi-screen editing:
1. List screens to get current state
2. Identify screens needing changes
3. Edit screens with specific prompt
4. Wait for completion (do not retry)
5. List screens again to verify changes
6. Repeat if further adjustments neededTips for Reliable Data Extraction
- Always list projects first before attempting to get a specific project
- Store project IDs — use the numeric ID, not the full resource name
- Screen IDs have no prefix — strip
screens/if present in any response - HTML parsing — screen HTML can be large; focus on extracting class names and inline styles for design tokens
- Timeout handling —
edit_screensis slow; never retry a timed-out call, check the project state instead - Device types — always specify
deviceTypefor consistent output;DESKTOPis safest for full layouts - Model selection —
GEMINI_3_PROproduces higher quality;GEMINI_3_FLASHis faster for iterative edits
<#
.SYNOPSIS
Sets up a React project for Stitch component conversion.
.DESCRIPTION
Creates a Vite + React + TypeScript project, installs Tailwind CSS and
shadcn/ui, scaffolds the recommended directory structure, and generates
starter files (mockData.ts, App.tsx).
.PARAMETER ProjectName
Name of the project directory to create. Defaults to "stitch-app".
.EXAMPLE
.\stitch-to-react.ps1 -ProjectName "FoodieHub"
#>
param(
[Parameter(Position = 0)]
[string]$ProjectName = "stitch-app"
)
$ErrorActionPreference = "Stop"
Write-Host "`n=== Stitch-to-React Project Setup ===" -ForegroundColor Cyan
Write-Host "Project: $ProjectName`n"
# Step 1: Create Vite + React + TypeScript project
Write-Host "[1/6] Creating Vite project..." -ForegroundColor Yellow
npm create vite@latest $ProjectName -- --template react-ts
Set-Location $ProjectName
# Step 2: Install dependencies
Write-Host "[2/6] Installing base dependencies..." -ForegroundColor Yellow
npm install
# Step 3: Install Tailwind CSS
Write-Host "[3/6] Installing Tailwind CSS..." -ForegroundColor Yellow
npm install -D tailwindcss @tailwindcss/vite
# Create Tailwind config
$tailwindContent = @"
import tailwindcss from '@tailwindcss/vite'
import react from '@vitejs/plugin-react'
import path from 'path'
import { defineConfig } from 'vite'
export default defineConfig({
plugins: [react(), tailwindcss()],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
})
"@
Set-Content -Path "vite.config.ts" -Value $tailwindContent
# Update CSS entry point
$cssContent = @"
@import "tailwindcss";
@layer base {
:root {
--background: 0 0% 100%;
--foreground: 222.2 84% 4.9%;
--card: 0 0% 100%;
--card-foreground: 222.2 84% 4.9%;
--popover: 0 0% 100%;
--popover-foreground: 222.2 84% 4.9%;
--primary: 222.2 47.4% 11.2%;
--primary-foreground: 210 40% 98%;
--secondary: 210 40% 96.1%;
--secondary-foreground: 222.2 47.4% 11.2%;
--muted: 210 40% 96.1%;
--muted-foreground: 215.4 16.3% 46.9%;
--accent: 210 40% 96.1%;
--accent-foreground: 222.2 47.4% 11.2%;
--destructive: 0 84.2% 60.2%;
--destructive-foreground: 210 40% 98%;
--border: 214.3 31.8% 91.4%;
--input: 214.3 31.8% 91.4%;
--ring: 222.2 84% 4.9%;
--radius: 0.5rem;
}
.dark {
--background: 222.2 84% 4.9%;
--foreground: 210 40% 98%;
--card: 222.2 84% 4.9%;
--card-foreground: 210 40% 98%;
--primary: 210 40% 98%;
--primary-foreground: 222.2 47.4% 11.2%;
--secondary: 217.2 32.6% 17.5%;
--secondary-foreground: 210 40% 98%;
--muted: 217.2 32.6% 17.5%;
--muted-foreground: 215 20.2% 65.1%;
--accent: 217.2 32.6% 17.5%;
--accent-foreground: 210 40% 98%;
--destructive: 0 62.8% 30.6%;
--destructive-foreground: 210 40% 98%;
--border: 217.2 32.6% 17.5%;
--input: 217.2 32.6% 17.5%;
--ring: 212.7 26.8% 83.9%;
}
}
@layer base {
* {
@apply border-border;
}
body {
@apply bg-background text-foreground;
}
}
"@
Set-Content -Path "src/index.css" -Value $cssContent
# Step 4: Install shadcn/ui dependencies
Write-Host "[4/6] Installing shadcn/ui dependencies..." -ForegroundColor Yellow
npm install tailwind-merge clsx class-variance-authority lucide-react
npm install -D @types/node
# Create lib/utils.ts for cn() helper
New-Item -ItemType Directory -Path "src/lib" -Force | Out-Null
$utilsContent = @"
import { type ClassValue, clsx } from "clsx"
import { twMerge } from "tailwind-merge"
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
}
"@
Set-Content -Path "src/lib/utils.ts" -Value $utilsContent
# Create tsconfig path aliases
$tsconfigContent = @"
{
"files": [],
"references": [
{ "path": "./tsconfig.app.json" },
{ "path": "./tsconfig.node.json" }
],
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
}
}
"@
Set-Content -Path "tsconfig.json" -Value $tsconfigContent
# Step 5: Create directory structure
Write-Host "[5/6] Creating project structure..." -ForegroundColor Yellow
$directories = @(
"src/components/ui",
"src/components/layout",
"src/components/sections",
"src/hooks",
"src/data",
"src/types",
"src/styles",
"public/images"
)
foreach ($dir in $directories) {
New-Item -ItemType Directory -Path $dir -Force | Out-Null
Write-Host " Created $dir" -ForegroundColor DarkGray
}
# Step 6: Generate starter files
Write-Host "[6/6] Generating starter files..." -ForegroundColor Yellow
# mockData.ts
$mockDataContent = @"
// Mock data extracted from Stitch design screens
// Replace with real data or API calls in production
export interface NavItem {
label: string
href: string
icon?: string
}
export interface CardItem {
id: string
title: string
description: string
imageUrl: string
tags: string[]
}
export const navigation: NavItem[] = [
{ label: "Home", href: "/", icon: "home" },
{ label: "Explore", href: "/explore", icon: "search" },
{ label: "Favorites", href: "/favorites", icon: "heart" },
{ label: "Profile", href: "/profile", icon: "user" },
]
export const featuredItems: CardItem[] = [
{
id: "1",
title: "Sample Item",
description: "A placeholder item from Stitch design.",
imageUrl: "/images/placeholder.jpg",
tags: ["Featured", "New"],
},
]
"@
Set-Content -Path "src/data/mockData.ts" -Value $mockDataContent
# App.tsx scaffold
$appContent = @"
import "./index.css"
function App() {
return (
<div className="min-h-screen bg-background text-foreground">
{/* Navigation */}
<header className="border-b">
<nav className="container mx-auto flex items-center justify-between px-4 py-3">
<h1 className="text-xl font-bold">$ProjectName</h1>
<div className="flex gap-4">
<a href="/" className="text-sm text-muted-foreground hover:text-foreground">Home</a>
<a href="/explore" className="text-sm text-muted-foreground hover:text-foreground">Explore</a>
</div>
</nav>
</header>
{/* Main Content */}
<main className="container mx-auto px-4 py-8">
<section className="text-center space-y-4">
<h2 className="text-3xl font-bold">Welcome to $ProjectName</h2>
<p className="text-muted-foreground max-w-md mx-auto">
Converted from Stitch design. Replace this content with your
actual components.
</p>
</section>
{/* Card Grid - replace with shadcn Card components */}
<section className="mt-12 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
{[1, 2, 3].map((i) => (
<div key={i} className="rounded-lg border bg-card p-6 shadow-sm">
<div className="h-40 rounded-md bg-muted mb-4" />
<h3 className="font-semibold">Card {i}</h3>
<p className="text-sm text-muted-foreground mt-1">
Placeholder card from Stitch design.
</p>
</div>
))}
</section>
</main>
{/* Footer */}
<footer className="border-t mt-16">
<div className="container mx-auto px-4 py-6 text-center text-sm text-muted-foreground">
Built with Vite + React + Tailwind + shadcn/ui
</div>
</footer>
</div>
)
}
export default App
"@
Set-Content -Path "src/App.tsx" -Value $appContent
# DESIGN.md template
$designContent = @"
# $ProjectName — Design System
> Generated from Stitch project. Update tokens below to match your design.
## Color Palette
| Role | Hex | Usage |
|------|-----|-------|
| Primary | #1E293B | Buttons, links, headings |
| Secondary | #F1F5F9 | Backgrounds, cards |
| Accent | #3B82F6 | Highlights, active states |
| Destructive | #EF4444 | Errors, delete actions |
| Muted | #94A3B8 | Secondary text, borders |
| Background | #FFFFFF | Page background |
## Typography
| Element | Font | Size | Weight |
|---------|------|------|--------|
| Heading 1 | Inter | 2.25rem | 700 |
| Heading 2 | Inter | 1.5rem | 600 |
| Body | Inter | 1rem | 400 |
| Caption | Inter | 0.875rem | 400 |
## Spacing Scale
4px — 8px — 12px — 16px — 24px — 32px — 48px — 64px
## Components
Document component styles here as you convert Stitch screens.
"@
Set-Content -Path "DESIGN.md" -Value $designContent
Write-Host "`n=== Setup Complete ===" -ForegroundColor Green
Write-Host "Next steps:"
Write-Host " 1. cd $ProjectName"
Write-Host " 2. npx shadcn-ui@latest init"
Write-Host " 3. npx shadcn-ui@latest add button card dialog input"
Write-Host " 4. npm run dev"
Write-Host ""
Related skills
FAQ
What does stitch-design do?
stitch-design is a Claude Code skill for design & ui/ux.
When should I use stitch-design?
When you need to helps with design & ui/ux tasks., or when stitch-design is a claude code skill for design & ui/ux.
What are the main capabilities?
stitch-design; Design & UI/UX; AI-coding skill.