Design Lab
A Claude Code plugin for iterative UI design exploration. Generates distinct design variants as HTML mockups in a visual companion browser, collects interactive feedback, audits quality, and produces an implementation-ready spec — then builds it with subagent-driven development.
Installation
Inside a Claude Code session:
# From the marketplace
/plugin marketplace add seangjr/design-lab
/plugin install design-lab@design-lab
# Or from a local clone
git clone https://github.com/seangjr/design-lab.git
/plugin marketplace add ./design-lab
/plugin install design-lab@design-lab
Recommended: Install the Figma MCP plugin for design token import:
/plugin marketplace install figma
Quick Start
Open Claude Code inside any supported project and run:
/design-lab:start
The plugin detects your framework, styling system, and existing design tokens automatically. A visual companion opens in your browser for design exploration.
You can also pass a specific target:
/design-lab:start CheckoutSummary
/design-lab:start src/components/Hero.tsx
/design-lab:start /dashboard
To reference an existing Figma design:
/design-lab:start CheckoutSummary --figma https://www.figma.com/design/abc123/MyFile
How It Works
Three-Skill Pipeline
/design-lab:start → design-lab (phases 0-6) → design-lab-implement → design-lab-finish
The 7-Phase Workflow
| Phase | Name | Where |
|---|
| 0 | Preflight | Terminal — detects framework, styling, Figma MCP; starts companion server |
| 1 | Figma Import | Terminal — extracts tokens, component hierarchy, text content via MCP |
| 2 | Interview + Brief | Terminal — adaptive questions (2-10), tonal direction selection |
| 3 | Visual Exploration | Companion — 3-5 HTML mockups with distinct aesthetic directions, click-to-select |
| 4 | Feedback + Synthesis | Companion — combine selections, iterate up to 3 rounds |
| 5 | Design Audit | Companion — 6-dimension quality gate (typography, color, spacing, motion, a11y, responsive) |
| 6 | Spec + Artifact | Terminal — writes DESIGN_SPEC.md, final-mockup.html, DESIGN_MEMORY.md |
After Phase 6, the design-lab-implement skill creates a task plan and executes it via subagents with two-stage review (spec compliance + code quality). The design-lab-finish skill handles test verification and merge/PR.
Aesthetic-Driven Variants
Each variant commits to a bold tonal direction rather than just varying layout:
| Direction | Character |
|---|
| Editorial | Magazine-like typography, generous whitespace, content-forward |
| Brutalist | Raw, bold, unconventional layouts, extreme sizing |
| Organic | Soft shapes, natural colors, flowing transitions |
| Retro-futuristic | Neon accents, dark backgrounds, sci-fi patterns |
| Luxury | Refined, serif-heavy, high contrast, slow animations |
| Playful | Rounded, colorful, bouncy interactions, personality |
Commands
| Command | Description |
|---|
/design-lab:start [target] [--figma <url>] | Start a design session |
/design-lab:cleanup | Remove temp files and stop companion server |
Supported Targets
Design Exploration works for any project — the companion server displays plain HTML mockups, so no framework integration is needed.
Implementation targets these frameworks and styling systems:
| Category | Supported |
|---|
| Frameworks | Next.js (App Router & Pages Router), Vite (React, Vue), Remix, Astro, CRA |
| Styling (primary) | shadcn/ui + Tailwind CSS |
| Styling (fallback) | CSS Modules, Material UI, Chakra UI, Ant Design, styled-components, Emotion |
| Animation | Motion (motion/react) preferred, CSS transitions as fallback |
| Design Import | Figma (via MCP server) — extracts tokens and component structure |
Configuration
Set via environment variables or .claude-design/config.json:
| Variable | Default | Description |
|---|
DESIGN_AUTO_IMPLEMENT | false | Proceed to implementation automatically after spec approval |
DESIGN_KEEP_LAB | false | Keep temp files until explicit /design-lab:cleanup |
DESIGN_MEMORY_PATH | DESIGN_MEMORY.md | Custom location for the Design Memory file |
DESIGN_FIGMA_MODE | prompt | Figma import: prompt (ask), always (auto-import), never (skip) |
DESIGN_COMPANION_PORT | auto | Fixed companion server port, or auto for random |
Output Files
After a session completes:
| File | Description |
|---|
DESIGN_SPEC.md | Implementation-ready spec with exact token values, component structure, motion timing, and audit results |
final-mockup.html | Standalone HTML of the winning design — open in any browser |
DESIGN_MEMORY.md | Reusable style decisions for future sessions (tonal direction, Figma token mappings) |