npx skills add ...
npx skills add southleft/figma-console-mcp-skills --skill figma-deep-component
Extract a single Figma component (or any node) as a full recursive tree to N levels deep — every child's layout, fills/strokes/effects, typography, resolved bound variables (token names + code syntax), INSTANCE mainComponent references, prototype reactions, and annotations. Use when you need maximum-fidelity data to generate production code for ONE component — triggers: 'get the full component tree', 'deep extract this component', 'give me everything about this node for code gen', 'resolve all the tokens in this component', 'what instances does this component nest', 'extract reactions/prototype links', 'high-fidelity component spec'. Resolves bound variables to token names on ANY plan. Far deeper than the native MCP's get_design_context / get_metadata.
npx skills add southleft/figma-console-mcp-skills --skill figma-deep-component
Walk one node (usually a COMPONENT / COMPONENT_SET / INSTANCE, but any node works) recursively
to a depth you choose, capturing at every level: layout (auto-layout, padding, spacing, sizing),
visual properties (fills, strokes, stroke weight, corner radius, effects, opacity), typography for
text nodes, boundVariables resolved to token names + code syntax, INSTANCE main-component
references (including whether the main is a variant and its set), prototype reactions, and dev-mode
annotations. This is the richest single-component read for high-fidelity code generation.
use_figma rules — load the official figma-use skill first; it is the full Figma Plugin API reference. Essentials these scripts rely on: plain JS with top-level await + return (no IIFE, no figma.closePlugin(); console.log is not returned), inputs inlined as const at the top of each script, colors in 0–1 range, load fonts before any text op, await figma.getNodeByIdAsync(...), and atomic errors (a failed script applies nothing — read the error, fix, retry).figma-design-system-inventory.figma-analyze-component-set.get_design_context (rendered single-selection summary) or get_metadata (flat structure)
return — it is a design-system code-gen capability layered on top.figma_get_selection), search, or a pasted id.const DEPTH (default 10). Deep design components rarely exceed ~6
levels; use a smaller number first to keep the payload manageable, then go deeper if needed.scripts/deep-component.js via use_figma
(skillNames: "figma-deep-component"). Set const NODE_ID and const DEPTH at the top.boundVariables
token names (and their codeSyntax) over raw hex; use mainComponent refs to reuse imported
components; use reactions to wire up interaction/navigation.DEPTH (nodes past the limit are summarized with a
childCount + _depthLimitReached marker) or target a smaller sub-node id.id, name, type, visible. Hidden non-component nodes are marked _hidden and
not recursed.layoutMode, axis sizing/align, padding*, itemSpacing, counterAxisSpacing,
layoutWrap, min/max width/height, clipsContent.fills, strokes, strokeWeight, cornerRadius, effects, opacity
(only when non-default; figma.mixed values are skipped safely).characters, fontSize, fontFamily/fontStyle, fontWeight,
lineHeight, letterSpacing, alignment, truncation, case, decoration.boundVariables resolved to { id, name, collection, resolvedType, codeSyntax } per
bound property.mainComponent (id, name, key, isVariant, set name/id) + componentProperties.componentPropertyDefinitions, variantProperties.reactions (trigger + action: navigation/transition/destination).annotations (label markdown + categorized properties).VariableID: aliases._variableMapSize and _maxDepthUsed for sanity-checking.affectedNodeIds: [NODE_ID] even though this is a read — keeps the convention uniform.*