AI for UX · Step 2 · 7 min read
Generating design with Claude Code
A beginner's guide for designers to building prototypes with real components in Claude Code: the building blocks (CLAUDE.md, skills, MCP, plan mode), a ten-step Figma-to-code workflow, example instructions, who does what, and the guardrails that keep it safe.
Claude Code is an AI agent that works inside a code project. You tell it what you want in plain language; it reads the files, writes code, runs it, looks at the result and fixes what's wrong. For designers this opens a new way of working: designing directly with your real component library, connected to Figma, and checking the result in a browser. You don't need to be a developer, but you do need to work with one.
What you'll be able to do after reading:
- Explain what Claude Code is and when it's a better choice than a prompt-to-prototype tool
- Name its building blocks:
CLAUDE.md, skills, MCP servers, plan mode - Follow a ten-step workflow from a Figma frame to a checked coded prototype
- Set the guardrails that keep prototypes separate from production
Product details are as of November 2026.
1. What Claude Code is, and why designers use it
Claude Code runs in a terminal, in code editors, in a desktop app and on the web (overview). Unlike a chat, it can act: open files, run commands, start the app, take screenshots.
Why it matters for design:
- Prototypes with your real components. Not "looks like our design system" but is the design system: real states, real responsive behaviour, real data shapes.
- A shorter path from design to code. Through the Figma connection, the agent reads frames, variables and component mappings, and builds with the matching code components.
- Small design tools. Audits, Figma plugins, scripts that check tokens: things that used to need an engineer's afternoon.
| Use Claude Code when | Use a prompt-to-prototype tool when |
|---|---|
| A code base with your components exists | You're exploring an idea from scratch |
| The prototype should be close to what will ship | You need a quick test or demo |
| An engineer will review and maybe build on it | No one will maintain the code |
See Prototyping with AI for the second column.
2. The building blocks
| Block | What it is | How designers use it |
|---|---|---|
CLAUDE.md |
A project instructions file the agent reads at the start of every session (docs) | Design principles, design-system rules ("never use raw colour values"), folder conventions. See Context files |
| Skills | Packaged instructions (a SKILL.md plus files) the agent loads for specific tasks (docs) |
Anthropic's frontend-design skill, which steers away from generic "AI-looking" UI (article); Figma's skills; your own "design system rules" skill |
| MCP servers | Connectors that give the agent tools (MCP, docs) | Figma (read designs, variables, Code Connect; write to Figma) and Playwright (open a browser, take screenshots, check behaviour) |
| Plan mode | The agent proposes a plan before changing anything (Shift+Tab) | Review the approach like a design brief before any code is written |
/design |
Brief → editable artboards → pick one → Claude implements it | Explore visual directions before code; see Claude Design |
| Plugins | Bundles of skills, commands and connectors you can share (docs) | Give the whole team the same setup |
3. A practical workflow: Figma → coded prototype → review
- 1Prepare
Context file and spec.
Steps 1–2 - 2Read and plan
Read the Figma frame; approve a plan.
Steps 3–4 - 3Build and verify
Real components; screenshots of every state; accessibility.
Steps 5–8 - 4Review and share
Human review gates; a link or screens back in Figma.
Steps 9–10
- Context. A
CLAUDE.mdwith design-system rules, plus a design context file (tokens, components, principles). - Spec. The feature spec in a
specs/folder (see Design specs for AI). - Read. "Read the Figma frame
<link>and list the components and variables it uses." - Plan. Ask for a plan first: components, states, mock data, open questions. Approve or correct it.
- Build. With real design-system components and realistic, anonymised mock data.
- Verify visually. "Open it in the browser, take screenshots at 375 and 1440 px, compare with the Figma frame and list the differences." Anthropic's own guidance recommends this loop: a browser screenshot next to the mock-up (best practices).
- States. "Add empty, loading, error and 5,000-item states, and screenshot each."
- Accessibility. "Run an accessibility check, fix keyboard and focus issues, and report what's left."
- Human review. Through the gates in the AI design review process.
- Share. A prototype link for testing, or key screens sent back to Figma.
4. Example instructions (copy and adapt)
A CLAUDE.md excerpt (fictional booking app)
## Design rules
- Members use this on their phones, often one-handed: large touch targets, short flows.
- Use only components from @sportsclub/design-system; never create look-alike components.
- Use design tokens (var(--ds-*)); never hard-code colours, spacing or font sizes.
- Every list needs empty, loading, error and very-long-list states.
- Accessibility baseline: WCAG 2.2 AA; visible focus; never colour alone for status.
- If a component we need doesn't exist, stop and list it as an open question.
A task prompt
Using specs/court-closures.md and the Figma frame <link>, build a prototype of the
closure banner and alternative-slot flow in /prototypes/closures. Start with a plan and
wait for my OK. After building, screenshot every state on mobile and desktop and compare
them with the Figma frame.
5. Who does what
| Who | Does |
|---|---|
| Designer | Writes the spec and context, steers the agent, reviews visually and behaviourally, decides |
| Design-system team | Keeps tokens, components, Code Connect mappings and the context file up to date: the agent's grammar |
| Engineer | Reviews the code, decides what (if anything) moves towards production, owns the architecture |
| Design lead | Sets the boundary between prototype and production, the review gates and the approved tools |
6. Guardrails
- Use only approved plans and settings, with your organisation's data controls. See AI governance and data protection.
- No real data in prompts or mock data: use anonymised examples.
- Keep prototype repositories separate from production unless engineering decides otherwise.
- Give every generated prototype a visible "prototype, not production" label.
- Review what the agent wants to run. Don't approve permission prompts on autopilot.
Common mistakes:
- Skipping the plan and getting a large change you can't review.
- No context file, so the agent invents components and colours.
- Trusting "it works" without looking at the screenshots and states.
- Letting a prototype quietly become production code.
7. Vocabulary
| Term | Meaning |
|---|---|
| Repository (repo) | The folder of code and its history, usually on GitHub |
CLAUDE.md |
The project's instructions for Claude Code |
| Skill | A reusable package of instructions for one kind of task. See Agent skills |
| MCP | The standard that connects the agent to tools like Figma or a browser |
| Plan mode | The agent proposes before it changes anything |
| Code Connect | Figma's mapping from design components to code components |
8. Try it
You'll need a sandbox repository, ideally set up with an engineer.
- Start from a public design system or a small set of your components, with a short
CLAUDE.md. - Connect Figma and try the loop: read a frame → plan → build → screenshot → compare.
- Build one prototype from a real, anonymised spec. Time it and write down every problem.
- Show the result and your notes at a team show and tell.
Reflection questions: Which of your design decisions did the agent get wrong without a rule in CLAUDE.md? Who in your team would decide whether any of this code is kept?
9. If you lead a team
- Pair each designer with an engineer for their first prototype.
- Make the context file and Code Connect a shared responsibility of design and engineering.
- Write down the boundary between prototype and production, and the review gates, before the first project.
Checklist
Learn more
- Claude Code: Overview · Best practices · Skills · MCP · Plugins
- Visual checks: Playwright MCP · Claude in Chrome (needs a direct Anthropic plan) · Desktop app previews
- Figma and Claude Code: MCP setup · Write to canvas · Code to canvas
- NN/g: GenUI vs. Vibe Coding: Who's Designing? · The Role of UX in Agentic Software Factories
Books, courses and videos to go deeper
- The Custodial Era of UX: Cleaning Up After AINN/g (external site)
- Sentient DesignJosh Clark and Veronika KindredRosenfeld Media (Amazon)
Book links go to Amazon. As an Amazon Associate I earn from qualifying purchases, at no extra cost to you.
Related
Prototyping with AI · Design specs for AI · Figma AI · Claude Design · AI design review process · Context files · MCP · UX agents and skills: a guide for designers