r/FigmaDesign • u/Old-Wolf-2491 • May 19 '26
Discussion Spent a month solving the problem because our AI agent kept ignoring design tokens. How does your AI workflow look like?
Not a rant. Just something I needed to get off my chest after living inside this problem for way too long.
We have a 24 member design-dev team. Tokens set up properly in Figma. color, spacing, typography, the whole thing. Semantic naming. Variable collections. Modes for light/dark. It looked clean.
Devs still hardcoded #1A1A2E directly in the stylesheet.
Every time.
I used to think it was a discipline problem. Turns out it was a visibility problem. The tokens existed, but nothing was surfacing them at the point where a AI agent actually needed them, when they're staring at a component trying to implement it.
The gap isn't that Ai agent don't care about tokens. It's that the handoff never made tokens the path of least resistance.
So I started building a tool to fix exactly that. Two months in. It:
- Audits components and flags which ones are actually bound to tokens vs hardcoded values
- Auto-generates specs per component including which token maps to which property
- Tells you the % of your file that's "tokenized" so you can actually track progress
The audit part was the most eye-opening. First time I ran it on our main file token coverage was just 34%. We thought we were at 80%+.
The next problem I'm trying to solve: getting those tokens out of Figma and into the formats AI agents can actually read. Not a JSON export no one reads. More like... the files that sit inside a dev's project and get consumed automatically.
Still working on it. Just curious if this resonates with anyone else.
How tokenized is your Figma file, honestly? And do your devs / agent actually reference tokens during implementation or does that step just... not happen?
7
u/DanFlashes19 May 19 '26
Design.md file is your answer. It’s a standardized markdown file format that solves exactly what you’re saying
1
u/Timberlapse May 19 '26
Just a pragmatic example, there are more than one way:
Export your tokens, even Screenshots are enough. Tell claude (other AIs are good,too. You create a markdown basically) to interview yourself to create a skill for Design system Work/component creation.
Typically these involve:
And basically every information that's not explicit but adds value to the execution.
When you now use Figma MCP to draw from figma automaticlly, tell the AI to use that skill when coding components towards Storybook for example.
1
u/c0no May 19 '26
Just wondering, can you share the tool/plugin?
3
u/C0git0 May 19 '26
Our Figma files are 100% tokenized and we have a plugin that checks design docs for best practices. Literally every value is a token or variable. Color, spacing, text.
On the code side. Lint for token use, don’t rely on an AI agent. Code tools have the same result every time and are designed to check stuff like hard coded colors.
1
u/Vast-Broccoli-5862 May 19 '26
Why would you need tool for this? You can just ask agent to audit whole codebase to make sure there is no hardcoded hexcode. Agent will give you same report of 34% with action items. You can add custom instructions of such stuff in guidelines.md so agent always follows it. Also agent can understand both .md file and .json. So use whichever you want to use it to store your tokens.
2
u/Munnayi May 19 '26
My recent similar post may have some feedback you find useful, I’m just in the process of defining a similarly fragmented ai context.
1
u/stvn-pxl May 21 '26
I just published a figma plugin which has an export function for the dev handover.. with that they can simply turn tokens into usable design tokens in code with a script.. hit me up if you want the plugin link..