PROCESS · FIGMA TO CODE WITH CLAUDE CODE
A hiring manager asked for one real example: the source design, the instruction pattern, the generated output, and how I checked it against the design system. This page is that example, end to end. Ledger is a small MVP I built to show the system: a design system and one checkout screen.
ROLE
Designer, system owner
MODEL
Claude Code, Figma MCP
STACK
Figma · Tailwind v4 · Playwright
THE LOOP
86
variables in 4 collections
primitives hidden, every role an alias
6
components, 12 icons
every property bound to a token
10 × 2
states, 2 widths
all instances from the library
5 of 7
went back to Figma
4 into the library, 1 a new frame, 2 code only
1 · SOURCE
Where the design comes from.
86 variables in 4 collections. Primitives are hidden from publishing, so the only tokens a designer or the model can pick are semantic roles, layout and typography. Every semantic value is an alias. Every variable carries scopes, so a text color never shows up in a fill picker, and a CSS name, so the export already knows what it will be called in code. Pick a role and follow it.
6 component sets and 12 Lucide icons. Every fill, stroke, padding and radius is bound to a variable, every label uses a text style, and every set has a description that says what it is for and what it maps to in code. The screen frames were composed by script from these components, which is how the system is meant to be used. The layout, the states, the copy and the hierarchy are my decisions.

2 · INSTRUCTION PATTERN
What I told the model.
The brief, then 3 files. The model reads the frame itself through the Figma connection, so the prompt only needs the link to the frame.
If I had to show one thing from this run in a review, it would be the plan. Before any code, the model went through the frame, listed the components and tokens it used and matched each one to the map. Then it added a section it called What the system is missing, with two items in it. Rule 8 says to stop when something does not exist, so it stopped at both and asked.
3 · OUTPUT
What came out.
ReviewAndPay.tsx, 209 lines, using only the 6 components and the token utilities. Every one of the 10 states is reachable from real form state and a mocked payment call that behaves like a test mode. Validation runs on blur and on submit, errors are field-level and say how to fix the problem, and focus moves to the first invalid field. Submitting locks every control and the button keeps its height, so nothing jumps.
Figure 3. Drag the handle: the Figma frame against the generated screen at 1280, after the findings below were fixed.
4 · QA
How I checked it against the system.
There are 2 layers. The gates run on every change: the token build, lint, a guardrail that fails on raw colors, raw buttons and off-scale spacing, 33 unit tests including contrast on every text role, and Playwright at 390 and 1280 with axe at every state. Then the design review, by hand, Figma beside the render: type, color, spacing, radius, borders, heights, hierarchy, hover, focus, disabled, loading, every error state, both layouts, icons, copy, hit targets, semantics. 33 rows, the same number as the unit tests.

After a tap on Pay, focus now lands on the first invalid field, this one, once the tap has finished.
This placeholder text, and every helper line in the same color, measured 4.37:1 before the primitive was darkened.
A message appearing on blur above this button is what pushed it out from under the finger. The Input now reserves its message line.
Figure 7. The validation state at 390, and where 3 of the 7 findings sit.
Before F6
After F6
Figure 8. Before F6 the selected radio had no dot, because spacing classes outside the theme were resolving to nothing. After: one 4px base, Figma steps named by pixel value, a guardrail on the multiples. Same crop, same scale.

Figure 9. Text link, the component F2 added to the library, in its 4 states left to right: default, hover, focus, disabled.
IN YOUR CODEBASE
What I would do on your system.
Start with an audit of which values live only in Figma, which only in code, and which components exist twice. Wire the tokens into the build. Map the components. Figma’s Code Connect does this on the Organization and Enterprise plans, so where it is set up the mapping lives there, and where it is not, a map file in the repo does the same job. Write the rules file short, with the stop-and-say-so rule. Then run one screen through the loop and let QA tell us what the system is missing. The findings from that one screen are the backlog for the system.
There are 3 limits worth stating. The DTCG export is written by a script through Figma’s plugin API while Figma finishes rolling out its own. The payment call is mocked. The screens were composed by script and refined by hand. The two Figma files now live in my own account as drafts, so the library link between them shows as unavailable. Every instance still carries its values. I made every design decision and every call on the findings. The model wrote the plan and the code, and the gates checked both.
- Make the system the only material.Remove the default palette and map the components. Nothing else is left to reach for.
- Write the plan before the code.The plan is where gaps surface. 2 of 7 findings came from it.
- QA is how the system learns.5 findings went back to Figma, so the next screen starts from a corrected library.
Anchal Nagdev





