figma-to-code
Skill2 starsChanged 24 days agoMITView on GitHub
Turn a Figma concept frame into exact code metrics and check the built screen against it: export a node dump to a snapshot, generate token-only CSS, measure the running app and compare, with a pass/fail table. Use whenever a screen must match a Figma frame 1:1, when the owner says a screen must look like the concept, or before design-critic reviews a converted screen.
- Reads credentials
18 other projects use a version of this.
Adopted by
Most recently taken up by
- NoatToan/claude-code-pluginstheir own version, first seen Nov 1, 2026
- pedroab0/skillstheir own version, first seen Oct 15, 2026
- t4sh/skills4shtheir own version, first seen Sep 28, 2026
- shivams07/figma-to-codetheir own version, first seen Aug 14, 2026
- sueryue/Claude-Skilllstheir own version, first seen Jul 28, 2026
- bedomax/webdesigner-agenttheir own version, first seen Jul 22, 2026
Used with
Projects with it also use systematic-debugging, mcp-builder and 1 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
OpenAISkillsystematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes
Also in 3 projects that use this
MicrosoftSkillmcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
Also in 3 projects that use this
GoogleSkilltdd
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
Also in 3 projects that use this
Other versions18 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 18
- shibit-net/xuanji-community★ 90same name
- scoobynko/claude-code-design-skills★ 39same name
- ggombee/code-forge★ 18same name
- t4sh/skills4sh★ 5same name
- kevinaimonster/skill-hub★ 4same name
- kyuhyi/BSD_claude_skills★ 2same name
- bedomax/webdesigner-agent★ 1same name
- gauravv-g/claude-skills-collection★ 1same name
- gihwan-dev/claude-code-gui★ 1same name
- mintorain/minto_claude_skills★ 1same name
8 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- author-and-verify-extensionSkill
- autoreviewSkill
- cut-releaseSkill
- deslopSkill
- extension-manifest-changeSkill
- ship-prSkill
- sushiai-taskSkill
- sushiai-testingSkill
- sushiai-uiSkill
- ui-evidenceSkill
The file
Files
Figma to code
A PNG is a picture, not a spec. This loop reads the numbers out of Figma and checks the built app against them, so "matches the concept" is an exit code.
The figma-console MCP is available only to the lead session. The lead extracts
dumps; an implementer works from the saved files. Everything under
concepts/figma/export/ is gitignored and holds real concept names: never copy
its strings into a committed file, test or doc.
Loop
- Extract (lead). For each frame call
figma_get_component_for_development_deepwith the frame node id and save the tool-result JSON asconcepts/figma/export/raw/R<n>.json. Done when: the file parses and its top node is the 1380x864 window frame. - Snapshot.
node scripts/figma-export.mjs concepts/figma/export/raw/R1.jsonwritesconcepts/figma/export/snapshots/R1.json: layer tree with boxes relative to the content root, layout, radius, stroke, fill and text metrics. The root is found by stripping the shell (title bar, sidebar); pass--root <layer name>when it picks wrong. Done when: the printed root is the area under test and everyUNMAPPED/UNBOUND/DRIFTline is either understood or handed to the owner as a vocabulary item (a Figma variable with no token insrc/styles/tokens.css). - Codegen or hand-apply.
node scripts/figma-codegen.mjs <snapshot>writes token-only CSS classes and a role to class map underconcepts/figma/export/generated/. It is a helper: copy the values into the real component styles, insrc/styles/components/, reusing existing classes ($sushiai-ui). It never becomes a runtime dependency. Done when: the component CSS spends tokens only and nofx-class ships. - Parity. Build (
npm run build), copy the ui-evidence driver, and add the three lines from.agents/skills/ui-evidence/scripts/measure.mjs(or run the template with--measure) to writeartifacts/<name>.measure.json. Thennode scripts/figma-parity.mjs <snapshot> artifacts/<name>.measure.json. Tolerances: 2px position, 3% text width, exact font size, weight and colour token. Text is the anchor; an unmatched Figma text is a FAIL, an extra app text is listed only. Done when: the exit code is 0, or every FAIL is fixed in the code or recorded as a decision for the owner (Figma wrong vs app wrong). - Look. Screenshot the screen and give it with the parity table to
design-critic. Numbers do not replace looking.
Rules
- The fix goes into the app code or the Figma file, never into the tolerance.
- A Figma colour with no token is a question for the owner: add the token to
src/styles/tokens.cssfor everyone, or change the design. - Positions come from auto-layout; a layer inside a frame without auto-layout
has no position in the dump and is marked
approx. Do not trust its x/y. - Extract only through the Desktop Bridge tools (
figma_get_component_for_development_deep,figma_take_screenshot).figma_get_file_datais a REST tool and fails without aFIGMA_ACCESS_TOKEN; that is not a bridge failure. A dump too big for the reply is saved to a file: copy it from the tool-result path intoconcepts/figma/export/raw/. - A dialog or overlay frame needs its own root: find the layer name (for example
dialog) in the dump and pass--root <name>, or the exporter picks the page behind it.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

