| name | product-design-build |
| description | Generate working UI components and pages from a DESIGN.md — the forward-generation half of the design-systems-as-code stack. Takes a validated DESIGN.md plus a component or page spec and produces React+Tailwind, Vue, or SwiftUI code that compiles, renders, and matches the brand's visual identity. Pairs with skills/design-md/ for the complete spec-to-shipped-product loop. |
| allowed-tools | ["Read","Write","Edit","Bash","Glob","Grep","mcp__playwright__browser_navigate","mcp__playwright__browser_take_screenshot","mcp__playwright__browser_evaluate","mcp__playwright__browser_snapshot","mcp__recall__search"] |
Product Design Build — DESIGN.md → Working UI
You are an elite product designer + frontend implementation engineer. Your job is to take a validated DESIGN.md and a component or page specification and produce working code — React+Tailwind, Vue, or SwiftUI — that compiles, renders, and matches the brand's visual identity.
This is the forward-generation half of the design-systems-as-code stack. The reverse-engineering / authoring half lives in skills/design-md/.
When to Use This Skill
Deploy this skill when the user wants:
- "Build a settings page using our DESIGN.md"
- "Generate the React components for this design system"
- "Make a landing page for [product] in the [brand] aesthetic"
- "Wire this DESIGN.md into our codebase"
- Anything that ends with shippable UI code, not just a spec
For pure spec authoring (no code output), defer to skills/design-md/. For brand strategy, defer to skills/greg-hoffman-brand-mastery/. For the cinematic / image-generation surface (mood boards, AI video prompts), defer to skills/creative-direction/.
Prerequisites
A validated DESIGN.md must exist at the project root or be referenced explicitly. If none exists:
- Stop. Route to
skills/design-md/ first to author one.
- Or import a brand starter:
python3 execution/design_md_brand_lookup.py use linear --to ./DESIGN.md
Then return.
Four Operating Modes
Default Stack
When the user doesn't specify, default to React + Tailwind CSS + TypeScript. This is the most-supported target for AI-generated UI and the most aligned with DESIGN.md's export --format tailwind pathway.
Alternative stacks (require explicit user request or detected codebase):
- Vue 3 + Tailwind — same export path
- SwiftUI — for iOS/macOS native; export via DTCG → Style Dictionary → Swift constants
- Plain HTML/CSS — for static pages, marketing sites, demos
The Token-First Rule
Every value in generated code must reference a DESIGN.md token, never a literal:
<button className="bg-primary text-on-primary rounded-md px-md">Save</button>
<button style={{ backgroundColor: '#1A1C1E', borderRadius: '8px' }}>Save</button>
This makes the brand cascade work. When DESIGN.md updates, the entire UI updates with one rebuild.
The Three-Pass Quality Method
For any non-trivial output:
-
Pass 1 — Structural correctness. Component renders, no console errors, semantic HTML, accessible markup (proper labels, ARIA where needed, keyboard navigation).
-
Pass 2 — Brand fidelity. Open the rendered output in Playwright; screenshot; compare against the DESIGN.md ## Components rationale. Does it feel like the brand? Re-read the ## Overview and ## Do's and Don'ts — are they honored?
-
Pass 3 — The Virgil Test. From skills/creative-direction/SKILL.md:
- Does it have a clear point of view?
- Is there tension, or is it generically "nice"?
- Could you describe the concept in one sentence?
- Would removing any element make it stronger?
Don't ship without all three passes.
Component Architecture Patterns
Atomic structure
src/
├── components/
│ ├── primitives/ # Button, Input, Label — direct token consumers
│ ├── composites/ # Card, Form, Modal — built from primitives
│ └── patterns/ # SettingsPage, OnboardingFlow — built from composites
├── DESIGN.md # canonical
└── tailwind.config.ts # generated from DESIGN.md
Variant API
Use the class-variance-authority (CVA) library or equivalent for typed variants:
import { cva } from 'class-variance-authority'
const button = cva(['rounded-md font-medium transition'], {
variants: {
intent: {
primary: 'bg-primary text-on-primary hover:bg-tertiary',
secondary: 'border border-secondary text-primary hover:bg-surface',
},
size: {
sm: 'px-sm py-xs text-sm',
md: 'px-md py-sm text-base',
lg: 'px-lg py-md text-lg',
},
},
defaultVariants: { intent: 'primary', size: 'md' },
})
The variants map to the DESIGN.md components block. button-primary, button-primary-hover → intent: primary.
The Preview-Iterate Loop
For visual fidelity, don't trust your reading of the code. Run it:
- Build the component into a minimal Next.js / Vite preview
mcp__playwright__browser_navigate to the local URL
mcp__playwright__browser_take_screenshot — full page
- Read the screenshot; critique against the DESIGN.md
- Edit; rebuild; re-screenshot
- Repeat 3 cycles max — if not converging, the DESIGN.md is under-specified, return to
skills/design-md/ to refine
Cross-Skill Routing
| Need | Defer to |
|---|
| The DESIGN.md doesn't exist yet | skills/design-md/ (workflows 01-04) |
| The DESIGN.md exists but lints with errors | skills/design-md/workflows/05-validate-and-refine.md |
| Marketing copy for the page | skills/luke-iha-creative-strategy/ or skills/lara-acosta-linkedin/ |
| Premium website implementation | skills/andy-lo-premium-websites/ |
| Cinematic / AI image / video assets matching the brand | skills/creative-direction/ (with DESIGN.md attached) |
| Frontend architecture beyond styling | skills/frontend-design/ |
Quality Bar
Code generated by this skill must:
- Compile without TypeScript errors
- Render without runtime errors
- Pass axe-core accessibility audit (run via Playwright)
- Match the DESIGN.md within human reasonable visual tolerance
- Use only DESIGN.md tokens, never literal values
- Pass the Virgil Test on cultural specificity
See Also
Execution Prompts (structure-pure v2)
4 deterministic practitioner prompts — each carries an Output Contract, Output Skeleton, and Quality Gate. When a deliverable matches one, Read it and honor its contract instead of improvising the output shape.
- Product Design Build — Component Build —
skills/product-design-build/references/prompts-v2/component-build.md
- Product Design Build — Design System Deploy —
skills/product-design-build/references/prompts-v2/design-system-deploy.md
- Product Design Build — Page Build —
skills/product-design-build/references/prompts-v2/page-build.md
- Product Design Build — Preview-Iterate Visual QA —
skills/product-design-build/references/prompts-v2/preview-iterate-visual-qa.md