Figma Generate Library skill for Codex.
The figma-generate-library skill has Codex build or update a design system in Figma that matches your code: variables, light and dark modes, documentation pages and components with proper variants. It works in phases and checks in with you along the way. It ships in the Figma plugin for Codex.
Updated November 12, 2026 · 3 min read
At a glance
| Skill name | figma-generate-library |
| Comes with | The Figma plugin, by Figma |
| Install | codex plugin add figma@openai-curated, or /plugins in Codex |
| Codex uses it | When you ask for variables or tokens, a component library, light and dark theming, or any component in Figma, even a single one |
| Source | openai/plugins on GitHub |
What it does
The skill says up front that this is never a one-shot task: a design system takes 20 to 100 or more use_figma calls. It works through five phases in order and posts a checklist and a summary for each one:
- Discovery: reads your codebase and the Figma file, searches the available libraries, and prints a gap analysis. It waits for your approval before creating anything.
- Foundations: variable collections and modes, primitive values, semantic variables aliased to them, and text and shadow styles. Every variable gets a scope and its CSS name as code syntax.
- File structure: a page skeleton plus documentation pages with color swatches, type specimens and spacing.
- Components: one at a time, atoms first, each on its own page with variants, properties, variable bindings and a screenshot check.
- Integration and QA: Code Connect mappings, plus accessibility, naming and hard-coded-value audits.
It also sets rules from real design systems such as Material 3 and Polaris. Icons use instance swaps, not one variant per icon, and a variant matrix over 30 combinations is split up. It keeps a state file on disk so a long build can resume in a new chat, and asks you whenever code and Figma disagree.
When to use it
Use it when your tokens and components live in code and your Figma file is empty, out of date or inconsistent. Plan for a long, supervised session rather than a quick request. For single screens built from an existing library, the plugin’s figma-generate-design skill fits better.
Try it
Use the figma-generate-library skill. Build our design system in this Figma file: [Figma file URL]. Start from the tokens in src/styles/tokens.css and the components in src/components/ui. Show me the gap analysis before you create anything.
Does it work in Claude Code?
Only with the Figma MCP server connected, since every phase calls use_figma and the other Figma tools. With the server set up, copy this folder and the figma-use folder from GitHub into ~/.claude/skills. The skill requires figma-use for every call, and its helper scripts live in its own scripts folder.