← ClaudeAtlas

figma-analyze-component-setlisted

Analyze a Figma COMPONENT_SET as a state machine for code generation — extract variant axes (state/size/etc.), map state variants to CSS pseudo-classes (hover→:hover, focus→:focus-visible, disabled→:disabled, error→[aria-invalid]), and compute per-variant visual diffs (only what changes per state). Use when generating an interactive component from a Figma variant set — triggers: 'analyze this component set', 'turn these variants into CSS states', 'generate a button/input/checkbox from Figma variants', 'what changes between the hover and default state', 'map Figma variants to component props', 'extract the state machine for this component'. Resolves bound variables to token names. NOT covered by the native MCP's get_design_context/get_metadata, which don't give you a variant-axis→CSS-state machine.
whiskfernlowdensitylipoprotein154/figma-console-mcp-skills · ★ 0 · Web & Frontend · score 75
Install: claude install-skill whiskfernlowdensitylipoprotein154/figma-console-mcp-skills
# figma-analyze-component-set — variant state machine → CSS 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." ## Skill boundaries - **`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). - **Full recursive tree** (unlimited depth, reactions, instance refs) → use `figma-deep-component`. - **Reorganizing variants into a labeled grid** → use `figma-arrange-component-set`. - **Adding/removing the properties themselves** → use `figma-component-properties`. - This is a **design-system code-gen capability** that the native MCP's `get_design_context` / `get_metadata` do **not** provide — they return raw structure, not a variant→CSS state machine. ## Workflow 1. *