Tutorial · 6 min read

Your design system in one markdown file

DESIGN.md is a plain text file that holds your colors, type scale, spacing and component variants. figma-cli writes it from any Figma file and reads it back into any other. Here is why that is a big deal.

What a DESIGN.md looks like

It is just markdown, the same format readme files use. Open it in any text editor and you see your system at a glance: colors ranked by how often they are actually used, the full type scale, spacing, radii, shadows, and a variant matrix for every component set. For a Button that means variant times size times state, with all the values.

Because it is plain text, three things become easy that used to be painful:

Export any open Figma file

Open the file in Figma Desktop, then tell Claude Code:

You say
Export this file's design system as markdown
Every page scanned, DESIGN.md written with the full token map

This works on your own files, client files, and Community files. It scans every page with no truncation, even on huge documents. GitHub's Primer Web file has 67 pages and 124,000 nodes, and it comes out as a 35k-token main file, small enough for an AI to read in one go. When the structure trees alone would blow the context window, they are split into per-page files automatically.

Learning trick: open any famous Community file, export it, and read how that team actually structures their tokens and variants. It is the fastest design system education there is.

Variables come across whole

If your file defines real variable collections, the export captures them as they are: every variable with its real name, all of its modes, light, dark, high contrast, whatever the system uses, and the alias chains between them. That is the difference between transferring a system and copying a palette.

The file round-trips. Import recreates those collections faithfully in any other file, modes and aliases included, so a token layer survives the trip instead of coming back as flat hex.

Import it anywhere

The reverse direction creates real Figma variables, with names like primary, canvas, ink and accent that you can bind to anything:

You say
Import ~/Downloads/my-DESIGN.md into Figma
Colors, typography and radius become variables in this file

Because the token names stay consistent, you can also re-theme an existing design on demand. "Now make it look like Vercel" swaps the whole layout to another system without rebuilding anything.

Reuse instead of rebuild

Every component in an exported DESIGN.md carries a reuse handle. Ask for a component that already exists and the AI drops a real instance of it instead of hand-building a one-off copy, so the new file stays consistent with the system it came from.

Components are addressable too. The AI can pull one component's spec out of the markdown instead of loading the whole file, which keeps its context small on big systems.

No DESIGN.md? Import from your codebase

If your team already has the design system in code, you can skip the file and point Claude at the source directly:

You say
Import my tailwind config and load our storybook at localhost:6006
Your Figma file now speaks the same language as your codebase

Questions

What is a DESIGN.md file?

A plain markdown file that holds a design system: colours ranked by usage, the type scale, spacing, radii, shadows and a variant matrix for every component set. Figma-CLI writes it from any Figma file and reads it back into any other one.

Can I export a Figma Community file?

Yes. The export scans every page without truncation, even on files with more than 100,000 nodes. GitHub's Primer Web, 67 pages and 124,000 nodes, comes out as a 35k-token main file.

Does importing recreate variable modes?

Yes. If the source file has real variable collections, the export captures every variable name, all of its modes and its alias chains, and the import recreates them faithfully in the target file.

Try it on your own file

Setup takes five minutes and one sentence. The export works on any file you can open.

Get started