Agent skill · Frontend

figma-analyze-component-set

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',

southleftgithub.com/southleftGitHub ↗
claude-codeships scriptsMIT
Install
npx skills add southleft/figma-console-mcp-skills --skill figma-analyze-component-set --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 5 KB
Bundled scripts: yes
Path: skills/figma-analyze-component-set/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 67
Language: JavaScript

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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

What's inside
Steps it walks through
  1. Skill boundaries
  2. Workflow
  3. How states map to CSS
  4. Notes
Ships with 1 file
  • scripts/analyze-component-set.js
More from figma-console-mcp-skills
All skills →
About this skill
What does the figma-analyze-component-set skill do?

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',

How do I install it?

Run `npx skills add southleft/figma-console-mcp-skills --skill figma-analyze-component-set --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From southleft/figma-console-mcp-skills, a repository with 67 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going