Claude
Skills
Sign in
Back

stitch-design

Included with Lifetime
$97 forever

Google Stitch design toolkit — DESIGN.md generation, screen-to-React conversion, shadcn/ui integration, prompt enhancement, and Remotion walkthroughs. Use when working with Stitch MCP design projects.

Ads & Marketingstitchdesignfrontenduivisualscripts

What this skill does


# 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](https://github.com/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
```markdown


**Project ID:** [ID]

## 1. Visual Theme & Atmosphere
## 2. Color Palette & Roles
## 3. Typography Rules
## 4. Component Stylings
## 5. Layout Principles
```

### Guidelines
- 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**: `Readonly` TypeScript 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.mp4
```

### Advanced 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
```bash


npx shadcn@latest create


npx shadcn@latest init


npx shadcn@latest add button card dialog
```

### Component Architecture
```
src/
├── components/
│   ├── ui/              # shadcn components (don't modify directly)
│   └── [custom]/        # your composed components
├── lib/
│   └── utils.ts         # cn() utility
└── app/
    └── page.tsx
```

### The cn() Utility
```typescript
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/` (not `components/ui/`)

### Available Components (50+)
- **Layout**: Accordion, Card, Se
Files: 7
Size: 52.0 KB
Complexity: 69/100
Category: Ads & Marketing

Related in Ads & Marketing