Skill library

Agent skill Frontend

Figma Design To Code

Implement a Figma frame with existing components and tokens, then compare the rendered screen with the design.

  • Design to code
  • Design systems

Install the skill

Installation method

Run the command from your project root with Node.js and npm.

npx skills@latest add figma/mcp-server-guide --skill figma-design-to-code --agent claude-code --yes

Check this file in your project.claude/skills/figma-design-to-code/SKILL.md

Other ways to install
  • Choose an assistant interactively

    npx skills@latest add figma/mcp-server-guide --skill figma-design-to-code

    Select your assistant and choose the project installation scope.

    Official instructions

The tested Skills CLI 1.10.0 requires Node.js 22.20 or later. Connect Figma MCP in your assistant and sign in with permission to read the target file. Bring a frame or component link, the project checkout, and a route or component where the implementation will live.

View operation manual

What this skill helps with

  • Connect design references and design tools to frontend implementation.

Good for

  • Design handoff
Inputs
A Figma frame or node link, project code, and any relevant component and token library.
Design tools
get_design_context and, when needed, get_screenshot. Optional auxiliary tools depend on your client.
Implementation
High-fidelity design context translated into the project’s layout, components, and interactions.
Verification
Compare the requested implementation with the Figma render and verify local assets, placement, and size.
Skill name
figma-design-to-code

Use the design render as a comparison target

A screenshot-only handoff

Paste this screenshot into a page that looks the same.

The render shows appearance. Code references, individual assets, responsive rules, and interactions still need to be identified.

A design package you can implement

  1. Fetch high-fidelity context for the precise frame or component.
  2. Inspect equivalent project components and any Code Connect mappings.
  3. Compare the running UI and check each local asset against its design slot.

Figma Design to Code operation manual

Use the official skill to implement one approved screen or reconcile a mapped component. Replace bracketed details with the frame, code target, and behavior your team wants to implement.

Bring a settings screen from Figma into an existing app, using its design system and form behavior.

  1. Read one frame and its visual reference

    Confirm the target node and assistant connection, then obtain the structured design and the visual target before editing.

    • The target node and code route are identified.
    • The screenshot and actionable design context agree with the requested scope.
    Prompt · Step 1
    Load figma-design-to-code before any get_design_context call. Read [approved Figma frame URL] for [target route and framework]. Confirm the link resolves to the intended node and that your connected account can read it. When create_session is available, start the session and use its ID on every call that accepts it. Request a screenshot in the initial get_design_context call. Include figma-design-to-code in skillNames where supported, with the resource: prefix if you loaded it as an MCP resource. If the response lacks a screenshot, call get_screenshot. If the response is marked sparse, match the visible child node IDs to the screenshot and fetch those nodes in a parallel batch. Report the actual context, missing states, and any blocker before editing.
  2. Map design layers to the project

    Find the existing controls, tokens and asset locations before deciding what to write.

    Prompt · Step 2
    Use figma-design-to-code to map [Figma frame URL] to [target route and framework]. Reuse the verified high-fidelity context and screenshot or obtain them per the skill if they are missing. Inspect the target route, installed UI libraries, component files, theme tokens, and assets. Identify the exact nodes with Code Connect mappings and the corresponding components. List each visible static asset’s design slot, intended local file, and sizing. Identify data-driven imagery and reuse its existing data source. Describe the existing form behavior you will preserve and ask only about missing design or interaction decisions.
  3. Implement the confirmed screen

    Translate the design into the project’s layout system and keep working form behavior connected.

    Prompt · Step 3
    Use figma-design-to-code to implement [approved Figma frame URL] at [code route and framework]. Locate the high-fidelity context and Figma render. If either is missing, retrieve it per the skill before editing. Reuse the specific Code Connect components on mapped nodes, composing project components and tokens for the rest. Keep the project’s input, validation, and save behavior, and wire any approved interaction. Use the download method described in the returned context for visible static assets and use local paths in code. Keep their original aspect ratios and SVG root dimensions. Follow the project’s responsive layout conventions, and report what changed.
  4. Compare the running route with the frame

    Check the requested view against the reference and inspect the rendered result of each visible static asset.

    • Reference and preview show comparable content and states.
    • Every static asset is verified in its design slot and rendered geometry.
    • The requested user actions work in the resulting component.
    Prompt · Step 4
    Use figma-design-to-code to verify [local preview route] against [approved Figma frame URL]. Recover the design render at the reference size and capture the running preview in the comparable state. Compare hierarchy, spacing, type, states, and geometry. For every visible static asset, check that the local file is non-empty, placed on the intended layer or slot, referenced from the right call site, and rendered at the right size and aspect ratio. Confirm that rendered asset URLs resolve locally. Try the approved interactions, the keyboard path, and the agreed responsive width. Fix in-scope mismatches and report actual evidence and any blocker.

Find the tool for the handoff problem

Name the exact Figma node and use the next tool that addresses the missing input.

The frame has design context but no renderScreenshot
Command or reference
get_screenshot
Examples
Fetch the node’s render before editing and use it to compare the implementation.
The returned design context is sparseNode context
Command or reference
get_design_context
Examples
Match child IDs to the screenshot, then request visible children in a parallel batch.
The design already maps to a code componentCode Connect
Command or reference
SKILL.md · Implementation
Examples
Identify the mapped node and component, then match the chosen variant through its actual props.
An icon or image appears in the wrong placeAsset check
Command or reference
SKILL.md · Verification
Examples
Check the local file, design slot, call site, and geometry in the browser.

Figma Design to Code troubleshooting

Does installing the skill connect my Figma account?

Connect the Figma MCP server through your assistant and authorize access independently. The connected account gives the tools access to the design.

Can I turn a sparse response directly into JSX?

Use the screenshot to correlate the visible child IDs, then fetch high-fidelity context for those nodes. Start implementation after retrieving that context.

Why does the returned code differ from my app’s stack?

The tool’s response provides a design reference. Tell the assistant the project’s framework and component paths. Translate the reference into the project’s layouts, token system, and behavior, using existing and Code Connect components where they apply.