Making Claude Code Work With Your Figma Design System
Keshav Farmaha
Keshav Farmaha
Founder

You ask Claude Code to build a settings screen from a Figma file. The first version looks clean. The spacing is balanced, the button is in the right place, and the layout feels close enough to ship. Then you inspect the file.

The button is not your button component. The color is a raw hex value. The text uses a typed font size instead of a shared style. The spacing looks right visually, but it is not using your variables. The screen passes as a mockup, but it fails as a design system artifact.

That is the real problem with AI-generated design work. The output can look finished while being structurally wrong.

This playbook explains how to use Claude Code and Figma MCP in a way that protects your design system, not just your screenshots.

What Claude Code and Figma MCP Actually Do

Figma’s MCP server connects Figma files to AI coding tools like Claude Code. It can provide structured design context such as frames, components, layouts, variables, and code-related metadata. With the remote server, supported clients can also write native Figma content back to the canvas.

That matters because AI no longer has to work from a screenshot alone. It can inspect the real structure of a selected frame, understand which variables are used, see component metadata, and use Code Connect where mappings exist.

Claude Code brings the agentic workflow around that context. It can read project files, follow repo instructions, connect to MCP servers, run commands, use subagents for specialized work, and follow persistent project guidance through CLAUDE.md.

But there is an important distinction.

Figma MCP provides context and tools. Claude Code decides how to use them.

So if your design system rules are not explicit, Claude may still improvise. It may create something visually reasonable but structurally disconnected from your components, tokens, codebase, and naming conventions.

Why AI Breaks Design Systems

Design systems exist to reduce repeated decisions. A button is not only a rectangle with text. It is a component with variants, states, spacing, accessibility rules, implementation details, and usage guidance.

When Claude Code skips that structure, it creates design debt.

A raw color will not update when the theme changes. A detached button will not inherit new variants. A manually spaced layout may break when resized. A vague layer name gives developers no useful implementation clue.

This is why AI design workflows need a stricter process than ordinary prototyping. In a quick concept file, rough structure may be fine. In a production design file, every generated layer has to respect the system.

The practical rule is simple: Claude Code should never start from a blank mental model. It should start from your Figma file, your libraries, your component mappings, your variables, and your repo conventions.

Step 1: Prepare an AI-Ready Figma File

Before asking Claude Code to build anything, make sure the Figma file can provide useful context.

Use components for repeated UI elements such as buttons, cards, inputs, nav items, modals, tabs, and menus. Use variables for color, spacing, radius, and typography wherever the system supports them. Use Auto Layout to communicate responsive behavior instead of relying on absolute positioning.

Layer names also matter more than most teams expect. A frame named BillingSettingsPanel gives the agent more intent than Frame 1284. A component named PlanCard / Featured / Monthly is easier to map than a generic group with nested rectangles.

If your team uses Dev Mode, add dev resources, annotations, and Code Connect mappings where possible. Code Connect is especially useful because it links Figma components to real code components. Instead of forcing Claude Code to guess which React component matches a design component, the mapping gives it implementation context.

This is the foundation. The better your Figma structure, the less Claude has to invent.

Step 2: Connect Figma MCP the Right Way

For most teams, the remote Figma MCP server is the preferred setup because it connects to Figma’s hosted endpoint and supports the broadest feature set. The desktop server still exists for certain organization and enterprise cases, but the remote server is now the more practical default.

Once connected, Claude Code can use Figma context inside the development workflow. Depending on permissions and seat type, the workflow may be read-only or write-enabled. Write-to-canvas workflows require the right Figma access and should be treated carefully because the agent can create or modify real file content.

Use links deliberately. Share the exact file URL or selection link so Claude Code knows the working scope. For large files, do not ask it to understand everything at once. Ask it to inspect the relevant page, frame, library, or component set first.

✅ Good prompt: “Using this Figma selection, inspect the existing components and variables first. Then build a settings screen using only matching library components unless no equivalent exists.”

❌ Weak prompt: “Make this screen better.”

The first prompt gives Claude Code a workflow. The second gives it permission to freestyle.

Step 3: Create a Design System Brief Before Building

Do not let Claude Code jump straight from request to canvas.

Ask it to create a short design system brief first. This brief should define the screen goal, required sections, likely components, tokens, states, responsive behavior, and open questions.

For example, for a billing settings screen, the brief may include account summary, plan card, payment method, invoice table, upgrade CTA, empty states, loading states, and error states. It should also identify which design system components are likely needed: card, badge, table, button, alert, input, and modal.

This step is valuable because it makes assumptions visible before the file changes. It also gives designers a chance to correct the plan early.

The brief should answer three questions:

What needs to be created?

Which existing system parts should be reused?

What should Claude Code avoid inventing?

Step 4: Search the Library Before Creating Anything

This should be the non-negotiable rule.

Before Claude Code creates a component-like element, it should search the Figma library or inspect the current file for an existing match. If the component exists, use it. If a close variant exists, use the closest variant and note what is missing. Only create a new element when no suitable component exists.

This prevents the most common AI design system failure: duplicate components that look almost right.

The same rule applies to variables. Claude Code should look for semantic tokens before applying raw values. For example, it should prefer color.text.primary, color.surface.default, or space.400 over arbitrary values.

If the right token does not exist, Claude should flag the gap instead of silently creating a new visual value. That gap may reveal a real design system need.

Step 5: Build Incrementally on the Canvas

Large AI-generated changes are harder to inspect and easier to get wrong. Figma’s own guidance for write-to-canvas workflows recommends smaller steps with validation as you go.

Use a section-by-section workflow.

First, create the frame and layout skeleton. Then add the header. Then add the primary content group. Then add secondary sections. After each step, validate structure, variable binding, component usage, naming, and resize behavior.

For production design work, Claude Code should summarize what it changed after each major step:

  • Components used
  • Variables applied
  • New elements created
  • Known gaps
  • Items needing human review

This makes the process inspectable. Designers should not have to reverse-engineer what the agent did.

Step 6: Bind Styles, Variables, and Modes

A design system only works when values are connected to the system.

Claude Code should bind fills, strokes, text styles, spacing, radius, and component properties wherever Figma supports it. If your design system has light and dark modes, brand modes, density modes, or platform modes, the agent should check which mode applies before creating the screen.

This is where many AI outputs fail. They copy the appearance of the system but ignore the mechanism that makes the system scalable.

A strong QA question is not “Does this screen look good?”

A better question is: “If the token changes tomorrow, will this screen update correctly?”

If the answer is no, the screen is not design-system-ready.

Step 7: Use Claude Code Memory, Skills, and Hooks

Do not repeat your design system instructions manually in every prompt.

Put stable project rules in CLAUDE.md: component naming rules, token usage rules, preferred workflows, validation commands, and things Claude should never do. Claude Code reads this project memory automatically when working in that directory.

For repeated Figma workflows, create a dedicated skill. A useful skill can tell Claude to inspect the file first, search libraries before creating, bind variables, preserve Auto Layout, name layers semantically, and report gaps.

Hooks can add deterministic checks around the workflow. For example, a hook can remind Claude to run a validation step after file edits or block unsafe commands in a repo. Subagents can also help when the task needs isolated research, codebase inspection, or design system mapping without flooding the main context.

The point is to make the workflow repeatable. A good AI design system process should not depend on one perfect prompt.

Step 8: Run a Design System QA Pass

Before handoff, Claude Code should perform a structured QA pass.

Check whether all repeated UI elements use components. Check whether colors, typography, spacing, and radius use variables or styles. Check whether Auto Layout behaves correctly when resized. Check whether layers are named by intent. Check whether annotations or dev resources are needed for unclear interaction behavior.

Also check the code side. If Code Connect exists, confirm that key components have mappings. If mappings are missing for important components, add them to the backlog. Without those mappings, Claude Code may still have to infer implementation details.

The final output should separate three things:

  • What is production-ready
  • What needs designer review
  • What the design system is missing

That last category is important. AI does not only consume design systems. It can expose where the system is incomplete.

Common Mistakes to Avoid

  1. Treating Figma MCP as a one-click design-to-code machine. It is better understood as a bridge that gives AI agents structured context.
  2. Judging only the screenshot. Visual accuracy matters, but structure determines whether the file remains useful.
  3. Allowing raw values during production work. Raw values are acceptable in throwaway prototypes. They are dangerous in system-owned files.
  4. Skipping Code Connect. If your code components are not mapped to design components, the agent has to guess more often.
  5. Making giant canvas changes in one pass. Incremental creation with validation produces cleaner work.

How Kreeya Can Help

If you already have a design system but it is not solving the problems it was meant to solve, Kreeya can help you find the exact gaps in your design system.

Sometimes the issue is not the components themselves. It is unclear token usage, weak governance, inconsistent component adoption, poor Figma-to-code alignment, missing documentation, or workflows that make designers and developers work around the system instead of with it.

Kreeya audits your current design system across structure, usability, scalability, and implementation readiness. We identify the critical issues that slow your team down, then help you turn the system into something cleaner, easier to maintain, and more useful in day-to-day product work.

If your design system feels difficult to use, hard to scale, or disconnected from how your team actually builds, Kreeya can help you change that. Contact us today.

Written by

Keshav Farmaha

Keshav is a B2B SaaS product designer with an engineering background, helping teams turn complex systems into clear, usable interfaces. He designs workflows, dashboards, and design systems for SaaS products that users can understand without hand-holding.