Generate a Figma component library from a coded design system

Designer Christine Vallaure has Claude Code read a React design system and build its tokens, text styles and components into an empty Figma file through an MCP, logging what cannot carry over.

Done withClaude CodeinFigma· Oct 26, 2026

What they did

Christine Vallaure, a designer who does not write production code, reversed the usual Figma-to-code route: her design system lives in a React repo with Storybook, and the Figma library is generated from it. She connects Claude Code (through the Claude desktop app) to a copy of the repo and to an empty Figma file using the Figma Console MCP by Southleft, which can read and write variables. First she asks it to mirror the JSON tokens as Figma variable collections with the same names, aliases, scopes and light and dark modes, and to turn typography into text styles. Then it builds two test components, Button and Alert, and only after she has checked them by hand does she run the whole library. Each step must also write GAPS.md, a list of everything Figma could not express or the agent was unsure of. Later runs use a skill she wrote that also screenshots each component against its Storybook story. She also had Claude export a JSON list of what is in the Figma library, which a plain script compares with Storybook's component manifest as a parity check.

How it went

She says the components came out with the same names, properties and spelling as the code, with descriptions and Storybook links carried across, which she could not have done by hand. The gaps file proved more useful than she expected, catching unitless line heights, behaviour-only states and layout rules with no Figma equivalent. Building the full library costs time and tokens, but only once. The parity check covers structure only, not visuals, and she still starts it by hand. On an existing library, the same setup puts a report and a clean reference component next to an out-of-date one.

Worth knowing

Her repo is a clean sample system she built herself. She warns that real codebases produce a generated mess, so go one component at a time. Work on a copy, never a live library. Deleted variants lose their keys and break instances, so rename and repair instead. Storybook must be version 10 or newer, with the component manifest turned on, for the agent to read the component list.

Try it

With Claude Code· 5 parts to fill in

The [Figma MCP] is connected to an empty Figma file and you can read [my design system repo]. Mirror the code in Figma exactly, step by step. First transfer the tokens from [where tokens live] into variable collections that match the code layers, with the same names, aliases, scopes and [modes such as light and dark]. Then create the text styles using those variables. Then build only [two components, one simple and one awkward] with the same variants, property names, defaults and descriptions as the code. Write everything you cannot express in Figma, or are unsure of, into GAPS.md. Stop after each step and wait for me to check before going on.

Square brackets are the parts to fill in. The prompt is ours; the story is theirs.

Where they said it

Related