.claude/skills/design-plugin/design-and-refine/skills/design-lab/SKILL.md
Conduct design interviews, generate five distinct UI variations in a temporary design lab, collect feedback, and produce implementation plans. Use when the user wants to explore UI design options, redesign existing components, or create new UI with multiple approaches to compare.
npx skillsauth add cdeistopened/Pause design-labInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill implements a complete design exploration workflow: interview, generate variations, collect feedback, refine, preview, and finalize.
All temporary files MUST be deleted when the process ends, whether by:
Never leave .claude-design/ or __design_lab routes behind. If the user says "cancel", "abort", "stop", or "nevermind" at any point, confirm and then delete all temporary artifacts.
Before starting the interview, automatically detect:
Check for lock files in the project root:
pnpm-lock.yaml → use pnpmyarn.lock → use yarnpackage-lock.json → use npmbun.lockb → use bunCheck for config files:
next.config.js or next.config.mjs or next.config.ts → Next.js
app/ directory → App Routerpages/ directory → Pages Routervite.config.js or vite.config.ts → Viteremix.config.js → Remixnuxt.config.js or nuxt.config.ts → Nuxtastro.config.mjs → AstroCheck package.json dependencies and config files:
tailwind.config.js or tailwind.config.ts → Tailwind CSS@mui/material in dependencies → Material UI@chakra-ui/react in dependencies → Chakra UIantd in dependencies → Ant Designstyled-components in dependencies → styled-components@emotion/react in dependencies → Emotion.css or .module.css files → CSS ModulesLook for existing Design Memory file:
docs/design-memory.mdDESIGN_MEMORY.md.claude-design/design-memory.mdIf found, read it and use to prefill defaults and skip redundant questions.
DO NOT use generic/predefined styles. Extract visual language from the project:
If Tailwind detected, read tailwind.config.js or tailwind.config.ts:
// Extract and use:
theme.colors // Color palette
theme.spacing // Spacing scale
theme.borderRadius // Radius values
theme.fontFamily // Typography
theme.boxShadow // Elevation system
If CSS Variables exist, read globals.css, variables.css, or :root definitions:
:root {
--color-* /* Color tokens */
--spacing-* /* Spacing tokens */
--font-* /* Typography tokens */
--radius-* /* Border radius tokens */
}
If UI library detected (MUI, Chakra, Ant), read the theme configuration:
theme.ts or createTheme() calltheme/index.ts or extendTheme() callConfigProvider theme propAlways scan existing components to understand patterns:
Store inferred styles in the Design Brief for consistent use across all variants.
Use the AskUserQuestion tool for all interview steps. Adapt questions based on Design Memory if it exists.
Ask these questions (can combine into single AskUserQuestion with multiple questions):
Question 1: Scope
Question 2: New or Redesign
If "Redesign" selected, ask: Question 3: Existing Path
If target is unclear, propose a name based on repo patterns and confirm.
Question 1: Pain Points
Question 2: Visual Inspiration
Question 3: Functional Inspiration
Question 1: Brand Adjectives
Question 2: Density
Question 3: Dark Mode
Question 1: Primary User
Question 2: Context
Question 3: Key Tasks
Question 1: Must-Keep Elements
Question 2: Technical Constraints
After the interview, create a structured Design Brief as JSON and save to .claude-design/design-brief.json:
{
"scope": "component|page",
"isRedesign": true|false,
"targetPath": "src/components/Example.tsx",
"targetName": "Example",
"painPoints": ["Too dense", "Primary action unclear"],
"inspiration": {
"visual": ["Stripe", "Linear"],
"functional": ["Inline validation"]
},
"brand": {
"adjectives": ["minimal", "trustworthy"],
"density": "comfortable",
"darkMode": true
},
"persona": {
"primary": "Developer",
"context": "desktop-first",
"keyTasks": ["Complete checkout", "Review order", "Apply discount"]
},
"constraints": {
"mustKeep": ["existing fields"],
"technical": ["no new dependencies", "WCAG accessible"]
},
"framework": "nextjs-app",
"packageManager": "pnpm",
"stylingSystem": "tailwind"
}
Display a summary to the user before proceeding.
Create all files under .claude-design/:
.claude-design/
├── lab/
│ ├── page.tsx # Main lab page (framework-specific)
│ ├── variants/
│ │ ├── VariantA.tsx
│ │ ├── VariantB.tsx
│ │ ├── VariantC.tsx
│ │ ├── VariantD.tsx
│ │ └── VariantE.tsx
│ ├── components/
│ │ └── LabShell.tsx # Lab layout wrapper
│ └── data/
│ └── fixtures.ts # Shared mock data
├── design-brief.json
└── run-log.md
Next.js App Router:
Create app/__design_lab/page.tsx that imports from .claude-design/lab/
Next.js Pages Router:
Create pages/__design_lab.tsx that imports from .claude-design/lab/
Vite React:
/__design_labApp.tsx based on ?design_lab=true query paramOther frameworks: Create the most appropriate temporary route for the detected framework.
IMPORTANT: Read DESIGN_PRINCIPLES.md for UX, interaction, and motion best practices. But DO NOT use predefined visual styles—infer them from the project.
Apply universal principles (from DESIGN_PRINCIPLES.md):
Infer visual styles from the project:
Each variant MUST explore a different design axis. Do not create minor variations—make them meaningfully distinct. Use the project's existing visual language for all variants.
Variant A: Information Hierarchy Focus
Variant B: Layout Model Exploration
Variant C: Density Variation
Variant D: Interaction Model
Variant E: Expressive Direction
The Design Lab page must include:
Header with:
Variant Grid with:
Responsive behavior:
Shared Data:
data/fixtures.tsConventions:
Accessibility (from DESIGN_PRINCIPLES):
<button> not <div onclick>, <nav>, <main>, <section>:focus-visible with 2px ring and offsetStates (every component needs):
Motion:
prefers-reduced-motionAfter generating the lab files, immediately present the lab to the user. Do NOT attempt to:
Output the lab location and URL:
✅ Design Lab created!
I've generated 5 design variants in `.claude-design/lab/`
To view them:
1. Make sure your dev server is running (run `pnpm dev` if not)
2. Open: http://localhost:3000/__design_lab
Take your time reviewing the variants side-by-side, then come back and tell me:
- Which variant wins (A-E)
- What you like about it
- What should change
Immediately proceed to Phase 5 - ask for feedback. Do NOT wait for the user to say they've opened the browser. Just present the feedback questions right away so they're ready when the user returns.
Running pnpm dev or npm run dev starts a long-running process that never exits. If you run it, you'll wait forever. The user likely already has their dev server running, or can start it themselves in another terminal.
After presenting the lab URL, collect feedback in two stages:
Question 1: Ready to pick?
If user said "Yes", ask:
Question 2a: Which one?
Question 3a: Any tweaks?
If "Minor tweaks needed", ask user to describe changes via text input.
Then proceed to Phase 7: Final Preview.
If user said "No - I like parts of different ones", ask:
Question 2b: What do you like about each?
Example response format to guide user:
- A: Love the card layout and spacing
- B: The color scheme feels right
- C: The interaction on hover is great
- D: Nothing stands out
- E: The typography hierarchy is clearest
Then proceed to Phase 6: Synthesize New Variant.
Based on the user's feedback about what they liked from each variant:
Create a new hybrid variant (Variant F) that combines:
Replace the Design Lab with a comparison view:
Update the /__design_lab route to show the new arrangement
Ask for feedback again:
Question: How's the new variant?
If "Getting closer" or "Went the wrong direction", gather more specific feedback and iterate. Support multiple synthesis passes until user is satisfied.
Then proceed to Phase 7: Final Preview.
Once user is satisfied:
Create .claude-design/preview/ directory:
.claude-design/preview/
├── page.tsx # Preview page
└── FinalDesign.tsx # The winning design
Create route at /__design_preview
For redesigns, include before/after comparison:
Ask for final confirmation:
Question: Confirm final design?
If "No, needs changes": gather feedback and iterate. If "Abort": proceed to Abort Handling below.
If the user wants to cancel/abort at ANY point during the process (not just final confirmation), they may say things like:
When abort is detected:
Confirm the abort:
If confirmed, clean up immediately:
.claude-design/ directory entirelyapp/__design_lab/, etc.)Acknowledge:
When user confirms (selected "Yes, finalize it"):
Delete all temporary files:
.claude-design/ directory entirelyapp/__design_lab/ (Next.js App Router)pages/__design_lab.tsx (Next.js Pages Router)app/__design_preview/pages/__design_preview.tsxApp.tsx modifications (Vite)Safety rules:
.claude-design/Create DESIGN_PLAN.md in the project root:
# Design Implementation Plan: [TargetName]
## Summary
- **Scope:** [component/page]
- **Target:** [file path]
- **Winner variant:** [A-E]
- **Key improvements:** [from feedback]
## Files to Change
- [ ] `src/components/Example.tsx` - Main component refactor
- [ ] `src/styles/example.css` - Style updates
- [ ] ... (list all affected files)
## Implementation Steps
1. [Specific step with code guidance]
2. [Next step]
3. ...
## Component API
- **Props:**
- `prop1: type` - description
- ...
- **State:**
- Internal state requirements
- **Events:**
- Callbacks and handlers
## Required UI States
- **Loading:** [description]
- **Empty:** [description]
- **Error:** [description]
- **Disabled:** [description]
- **Validation:** [description]
## Accessibility Checklist
- [ ] Keyboard navigation works
- [ ] Focus states visible
- [ ] Labels and aria-* attributes correct
- [ ] Color contrast meets WCAG AA
- [ ] Screen reader tested
## Testing Checklist
- [ ] Unit tests for logic
- [ ] Component tests for rendering
- [ ] Visual regression tests (if applicable)
- [ ] E2E smoke test (if applicable)
## Design Tokens
- [Any new tokens to add]
- [Existing tokens to use]
---
*Generated by Design Variations plugin*
Create or update DESIGN_MEMORY.md:
If new file:
# Design Memory
## Brand Tone
- **Adjectives:** [from interview]
- **Avoid:** [anti-patterns discovered]
## Layout & Spacing
- **Density:** [preference]
- **Grid:** [if established]
- **Corner radius:** [if consistent]
- **Shadows:** [if consistent]
## Typography
- **Headings:** [font, weights used]
- **Body:** [font, size]
- **Emphasis:** [patterns]
## Color
- **Primary:** [color tokens]
- **Secondary:** [color tokens]
- **Neutral strategy:** [approach]
- **Semantic colors:** [error, success, warning]
## Interaction Patterns
- **Forms:** [validation approach, layout]
- **Modals/Drawers:** [when to use which]
- **Tables/Lists:** [preferred patterns]
- **Feedback:** [toast, inline, etc.]
## Accessibility Rules
- **Focus:** [visible focus approach]
- **Labels:** [labeling conventions]
- **Motion:** [reduced motion support]
## Repo Conventions
- **Component structure:** [file organization]
- **Styling approach:** [Tailwind classes, CSS modules, etc.]
- **Existing primitives:** [Button, Input, Card, etc.]
---
*Updated by Design Variations plugin*
If updating existing file:
If framework cannot be determined:
If dev server won't start:
If can't create temporary route:
If cleanup is interrupted:
The plugin supports these optional configurations (via environment or project config):
DESIGN_AUTO_IMPLEMENT: If true, implement the plan immediately after confirmationDESIGN_KEEP_LAB: If true, don't delete lab until explicit cleanup commandDESIGN_MEMORY_PATH: Custom path for Design Memory file/design-variations:design CheckoutSummary.claude-design/lab/ with 5 variantsapp/__design_lab/page.tsxpnpm dev/__design_previewDESIGN_PLAN.mdDESIGN_MEMORY.mdtools
# webapp-testing Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
development
UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient.
tools
# theme-factory Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.
tools
# ios-simulator-skill 21 production-ready scripts for iOS app testing, building, and automation. Provides semantic UI navigation, build automation, accessibility testing, and simulator lifecycle management. Optimized for AI agents with minimal token output.