implement-figma-component

Installation
SKILL.md

Implement Figma Component

Figma's figma-design-to-code skill owns the MCP call protocol: the first get_design_context call and its screenshot, sparse responses, asset downloads, Code Connect, and component reuse. Load it first when it is available. This skill covers what it leaves out and what decides pixel fidelity: evidence beyond the selected node, values the reference code gets wrong, and measurement.

A get_design_context response renders one node, in one theme mode, at one size. Treat it as one sample of the design, not its specification.

Without Figma MCP access, work from supplied exports, specs, or screenshots; a URL alone is not evidence. Apply the same steps to whatever the evidence contains.

1. Inventory the design

  1. Call get_metadata on the selected node. Its root tag classifies it: <symbol> is a component, and a variant when its name reads Property=Value, …; <instance> is a placed copy of a component; <frame> and <section> are layout.
  2. Call get_metadata on the enclosing section or page (without nodeId it lists the pages). Find:
    • the component set: the <frame> whose children are the variant <symbol>s. A variant's design context contains that variant alone, and its prop types list one value per property. The set's design context contains every variant. The "Component descriptions" block of a response names the set's node ID when the component has a description.
    • sibling frames that show the component in another theme mode, breakpoint, or state, such as frames named "Dark", "Mobile", or "Error".
  3. Fetch the design context of the component set (or of each variant in scope) and of every sibling frame in scope. get_variable_defs and the var() fallbacks resolve in the queried node's mode, so query a node rendered in each mode the app supports.
  4. Map the variant and component properties to the code API:
    • Interaction states (Hover, Pressed, Focus, Disabled) become :hover, :active, :focus-visible, and :disabled or ARIA state styles. The reference code models them as a state prop; keep states out of the public API.
    • Other variant properties (variant, size, tone) become props. TEXT properties become text props or children, BOOLEAN properties optional parts, INSTANCE_SWAP properties slots.
Installs
9
GitHub Stars
2
First Seen
Jun 9, 2026