analyze-component-set-figma

analyze-component-set-figma is a skill for Claude Code from southleft/skills-for-figma. It costs 180 tokens per session (1,233 once invoked), scanned A, original, MIT.

A Figma design-reading skill that turns a component set—a group of related component variants—into a blueprint for writing code. It identifies variant dimensions, connects interaction states to CSS or accessibility attributes, and records what changes in each state.

In plain words
What is it for?
Use it when generating code from Figma buttons, inputs, and other components with multiple sizes or states. It helps map design variants to CSS rules and ARIA attributes.
Why use it?
It removes the need to inspect many Figma variants manually and guess how they should become CSS states. The result shows the default styling and only the differences for hover, focus, disabled, or error states.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Part of the skills-for-figma plugin — 18 skills shipped together

Good fit Use it when generating code from Figma buttons, inputs, and other components with multiple sizes or states. It helps map design variants to CSS rules and ARIA attributes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/southleft/skills-for-figma/analyze-component-set-figma
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add southleft/skills-for-figma --skill analyze-component-set-figma
Clone the repo
git clone --depth 1 https://github.com/southleft/skills-for-figma

Made for: Claude Code.

Or install skills-for-figma, the plugin that ships this one along with the rest of its 18 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for analyze-component-set-figma

README.md
[![agentmods](https://agentmods.dev/badge/skills/southleft/skills-for-figma/analyze-component-set-figma/github.svg)](https://agentmods.dev/skills/southleft/skills-for-figma/analyze-component-set-figma)
Your own site
<a href="https://agentmods.dev/skills/southleft/skills-for-figma/analyze-component-set-figma"><img src="https://agentmods.dev/badge/skills/southleft/skills-for-figma/analyze-component-set-figma/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for analyze-component-set-figma

Your own site · 80×15
<a href="https://agentmods.dev/skills/southleft/skills-for-figma/analyze-component-set-figma"><img src="https://agentmods.dev/badge/skills/southleft/skills-for-figma/analyze-component-set-figma.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 180 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,233 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00180 $0.01233
Opus 5 $0.00090 $0.00616
Sonnet 5 $0.00036 $0.00247
Haiku 4.5 $0.00018 $0.00123

Measured 11d ago against content hash 4612c9d84bfc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

analyze-component-set-figma scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/analyze-component-set.js), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/analyze-component-set-figma/SKILL.md · 65 lines

How it starts

The opening of the file, as written. The whole thing — 65 lines — stays where its author put it; the contents beside it link to each section on GitHub.

analyze-component-set-figma — 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 deep-component-figma.
  • Reorganizing variants into a labeled grid → use arrange-component-set-figma.
  • Adding/removing the properties themselves → use component-properties-figma.
  • 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. Get the COMPONENT_SET id. From the user's selection (figma_get_selection), a search, or a node id they paste. It must be the set, not an individual variant — the script validates type.
  2. Run scripts/analyze-component-set.js via use_figma (skillNames: "analyze-component-set-figma"). Set const COMPONENT_SET_ID at the top first.
  3. Read the result. It returns 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.
  4. Generate code. Implement the default variant from 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.
  5. Validate. Cross-check that every state in stateMachine.states got a CSS rule, and that token names in the diff (e.g. Color/Brand/Primary) resolve to your exported tokens.

Read the full file on GitHub · 65 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 65 lines · 180 tokens per session scan A 4612c9d84bfc

Subscribe to this mod's changes

analyze-component-set-figma is a skill published in the GitHub repository southleft/skills-for-figma (14 stars, last pushed 3mo ago), licensed MIT. It adds 180 tokens to every session and 1,233 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

design-to-code-check

Check alignment between a specific design specification and its code implementation — a focused, single-component or single-screen comparison. Trigger when someone says: does this match the design, check implementation, design code alignment, what's different between the design and the build, spec check…

murphytrueman/design-system-ops · 95 tokens

figma-design-handoff

Figma-to-code design handoff patterns including Figma Variables to design tokens pipeline, component spec extraction, Dev Mode inspection, Auto Layout to CSS Flexbox/Grid mapping, and visual regression with Applitools. Use when converting Figma designs to code, documenting component specs, setting up design-dev…

yonatangross/orchestkit · 76 tokens

better-design

Build, improve, and review production interfaces with the Better Design MCP. Use for frontend design, UI, UX, interactions, flows, forms, navigation, components, styling, design systems, accessibility, responsive layouts, motion, React Native, Expo, Shopify, Three.js, and product video work, especially when creating…

marvkr/better-design · 77 tokens

design-engineering

Premium design engineering skill for agentic workflows — produces high-end, distinctive UI designs using DESIGN.md as the portable contract across Pencil MCP (in-IDE canvas), Figma MCP (team handoff + design tokens), and Google Stitch (vibe exploration + AI generation). Enforces anti-generic principles, WCAG 2.2 AA…

broomva/skills · 231 tokens

mk:figma

Read-first Figma gateway via Figma MCP: analyze designs, implement Figma-to-code for 1–3 screens, extract design tokens, produce a Figma Evidence Packet for planning handoff, screenshot fallback. Advanced operations (Code Connect, canvas writes, design-system/library patterns) are gated references loaded only on…

ngocsangyem/MeowKit · 99 tokens

fmcp-token-sync-orchestrator

Figma design token'larını kod dosyalarıyla (CSS/Tailwind/Swift/Compose) platform-agnostic senkronize eder. Diff preview + onay + write akışı zorunlu. Her platformda çalışır. Condensed-first: Essentials bölümü %80 case'i kapsar, Advanced sadece edge case'lerde.

atezer/FMCP · 79 tokens