figma-generate-library
What it does
This skill guides the building of a full design system in Figma that matches your code. It is for design system teams who want variables, components, themes and foundations organized in a clear order.
When to use it
- βWhen you want to turn code tokens into Figma variables for colors, spacing and type.
- βWhen you need to build a component library in Figma that matches your app's components.
- βWhen you want light and dark modes set up and the Figma and code versions reconciled.
Skill link
https://github.com/openai/skills/blob/main/skills/.curated/figma-generate-library/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βCan you build a Figma design system from our codebase, starting with color and spacing variables?β
5 new skills a week. 1 minute to read.
How it works
The agent works in phases. It first studies the codebase, then creates tokens, components and themes in order, pausing for feedback between steps.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Design System Builder β Figma MCP Skill
Build professional-grade design systems in Figma that match code. This skill orchestrates multi-phase workflows across 20β100+ use_figma calls, enforcing quality patterns from real-world design systems (Material 3, Polaris, Figma UI3, Simple DS).
Prerequisites: The figma-use skill MUST also be loaded for every use_figma call. It provides Plugin API syntax rules (return pattern, page reset, ID return, font loading, color range). This skill provides design system domain knowledge and workflow orchestration.
Always pass skillNames: "figma-generate-library" when calling use_figma as part of this skill. This is a logging parameter β it does not affect execution.
1. The One Rule That Matters Most
This is NEVER a one-shot task. Building a design system requires 20β100+ use_figma calls across multiple phases, with mandatory user checkpoints between them. Any attempt to create everything in one call WILL produce broken, incomplete, or unrecoverable results. Break every operation to the smallest useful unit, validate, get feedback, proceed.
2. Mandatory Workflow
Every design system build follows this phase order. Skipping or reordering phases causes structural failures that are expensive to undo.
Phase 0: DISCOVERY (always first β no use_figma writes yet)
0a. Analyze codebase β extract tokens, components, naming conventions
0b. Inspect Figma file β pages, variables, components, styles, existing conventions
0c. Search subscribed libraries β use search_design_system for reusable assets
0d. Lock v1 scope β agree on exact token set + component list before any creation
0e. Map code β Figma β resolve conflicts (code and Figma disagree = ask user)
β USER CHECKPOINT: present full plan, await explicit approval
Phase 1: FOUNDATIONS (tokens first β always before components)
1a. Create variable collections and modes
1b. Create primitive variables (raw values, 1 mode)
1c. Create semantic variables (aliased to primitives, mode-aware)
1d. Set scopes on ALL variables
1e. Set code syntax on ALL variables
1f. Create effect styles (shadows) and text styles (typography)
β Exit criteria: every token from the agreed plan exists, all scopes set, all code syntax set
β USER CHECKPOINT: show variable summary, await approval
Phase 2: FILE STRUCTURE (before components)
2a. Create page skeleton: Cover β Getting Started β Foundations β --- β Components β --- β Utilities
2b. Create foundations documentation pages (color swatches, type specimens, spacing bars)
β Exit criteria: all planned pages exist, foundations docs are navigable
β USER CHECKPOINT: show page list + screenshot, await approval
Phase 3: COMPONENTS (one at a time β never batch)
For EACH component (in dependency order: atoms before molecules):
3a. Create dedicated page
3b. Build base component with auto-layout + full variable bindings
3c. Create all variant combinations (combineAsVariants + grid layout)
3d. Add component properties (TEXT, BOOLEAN, INSTANCE_SWAP)
3e. Link properties to child nodes
3f. Add page documentation (title, description, usage notes)
3g. Validate: get_metadata (structure) + get_screenshot (visual)
3h. Optional: lightweight Code Connect mapping while context is fresh
β Exit criteria: variant count correct, all bindings verified, screenshot looks right
β USER CHECKPOINT per component: show screenshot, await approval before next component
Phase 4: INTEGRATION + QA (final pass)
4a. Finalize all Code Connect mappings
4b. Accessibility audit (contrast, min touch targets, focus visibility)
4c. Naming audit (no duplicates, no unnamed nodes, consistent casing)
4d. Unresolved bindings audit (no hardcoded fills/strokes remaining)
4e. Final review screenshots of every page
β USER CHECKPOINT: complete sign-off
3. Critical Rules
Plugin API basics (from use_figma skill β enforced here too):
- Use
returnto send data back (auto-serialized). Do NOT wrap in IIFE or call closePlugin. - Return ALL created/mutated node IDs in every return value
- Page context resets each call β always
await figma.setCurrentPageAsync(page)at start figma.notify()throws β never use it- Colors are 0β1 range, not 0β255
- Font MUST be loaded before any text write:
await figma.loadFontAsync({family, style})
Design system rules:
- Variables BEFORE components β components bind to variables. No
FAQ
Is this a one-step task?
No. The skill says building a design system takes many separate steps with checkpoints between them.
Which other skill does it need?
It needs the figma-use skill loaded for every Figma write, since that skill covers the Plugin API rules.
Does it cover light and dark themes?
Yes. Theming with light and dark modes is one of its phases.
Details
Original description by the author
Build or update a professional-grade design system in Figma from a codebase. Use when the user wants to create variables/tokens, build component libraries, set up theming (light/dark modes), document foundations, or reconcile gaps between code and Figma. This skill teaches WHAT to build and in WHAT ORDER β it complements the `figma-use` skill which teaches HOW to call the Plugin API. Both skills should be loaded together.
repo: openai/skills
Popularity
- GitHub stars
- 28k
- Ranking position
- #9852
- License
- β
- Updated
- 10/28/2026
Comments
- β¦
More skills from this repository
aspnet-core
28kHelps your agent build, review or upgrade ASP.NET Core web apps, choosing the right app type and following current Microsoft guidance for .NET.
chatgpt-apps
28kHelps your agent build a ChatGPT app that pairs an MCP server with a widget UI, covering tool design, UI resources, metadata and local setup.
cli-creator
28kHelps your agent turn API docs, a spec or existing scripts into a reusable command-line tool that runs from any folder and returns stable JSON.
define-goal
28kHelps your agent turn a vague intention into a clear, measurable goal with success criteria, scope and a stop condition before work begins.
Similar skills
canvas
394kLets your agent show a hosted visual widget on a connected Mac panel, then hide the panel or move it to another page.
control-ui
394kHelps your agent organize and troubleshoot the OpenClaw Control UI, including sessions, dashboards, and connected Gateways.
diagram-maker
394kHelps your agent create clear diagrams as SVG, HTML, or editable Excalidraw files for processes, system architecture, and whiteboard sketches.