leefanv/omit-design/bootstrap-from-figma
Claude Code and agent skill by leefanv/omit-design
- community
Checking that the SKILL.md file is still in the repository.
Bootstrap a fresh omit-design project's visual theme from an existing Figma file — extract design tokens (colors + spacing) and PUT the result to the dev-server so the workspace can apply it to theme-editor. Use when the user pastes a figma.com URL and wants to seed the project's theme. Patterns are produced separately via /distill-patterns-from-prd or /add-pattern.
Install
npx vskill@latest install leefanv/omit-design/bootstrap-from-figmaSKILL.md
bootstrap-from-figma — seed a project's visual theme from Figma
When to trigger
- The user pastes a
figma.com/(design|file|board|make|slides)/...URL and says "bootstrap" / "start a project from this" / "extract the theme". - The user copied a prompt from the workspace's Bootstrap from Figma banner (LibraryPage top). That prompt names this skill explicitly and includes the URL + target preset + writeback endpoint.
Do not trigger this skill for:
- Modifying an already-imported theme (use theme-editor in the workspace).
- Writing pages — that's
new-design. This skill stops at the theme. - Suggesting patterns — patterns are produced exclusively via
/distill-patterns-from-prd(from a PRD) or/add-pattern(conversational or manual). Visual theme and patterns are intentionally decoupled.
Output contract (read first)
Produce a JSON object matching BootstrapPayload in packages/dev-server/src/handlers/bootstrap.ts:
The color keys must match the preset's `semanticColors` exactly — for preset-mobile: primary / secondary / tertiary / success / warning / danger / dark / medium / light.
The spacing keys must match baseline — for preset-mobile: xs / sm / md / lg / xl / 2xl.
Keys outside these sets are dropped by the workspace store (with a console warning).
Execution flow
Step 1 — Parse the URL
Extract fileKey and nodeId:
figma.com/design/:fileKey/:fileName?node-id=:nodeId— convert any-to:in nodeId.figma.com/design/:fileKey/branch/:branchKey/...— usebranchKeyas fileKey.figma.com/board/...— FigJam file; abort with a note that FigJam doesn't carry design tokens.
If the URL has no nodeId, you'll work at the file root.
Step 2 — Read the design
Call Figma MCP tools in this order, bailing as soon as you have enough:
- `mcp__figma__get_variable_defs` with
nodeId(or no nodeId for file root). This is the primary source — Figma Variables already carry the design tokens you want. If the file uses Variables, you'll get a clean color/number/string map. - `mcp__figma__get_metadata` — file name + page list for the
source.notes. - `mcp__figma__get_design_context` — returns React+Tailwind code with Code Connect / token hints. Use this only if Variables came back empty or sparse — fall back to extracting hex from the generated code.
- `mcp__figma__get_screenshot` — one screenshot for the
notescontext (e.g. "dark-mode app with neon accent"). Optional.
Real-world caveat: the desktop-bound Figma MCP get_variable_defs and get_design_context tools require an active layer selection in the user's Figma desktop app. If those return "nothing selected", continue with metadata + screenshot only and note in `notes` that tokens were inferred visually rather than extracted from Figma Variables.
Step 3 — Map tokens to the preset
Read packages/preset-mobile/theme/baseline.ts (or whichever preset the writeback prompt named) to see the target schema. Build a mapping table that lines up Figma variable names with the preset's semanticColors.
Common name patterns to recognize:
brand/accent/primary→primaryaccent-2/secondary→secondarycta/highlight/tertiary→tertiaryerror/destructive/red→dangercaution/alert/amber→warningpositive/confirm/green→successtext/foreground/ink-900→darktext-secondary/muted/ink-500→mediumsurface-alt/divider/ink-100→light
If you cannot find a confident match for a semantic key:
- Prefer leaving it off the output (the store keeps the baseline value).
- Record the gap in
notesso the user sees what was inferred vs. left alone.
Color values must be hex (#rrggbb or #rrggbbaa). Convert OKLCH / HSL / rgba() yourself.
For spacing, only emit keys you have actual evidence for — don't fabricate values. If Figma exposes a space/4, space/8, etc. scale, map by numeric proximity to the baseline keys (xs=4, sm=8, md=12, lg=16, xl=24, 2xl=32).
Step 4 — Write back
PUT the payload to the endpoint provided in the prompt (typically http://localhost:5173/__omit/bootstrap). The body is the JSON above, sent with Content-Type: application/json.
If the writeback endpoint is unreachable (no dev-server running, port wrong, CORS), fall back to writing the file directly: <projectRoot>/.omit/bootstrap.json. Create the .omit/ dir if needed.
Step 5 — Report to the user
A single short message:
Theme extracted from<file name>— N colors.Go to the workspace's Library page and click Apply to theme.To create patterns for this project, write a PRD and run /distill-patterns-from-prd,or invoke /add-pattern directly. Patterns are decoupled from visual theme bootstrap.
No verbose recap, no dumping the JSON — the workspace UI handles the preview.
Counter-examples
- Calling
get_design_contextfirst, thenget_variable_defs— wastes context; Variables alone usually suffice. - Emitting Figma variable names verbatim as keys (e.g.,
"brand-500": "#...") — the preset only acceptssemanticColors, so the data is dropped. - Filling
successwith#00ff00because "green" without checking the Figma — confident-looking guesses are worse than gaps. - PUTing to the wrong port (Vite dev-server) when the user is on a different one — read the endpoint from the prompt, don't hardcode.
- Adding a
patterns: [...]field to the payload — it's removed from the schema. Patterns are produced via/distill-patterns-from-prdor/add-pattern, not from Figma. - Going on to scaffold pages — stop at theme; pages are
new-design's job.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/bootstrap-from-figma/SKILL.md
Popularity
- Repository stars
- 54
- 7-day trend score
- 20
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/leefanv/omit-design/bootstrap-from-figma)