figma-to-code
Skill1 starsChanged 4 months agoMITView on GitHub
Connect to Figma and implement UI code that faithfully matches the design. Use whenever a Figma link/file is provided, when a design must be translated into components, or when verifying that implemented UI matches the source design pixel by pixel.
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
- sushi-killer/sushiAItheir own version, first seen Oct 20, 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
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
- sushi-killer/sushiAI★ 2same 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 repository9 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- backend-architectureSkill
- competitive-researchSkill
- frontendSkill
- lead-generationSkill
- seoSkill
- spec-writingSkill
- ux-researchSkill
- web-designSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 5 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 12 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Use the Figma MCP server (official Figma Dev Mode MCP).
- Distinctive: line 29
If the MCP server is not available, ask the user to enable the Figma MCP server or share the design as exported assets + values.
- Distinctive: line 34
Check for mapped components: if Code Connect returns a codebase component, use it as-is with the right props.
- Distinctive: line 38
Compare against the screenshot: before finishing: spacing, font sizes/weights, line heights, colors, border radii, shadows, icon sizes.
- Distinctive: line 49
Icons: use the same icon at the same size.
“Common” is measured: kept by at least 6 in 10 of the 12 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Figma to Code
Translate Figma designs into production code with high fidelity. The design is the contract — the implementation must match it in spacing, typography, color, and behavior.
Connecting to Figma
Use the Figma MCP server (official Figma Dev Mode MCP). Main tools:
get_design_context— primary tool: returns reference code (React + Tailwind), a screenshot, and design hints for a node. Always start here.get_screenshot— visual reference of the exact node; keep it open while implementing.get_metadata— node structure, sizes, and positions when you need the layout tree.get_variable_defs— design tokens (colors, spacing, typography variables) defined in the file.get_code_connect_map— checks if Figma components are already mapped to codebase components; if a mapping exists, USE the mapped component instead of writing new code.
Parsing Figma URLs
figma.com/design/:fileKey/:fileName?node-id=:nodeId- Extract
fileKeyfrom the path andnodeIdfrom the query (convert-to:— e.g.123-456→123:456). - Branch URLs (
/branch/:branchKey/): use the branchKey as fileKey.
If the MCP server is not available, ask the user to enable the Figma MCP server or share the design as exported assets + values.
Design-to-Code Workflow
- Fetch context:
get_design_contextfor the target node; alsoget_screenshotfor the visual reference. - Check for mapped components: if Code Connect returns a codebase component, use it as-is with the right props.
- Extract tokens, not values: map Figma variables to the project's token system (Tailwind theme / CSS custom properties). Never hardcode a hex value that exists as a token.
- Reuse project components for buttons, inputs, cards, etc. Only build new primitives when nothing matches.
- Implement structurally: recreate the layout with proper semantics and flexbox/grid — never absolute positioning copied from Figma coordinates (Figma's absolute layout is a rendering artifact, not the design intent).
- Compare against the screenshot before finishing: spacing, font sizes/weights, line heights, colors, border radii, shadows, icon sizes.
Fidelity Rules (the detail checklist)
Match EXACTLY, do not approximate:
- Spacing: paddings, gaps, and margins to the pixel (mapped to the nearest token on the project scale — if the design says 24px, use the 24px token, not 20 or 32).
- Typography: family, size, weight, line-height, letter-spacing, and text color per text style.
- Color: exact token/hex including opacity. Check fills AND strokes.
- Borders & radii: width, color, and per-corner radius.
- Shadows: x, y, blur, spread, color with alpha — copy the exact values.
- Icons: use the same icon at the same size; export from Figma if not in the project's icon set.
- States: implement hover/focus/active/disabled variants if designed; if not designed, derive them consistently from the design system and note it in the spec.
What Figma Doesn't Tell You (fill the gaps deliberately)
- Responsive behavior: Figma frames are fixed-width. Decide how the layout adapts at each breakpoint and document it in the spec. When mobile/desktop frames both exist, implement both and interpolate between them.
- Interactions: transitions, loading, empty, and error states usually aren't designed — derive them from the design system and list them in the spec.
- Real content: designs use ideal content. Verify the layout survives long text, missing images, and translations (no overflow, truncation rules defined).
- Accessibility: Figma doesn't encode semantics. Add proper elements, alt text, labels, and focus order yourself.
Verification
- Side-by-side comparison: rendered implementation vs
get_screenshotoutput at the same viewport width. - Overlay check when precision matters: screenshot the implementation and diff against the Figma export.
- Ship only when a designer could not tell the implementation from the mock.
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.

