Figma
How a design gets read. The Figma dev file is the design source of truth; this skill governs how its values are extracted, not what the design says.
Nodes over screenshots
- Derive every value from the node tree, never from a rendered image.
get_metadatafor structure andget_design_contextfor the node being implemented return exact values — spacing, color, type ramp, layer and variant names, text content, hierarchy. A screenshot only supports a guess at those, and guesses land as arbitrary values (text-[13px],#4467a8) that miss the token they were supposed to hit. - Screenshots are for orientation and verification only. Use one to see roughly what a surface looks like before drilling in, or to sanity-check a build against the design after the fact. Never to read a value out of.
- A screenshot silently omits things the node tree carries: layers outside the crop,
hidden="true"variant/state layers, component and variant names, exact text, and anything obscured by an overlapping layer. Working from the image alone means never learning those exist. - When the image and the node data disagree, the node data wins. Same rule as the archived screenshot exports versus the live Figma file — the file wins.
Working a node
- Start with
get_metadataon the page or top node to map the structure, then drill into the named child nodes that matter. It is cheap and returns ids, names, types, and geometry — enough to decide what to pull in full. - Then
get_design_contexton the specific node being implemented. Load the design-to-code guidance first — the/figma-design-to-codeskill if present, otherwise theskill://figma/figma-design-to-code/SKILL.mdMCP resource. The MCP requires it, and skipping it produces code that ignores the project's own components and tokens. - Treat returned code as reference, not output. Adapt it to the project's existing components, design tokens, and conventions; never paste it in as-is.
get_variable_defsfor the token/variable values behind a node when transcribing a design-token contract rather than building a single component.hidden="true"layers are alternate states, not content to build — dropdowns, empty states, second options. Note them, build the visible state, and ask before inventing behavior for them.- A URL with no
node-idis not actionable. Ask for a node-specific URL rather than guessing a node id or defaulting to the page root.