grafta started as a .fig reader. Now it talks to your Figma
grafta lets you talk to your Figma files through the AI you already use. You ask Claude, ChatGPT, Cursor or OpenCode what is in a design, to change something, or to turn a screen into code, and grafta lets the model open the file, read it exactly and write the change back. It works offline, with no Figma account and no API key.
It did not start like that. The first commit, on 27 July 2026, was a command-line tool called fig2specs that only read files. This post is the story of how it got from there to here, including the idea I had to throw away halfway through.
The first question: what does a coding agent need from a design?
The starting point was a simple frustration. A coding agent can write a screen if you describe it well, but a design lives in a Figma file, and the agent can’t open one. It gets a screenshot, or a description, and then it guesses: the spacing, the colours, which component a button is.
So the first version tried to answer one question. Given a .fig file, what does an agent need in order to implement it? fig2specs read the file and wrote a bundle next to it: the design’s tokens as CSS custom properties, its text styles, its components with their real variants, and structural snapshots of the main screens. Everything came straight out of the file, with no plugin, no account and no network.
Reading the file was the first real piece of work. A .fig is a ZIP archive, and the design itself is inside it in a binary format:
.fig = ZIP archive
canvas.fig
images/...
meta.json, thumbnail.png
canvas.fig = "fig-kiwi" 8 bytes, magic
version 4 bytes, u32 little-endian
chunk[0] length, then the compressed Kiwi schema
chunk[1] length, then the compressed message
The detail that made the whole project possible is in chunk[0]. Figma ships the schema of its format inside every file. You don’t have to reverse-engineer the shape of the data, because each file describes itself, and a decoder written against that schema keeps working when Figma changes its format.
A week later the project got its name. grafta is graft plus graph: you graft new work onto a design system that already exists, and what makes that possible is the graph between the design and the code.
The idea I threw away: grafta as the interpreter
For the next two months I pushed in the obvious direction. If grafta could read a design, it could also understand it. I built a semantic layer that recognised what things were (“this is a table, this is its header cell”) through a profile for each design system, an audit that reported what a design system was costing (components defined twice, components nothing used, values that never became tokens) and code generators on top.
It worked on the files it was built for, and that was the problem. Every design system needed its own hand-written profile. I had two, and the second one was failing its tests. The interpreting lived inside grafta, and a tool that has to be taught every team’s vocabulary doesn’t scale past the teams you have met.
Writing a .fig, and the bug that only writing could find
Meanwhile I was working on the harder direction: writing a file that Figma would open. The first milestone was deliberately boring. Read a real file, change nothing, write it back, and check whether Figma opens it. If that failed, there was no point building anything on top, and a .fig that Figma refuses gives you no error message at all. The file just doesn’t open.
Building that round trip found a bug that had been in the reader since the start. The function that decoded variable-length integers shifted a value after it had already been cast to a signed 32-bit integer, so the shift was arithmetic. Every value of magnitude 2³⁰ or more came back as a different number, silently.
Nothing had caught it, because a tool that only reads compares its output against nothing. If I had written the encoder as the exact inverse of that reader, the bug would have become permanent: every large integer would have been written back wrong, and the round trip would have reported success.
On 22 August Figma opened a file that grafta had written, on two very different designs. From that point on, writing was a known route and not a hope.
The pivot: grafta stops interpreting
On 25 September I changed the direction of the project, and that day is the real birthday of grafta as it is now. The new rule fits in one sentence: grafta does not interpret designs. It speaks Figma’s format exactly, in both directions, and the model does the interpreting.
The split follows from what each side is good at:
| The model | grafta |
|---|---|
| decides what a screen is and what to build | decodes every node, colour, layout, text, component and variable |
| asks for what it needs, a subtree or a colour | answers exactly, from the bytes, with no inference |
| decides what to create or change | encodes that change into a .fig Figma opens |
| writes code or a design from what it read | says what it could not decode, instead of leaving it out |
A model like Claude is very good at reading intent into a design. It is bad at binary formats, and it guesses numbers. grafta is the opposite. So grafta became a toolkit that a model calls through the Model Context Protocol: open a file, search it, read nodes, create and change them, save. The first version served fifteen tools. The profiles, the semantic layer and the code generators were deleted.
Built from what the models asked for
After the pivot, the roadmap stopped being my guess about what was needed. I gave models real design tasks with grafta and watched where they got stuck, and most of what grafta does today exists because a session hit a wall:
- A session redesigning a long flow lost its unsaved edits when the server restarted. Now every edit is journaled to disk and replayed when the file is opened again.
- A model couldn’t put a glow behind the number it was lighting up. That became layer order.
- Two sessions drew icons with emoji and text symbols, because there was no other way. That became vectors from SVG paths, so a model can draw Lucide or Heroicons properly.
- A session built a whole design system’s foundations, colours, type sizes, spacing and radii, and couldn’t save any of them as a Figma variable. That became variables with modes and aliases, and bindings on almost any field.
- Another drew an album cover out of frames because it couldn’t place an image. That became images.
Each new kind of write was proven the same way: a ladder of files, each one a step further, opened in Figma by a person. Passing tests don’t prove that Figma opens a file. Only Figma does.
The other big step was letting the model see. render_node draws a frame as a picture, offline, with the file’s own fonts, so the model can check its work before saving. check_contrast measures every text against WCAG AA over what is actually drawn behind it.
From 0.1.0 to the file you have open
grafta 0.1.0 came out on 4 November 2026 with 43 tools, prebuilt binaries for macOS, Linux and Windows, npm and Homebrew packages, a one-click bundle for Claude Desktop and a Claude Code plugin. It opened, read, drew and saved all four Figma products: Design, Slides, FigJam and Sites.
The month since then has gone fast:
- 0.4 read and wrote prototypes: reactions, flows, scrolling and overlays.
- 0.5 compiled the read tools to WebAssembly, so you can open a Figma file in the browser without installing anything, and added export to W3C Design Tokens.
- 0.6 was the big one. A panel inside Figma’s desktop app connects grafta to the file you have open, so you see each change appear as the model makes it, and each call is one step of Figma’s undo.
- 0.7 added skills to the Claude Code plugin for audits, building screens, design systems and handoff.
Today grafta has 45 tools, and on 5 December the project moved to its own organisation on GitHub, grafta-design.
The rules that held the whole time
Looking back, the code changed almost completely, but a few rules survived every rewrite, and I think they are why the project still makes sense:
Offline and exact. Every value comes from the file’s bytes, or from Figma itself on the open file. There are no heuristics and no estimates, and nothing on the read path touches the network.
What grafta doesn’t know is part of the answer. When a result is cut to fit, it says what it left out and how to get it. When a picture approximates something, its caption says so. A model that knows what it is missing can ask for it. A model that doesn’t know will guess.
Never overwrite the person’s file. Changes are saved to a new file, and a write that Figma would have to repair is refused with the reason.
Measured, not estimated. Any number in the docs was measured, and it gets published even when it moves against the project. Memory is the clearest example: an open file costs about 1.3 GB for a 57 MB file and 5.5 GB for an 86 MB one, and the docs say so.
What grafta can’t do yet
It doesn’t support auto-layout grids, component slots, boolean operations or Dev Mode annotations. It only edits the variables and styles it created itself. To start a new file it needs any .fig to take the format from, and large files cost memory. The full list is in Limits.
And grafta doesn’t make your model smarter. It gives it the real file instead of a screenshot, so how good the code or the design is still depends on the model.
Try it
grafta is free and open source under the MIT licence. In Claude Code:
/plugin install grafta --marketplace grafta-design/grafta
Then ask, in words: Using grafta, what have I selected in Figma? Claude Desktop, ChatGPT, Codex, Cursor and OpenCode are covered in the install guide.
If you try it on a real design and something doesn’t work, open an issue. Most of grafta exists because something didn’t work for someone.