Analyzes a Figma COMPONENT_SET as a state machine for code generation — extracts variant axes, maps states to CSS pseudo-classes/ARIA, and computes per-variant visual diffs.
Ships in figma-console-mcp-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Take a Figma COMPONENT_SET (the purple dashed container holding all the variants of one
component) and turn it into a code-generation blueprint: which property axes are state vs size,
how each state maps to a CSS pseudo-class or ARIA attribute, and the minimal visual delta each state
applies on top of the default variant. This is the bridge between "Figma has 12 button variants" and
"emit one .btn rule + :hover/:disabled overrides."
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-deep-component.figma-arrange-component-set.figma-component-properties.get_design_context /
get_metadata do not provide — they return raw structure, not a variant→CSS state machine.figma_get_selection), a search, or a
node id they paste. It must be the set, not an individual variant — the script validates type.scripts/analyze-component-set.js via use_figma
(skillNames: "figma-analyze-component-set"). Set const COMPONENT_SET_ID at the top first.variantAxes (each axis + its options), componentProps
(non-variant TEXT/BOOLEAN/INSTANCE_SWAP props → code props), a stateMachine with cssMapping
(state name → CSS selector) and defaultSignature, and per-variant diffFromDefault.defaultSignature, then add one rule per
cssMapping entry applying only that variant's diffFromDefault. Map componentProps to
framework props: BOOLEAN→boolean, TEXT→string, INSTANCE_SWAP→ReactNode/slot, VARIANT→union.stateMachine.states got a CSS rule, and that
token names in the diff (e.g. Color/Brand/Primary) resolve to your exported tokens.The script normalizes the state axis value (case-insensitive) to a selector:
| Variant value | CSS / ARIA selector |
|---|---|
default | (base rule, no selector) |
hover | :hover |
focus / focused / focus-visible | :focus-visible |
active / pressed | :active |
disabled | :disabled, [aria-disabled="true"] |
error / invalid | [aria-invalid="true"] |
selected | [aria-selected="true"] |
checked | :checked |
loading | [aria-busy="true"] |
open / closed | `[aria-expanded="true" |
filled | .has-value |
diffFromDefault lists only the
properties that change (fill token, stroke, text color, opacity, effects, child visibility). Emit
exactly those as overrides — don't re-specify unchanged properties.boundVariables (fills/strokes) to token names when available, falling
back to raw hex. Prefer the token name in generated code.state/status/interaction is the state axis;
size/scale is the size axis. If your set names axes differently, the cssMapping may be empty —
read variantAxes and map states yourself.What SKILL.md sets; muted values are Claude Code's defaults
/figma-console-mcp-skills:figma-analyze-component-setfrom figma-console-mcp-skills
npx claudepluginhub southleft/figma-console-mcp-skills --plugin figma-console-mcp-skills23 skills in this plugin
/figjam-create-contentAuthor FigJam boards with granular control — sticky notes (single + batch), connectors between nodes, shapes-with-text, sections, tables, code blocks, and auto-arrange — plus read back board contents and the connection graph. Use when the user wants to build or edit a FigJam board element-by-element. Triggers: 'add stickies to FigJam', 'create a flowchart/diagram in FigJam', 'connect these nodes', 'make a section/table/code block in FigJam', 'auto-arrange the board', 'read what's on the FigJam board', 'map the connections'. More granular than the native generate_diagram (which produces a whole diagram in one shot). FigJam files only (figma.editorType === 'figjam'). Requires the Figma Desktop app (Plugin API)./figma-annotationsRead and write designer annotations on Figma nodes — node-level design specs that pin properties (fills, width, fontSize, etc.) and carry plain or markdown notes. Use when the user wants to document or inspect interaction specs, animation timings, easing, accessibility requirements, or implementation notes attached directly to a node. Triggers: 'add an annotation', 'annotate this node/component', 'read the annotations on…', 'what specs are pinned to this element', 'list annotation categories', 'document the focus behavior on this button in Figma'. Annotations are distinct from comments (they pin to design properties) and from the description field. Requires the Figma Desktop app (Plugin API).Other plugins' skills for the same job