figma-converter
Skill1 starsChanged 7 months agoMITView on GitHub
Convert a Figma file or frame URL into clean, production-ready HTML/Tailwind that matches the design 1:1. Uses the Figma MCP server (set up by Pegasus) to read the actual file, then writes minimal markup with the right tokens, fonts, and responsive breakpoints. Use when the user pastes a figma.com URL or asks to "convert this design", "build this Figma file", "rebuild from Figma".
In this repository32 other files it gives its agents.
- AGENTS.mdAGENTS.md
- config/CLAUDE.mdCLAUDE.md
- career-ops-applySkill
- career-ops-compareSkill
- career-ops-evaluateSkill
- career-ops-helpSkill
- career-ops-outreachSkill
- career-ops-researchSkill
- career-ops-scanSkill
- career-ops-tailor-resumeSkill
- career-ops-triageSkill
- content-writerSkill
- cover-letter-generatorSkill
- creative-portfolio-resumeSkill
- interview-prep-generatorSkill
- interview-prepSkill
- job-description-analyzerSkill
- job-finderSkill
- linkedin-profile-optimizerSkill
- mp-diagnoseSkill
- mp-git-guardrailsSkill
- mp-to-prdSkill
- mp-zoom-outSkill
- offer-comparison-analyzerSkill
- portfolio-case-studySkill
- portfolio-case-study-writerSkill
- resume-ats-optimizerSkill
- resume-tailorSkill
- salary-negotiation-prepSkill
- ux-ui-auditSkill
- vector-workflowSkill
- weekly-reviewSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 6 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
If any of the above is missing, stop and tell the user explicitly — don't make up output.
- Distinctive: line 27
Use the Figma MCP's tools:
- Very specific: line 40
Use semantic HTML (<header>, <main>, <section>, <article>, <footer>)
- Distinctive: line 48
If a Live Preview server is running, refresh it
- Distinctive: line 59
One source of truth: If the user later edits the Figma file, re-run this skill rather than hand-editing the HTML.
- Distinctive: line 60
Mobile breakpoints are required: Don't ship a desktop-only conversion unless the Figma file is desktop-only and the user confirms.
- Distinctive: line 61
Accessibility minimums: every interactive element gets a focus state.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Figma → Code Converter
Take a Figma URL and ship a working HTML page that matches.
When to use
- The user pastes a
figma.com/design/...orfigma.com/file/...URL - The user says "rebuild this from Figma", "convert the design", "make it match the Figma"
- The user wants Code Connect–style output where the markup mirrors their design system
Prerequisites
- The Figma MCP server is reachable (tested via
claude mcp list | grep figma→ ✓ Connected) - Figma desktop app is running with Dev Mode MCP Server enabled (Preferences → toggle ON)
- The user has the file open in Figma desktop (the MCP reads the active session)
If any of the above is missing, stop and tell the user explicitly — don't make up output.
How to convert
1. Read the Figma file
Use the Figma MCP's tools:
get_design_contextfor the node you're converting (pass the URL's node-id)get_metadataif you need parent/sibling structureget_screenshotfor visual confirmationget_variable_defsfor design tokens (colors, type scales, spacing)
2. Map design tokens to Tailwind
- Colors → CSS custom properties at
:root(e.g.--brand: #...) + Tailwind arbitrary values OR atailwind.configextension - Type scale → match Figma's text styles to Tailwind text-{size} classes; use
font-serif/font-sansaliases - Spacing → favor Tailwind's stock scale (4/8/12/16/24/32/48/64); only use arbitrary values when the design demands it
- Radii, shadows → same approach: stock first, arbitrary only when needed
3. Write the markup
- Use semantic HTML (
<header>,<main>,<section>,<article>,<footer>) - Tailwind classes inline (no separate CSS unless needed for animations/print)
- Responsive: build mobile-first, add
md:andlg:breakpoints to match Figma's breakpoint frames - Images: include
altattributes from the Figma layer name (or ask the user); useloading="lazy"for non-critical - For fonts not in Google Fonts, ask the user how to handle (download, swap, use system fallback)
4. Show a preview
After writing, always:
- If a Live Preview server is running, refresh it
- Otherwise tell the user: "Right-click
index.html→ Show Preview, ornpx serve ." - Compare to the Figma screenshot. Note any pixel-level differences.
5. Confirm with the user
End with: "Built and previewed. Drift from Figma I'm aware of: [list]. Want me to fix any of these, or move on?"
Hard rules
- Never invent design details the Figma file doesn't have. If Figma says
#0a0a0aand 14px, use those exact values — don't "improve" them. - Don't generate placeholder content unless the Figma frame literally has lorem ipsum. If text is missing, ask.
- One source of truth. If the user later edits the Figma file, re-run this skill rather than hand-editing the HTML.
- Mobile breakpoints are required. Don't ship a desktop-only conversion unless the Figma file is desktop-only and the user confirms.
- Accessibility minimums: every interactive element gets a focus state; every image has alt text; tab order matches visual order.
When the Figma file uses Code Connect
Some teams have mapped Figma components to real codebase components via Figma's Code Connect. If get_code_connect_map returns mappings, prefer the mapped component over rebuilding the markup from scratch.
Companion skills to chain after
content-writer— refine any copy that came from the Figma fileux-ui-audit— audit your output against the 17-section checklistvector-workflow— if the Figma file has SVG icons that need optimization
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.

