agentleFS
jara-r-kjara-r-k/claude-code-skills/skills/figma-handoff/AGENTS.md

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.

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
  1. Distinctive:

    Never default to React + Tailwind — detect and match the project's framework, styling approach, and token system.

    line 21
  2. Very specific:

    After a successful handoff, offer to register Code Connect mappings via add_code_connect_map (Example 3 registers one directly).

    line 22
  3. Very specific:

    Run the local CI command from the root AGENTS.md and /skill-compliance-checklist skills/figma-handoff/SKILL.md.

    line 27
  4. Distinctive:

    Every generated component needs semantic HTML, ARIA attributes, and keyboard support.

    line 34

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md
<!-- 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

FileDescription
SKILL.mdNine-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.version on any change to the workflow or tool list.

Testing Requirements

  • Run the local CI command from the root AGENTS.md and /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 as 42-100, while the skill's example and the API use 42:100 — normalise when parsing.
  • Order: get_screenshot first for a visual reference, then structured extraction, then get_code_connect_map to 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: -->

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.