figma-generate-library · openai — Claude Code skill: design system from code
A skill to sync your Figma design system with your codebase. Build or update variables, components, themes, and documentation in the right order—phases matter, and skipping steps breaks the system.
npx skills add openai/skills --skill figma-generate-library -a claude-codeWhat figma-generate-library does
figma-generate-library teaches WHAT to build in Figma and IN WHAT ORDER. The skill breaks work into five phases: discovery (analyze code and file), foundations (variables and styles), structure (pages and docs), components (one at a time), and final QA. Each phase must complete and get approval before the next begins—this keeps Figma structure stable and prevents components from breaking when you add variables later.
The skill works alongside figma-use, which handles Figma Plugin API syntax. A hard rule: variables come before components, all variables have proper scopes, and each component lives on its own page. Work happens over 20–100+ use_figma calls, each one small and verifiable.
Skip phase order and the system collapses. Create components without variables, then add variables later, and you rebuild all bindings. Skip discovery and components won't match code.
What it helps with
- Create variables and modes in Figma, synced with design tokens in code
- Build a component library with variants and variable bindings
- Set up light and dark themes through Figma Variables
- Document the design system (type, color, spacing) inside Figma
- Close gaps when Figma and code disagree
Example prompts for the agent
- Build a design system in Figma: create variables for colors, spacing, and type, then build Button, Card, and Modal components with variants
- Update my Figma library: sync variables from tokens.json, then rebuild the Form component with variants for all states
- Audit the Figma design system against code: find what tokens and components exist in the codebase and in Figma, then fill the gaps
How to install figma-generate-library
1Skills CLI (Vercel)
npx skills add openai/skills --skill figma-generate-library -a claude-code2Manually: put the files in place
~/.claude/skills/figma-generate-library/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/figma-generate-library/
1Skills CLI (Vercel)
npx skills add openai/skills --skill figma-generate-library -a codex2Manually: put the files in place
.agents/skills/figma-generate-library/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add openai/skills --skill figma-generate-library -a cursor2Manually: put the files in place
.cursor/skills/figma-generate-library/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install openai/skills figma-generate-library2Manually: put the files in place
.github/skills/figma-generate-library/SKILL.md1Skills CLI (Vercel)
npx skills add openai/skills --skill figma-generate-library -a gemini-cli2Platform CLI
gemini skills install https://github.com/openai/skills --path skills/.curated/figma-generate-libraryManually: put the files in place
.devin/skills/figma-generate-library/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add openai/skills --skill figma-generate-library -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set20
The whole set →Other versions of figma-generate-library
Similar
Questions about figma-generate-library
How do I install figma-generate-library in Claude Code?
Run npx skills add openai/skills --skill figma-generate-library -a claude-code, then open the SKILL.md file in ~/.claude/skills/figma-generate-library/.
How is figma-generate-library different from figma-use?
figma-generate-library teaches design system architecture and phase order (variables → components → QA). figma-use is the Figma Plugin API—syntax for specific operations. Both load together.
Why can't I create everything at once?
Figma state changes step-by-step, and validation after each phase prevents failures. Build 100 components without variables, and rebuilding bindings later costs time.