figma-design-system-inventory
Skill83 starsChanged 6 months agoMITView on GitHub
One call to inventory an entire Figma design system — variables/tokens (grouped by collection + mode), components and component sets (with property definitions and per-variant visual specs), and styles (color/text/effect with resolved values). Use when you need the whole design-system picture before generating code or auditing coverage — triggers: 'inventory my design system', 'extract all tokens and components', 'what's in this design system', 'dump the design system kit', 'give me every variable, component, and style', 'build a design-system manifest', 'audit my Figma library'. Has a verbosity/scope guard so big files don't blow the response budget. Goes well beyond the native MCP's get_design_context (single-selection) / get_metadata.
In this repository22 other files it gives its agents.
- figjam-create-contentSkill
- figma-analyze-component-setSkill
- figma-annotationsSkill
- figma-arrange-component-setSkill
- figma-audit-accessibilitySkill
- figma-blame-nodeSkill
- figma-check-design-paritySkill
- figma-commentsSkill
- figma-component-propertiesSkill
- figma-deep-componentSkill
- figma-export-tokensSkill
- figma-extract-design-systemSkill
- figma-generate-changelogSkill
- figma-generate-component-docSkill
- figma-import-tokensSkill
- figma-library-variablesSkill
- figma-lint-designSkill
- figma-manage-variablesSkill
- figma-scan-code-accessibilitySkill
- figma-setup-design-tokensSkill
- figma-slidesSkill
- figma-version-historySkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 35
Consume: Use tokens for color/spacing/typography values, components[].properties for the component API, components[].variants[].visualSpec …
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
figma-design-system-inventory — unified tokens + components + styles extraction
A single use_figma call that walks the whole file and returns a structured kit:
tokens (every local variable, grouped by collection and mode), components (standalone
components + component sets, with property definitions and a compact visualSpec per variant), and
styles (paint/text/effect styles with their resolved values). It is the "read everything once"
front door for code generation and library audits.
Skill boundaries
use_figmarules — load the officialfigma-useskill first; it is the full Figma Plugin API reference. Essentials these scripts rely on: plain JS with top-levelawait+return(no IIFE, nofigma.closePlugin();console.logis not returned), inputs inlined asconstat 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).- The exact shape of each
visualSpec→ references/visual-spec.md. - One component in unlimited depth (full tree, reactions, instance refs) →
use
figma-deep-component. One variant set as a CSS state machine → usefigma-analyze-component-set. Token files on disk → usefigma-export-tokens. - This is a whole-system design capability the native MCP does not have:
get_design_contextworks on a single selection andget_metadatareturns flat structure, neither gives a unified tokens+components+styles kit on ANY plan.
Workflow
- Pick scope & verbosity to control response size on big files. Edit the constants in
scripts/inventory.js:INCLUDE— any of"tokens","components","styles"(default: all three).VERBOSITY—"full"(per-variant visual specs),"summary"(component metadata + props, no per-variant specs), or"inventory"(names/ids/counts only — for huge files).COMPONENT_NAME_FILTER— substring to limit components (e.g."Button").
- Run via
use_figma(skillNames: "figma-design-system-inventory"). Reads variables through the Plugin API, so it works on every Figma plan (no Enterprise REST requirement). - Consume. Use
tokensfor color/spacing/typography values,components[].propertiesfor the component API,components[].variants[].visualSpecfor per-state appearance, andstylesfor any style-based (non-variable) values. - If the result is still large, drop to a lower
VERBOSITYor narrowINCLUDE/COMPONENT_NAME_FILTERand re-run — don't try to page a giantfulldump.
Notes
- Colors are emitted as hex (Figma stores 0–1 RGBA internally); spacing/size values are px.
- Variables resolve aliases to token names (
{Color.Brand.Primary}-style) where possible. - Per-variant visual specs come from each variant component node — see references/visual-spec.md for the fields (fills, strokes, effects, cornerRadius, opacity, layout/padding/spacing, typography).
- This script is the open-coded, root+first-level equivalent of the bundled
figma_get_design_system_kittool, written in the nativeuse_figmaidiom so it runs without the Desktop Bridge. It captures each component/variant's root visual spec plus its direct children (childSpecs); it does not recurse deeper.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

