claude-code-skills / figma-handoff
AGENTS.md1 starsChanged 46 days agoMITView on GitHub
Companion skill for the Figma MCP server that turns a Figma frame or component into production code in the project's own stack. Five steps: extract design context (screenshot, design context, variables, Code Connect map) → analyse the project stack and components → map Figma tokens to project tokens → generate code reusing existing components → compare visually against the screenshot.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,774 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository16 other files it gives its agents.
- agents/AGENTS.mdAGENTS.md
- AGENTS.mdAGENTS.md
- examples/AGENTS.mdAGENTS.md
- .github/AGENTS.mdAGENTS.md
- .github/workflows/AGENTS.mdAGENTS.md
- scripts/AGENTS.mdAGENTS.md
- skills/AGENTS.mdAGENTS.md
- skills/github-pr-review/AGENTS.mdAGENTS.md
- skills/gmail-workflow/AGENTS.mdAGENTS.md
- skills/skill-compliance-checklist/AGENTS.mdAGENTS.md
- skills/skill-compliance-checklist/references/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- figma-handoffSkill
- github-pr-reviewSkill
- gmail-workflowSkill
- skill-compliance-checklistSkill
The file
We split this AGENTS.md into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 21
Never default to React + Tailwind — detect and match the project's framework, styling approach, and token system.
- Very specific: line 22
After a successful handoff, offer to register Code Connect mappings via add_code_connect_map (Example 3 registers one directly).
- Very specific: line 27
Run the local CI command from the root AGENTS.md and /skill-compliance-checklist skills/figma-handoff/SKILL.md.
- Distinctive: line 34
Every generated component needs semantic HTML, ARIA attributes, and keyboard support.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md 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
<!-- Parent: ../AGENTS.md --><!-- Generated: 2026-06-30 | Updated: 2026-09-27 -->skills/figma-handoff/
Purpose
Companion skill for the Figma MCP server that turns a Figma frame or component into production code in the project's own stack. Five steps: extract design context (screenshot, design context, variables, Code Connect map) → analyse the project stack and components → map Figma tokens to project tokens → generate code reusing existing components → compare visually against the screenshot.
Key Files
| File | Description |
SKILL.md | Nine-tool Figma MCP catalogue, five-step workflow, error table (invalid URL, MCP disconnected, no Code Connect mappings, thin design context, unknown stack), three examples, ## Important rules. v1.0.0, mcp-server: figma, ~1,100 words (largest skill in the repo) |
For AI Agents
Working In This Directory
- Tool names (
get_design_context,get_screenshot,get_metadata,get_variable_defs,get_code_connect_map,get_code_connect_suggestions,add_code_connect_map,send_code_connect_mappings,get_figjam) follow Figma's official MCP server. Other Figma MCPs (e.g. Framelink:get_figma_data,download_figma_images) expose different tools and are not covered. - Never default to React + Tailwind — detect and match the project's framework, styling approach, and token system.
- After a successful handoff, offer to register Code Connect mappings via
add_code_connect_map(Example 3 registers one directly). - Bump
metadata.versionon any change to the workflow or tool list.
Testing Requirements
- Run the local CI command from the root
AGENTS.mdand/skill-compliance-checklist skills/figma-handoff/SKILL.md. - Manual: give a real Figma URL; check the file key and node ID are parsed, the screenshot is taken first, and generated code uses the project's styling and tokens rather than raw hex/px values.
Common Patterns
- URL form:
figma.com/design/<file_key>/<name>?node-id=<node_id>. Browser URLs usually encode the node as42-100, while the skill's example and the API use42:100— normalise when parsing. - Order:
get_screenshotfirst for a visual reference, then structured extraction, thenget_code_connect_mapto find reusable mappings. - Every generated component needs semantic HTML, ARIA attributes, and keyboard support.
Dependencies
External
- Figma MCP server (official Figma integration) with a valid auth token
- Optional Preview MCP for live visual comparison (Step 5)
<!-- MANUAL: -->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.

