bitovi/ai-enablement-prompts/figma-from-code
Claude Code and agent skill by bitovi/ai-enablement-prompts
- community
Checking that the SKILL.md file is still in the repository.
Orchestrates the full code-to-Figma rebuild workflow for a web application. Thin dispatcher that delegates all substantial work to subagents and reads only small summary files. Runs eight tracked phases (phase0a, phase0b, phase1, phase2, phase2_5, phase3, phase4, phase5). Never calls use_figma or get_screenshot directly.
Install
npx vskill@latest install bitovi/ai-enablement-prompts/figma-from-codeSKILL.md
Skill: Build Figma from Code (Orchestrator)
Thin dispatcher. Delegates every phase to a subagent, reads only small summary files, and tracks progress in state.json. Never calls use_figma or get_screenshot directly.
Required Inputs
fileKey: Figma file keyresume(optional):trueto skip completed phasesconfig(optional): per-project overrides; any omitted key falls back to the generic default shown below
Hard Gates — Files the Orchestrator Must Never Read
The orchestrator is a thin dispatcher. It must not open, read, or load any sub-skill SKILL.md files. Those files are for subagents only.
Forbidden reads (orchestrator):
| File | Why forbidden | |
|---|---|---|
1-discovery-components/SKILL.md | Subagent reads it to execute Phase 0a | |
2-discovery-assets/SKILL.md | Subagent reads it to execute Phase 0b | |
3-setup-tokens/SKILL.md | Subagent reads it to execute Phase 1 | |
4-setup-structure/SKILL.md | Subagent reads it to execute Phase 2 | |
5-precapture/SKILL.md | Subagent reads it to execute Phase 2.5 | |
6-icon-preamble/SKILL.md | Subagent reads it to execute Phase 3 icon preamble | |
7-build-component/SKILL.md | Subagent reads it to execute per-component build + review/fix (steps 1–7) | |
8-build-screens/SKILL.md | Subagent reads it to execute Phase 4 | |
9-validate/SKILL.md | Subagent reads it to execute Phase 5 | |
10-validator/SKILL.md | Subagent reads it for validation logic and Component App Map |
What the orchestrator reads instead: only small summary/output files under .temp/figma-from-code/ (e.g., discovery-summary.json, tokens-summary.json, structure-summary.json).
If you find yourself opening a sub-skill SKILL.md to understand inputs, outputs, or workflow steps — stop. That information belongs in the dispatch table and per-phase notes in _this_ file. If those notes are missing, ask the user before proceeding.
Subagent Dispatch Pattern
When dispatching a subagent:
- Give the subagent only: the skill filepath +
fileKey+ any state fields it needs (listed in the table below) - Instruct the subagent to read its own skill file for full instructions
- Tell the subagent to report back only:
{ "success": true/false, "outputFile": "<path>" } - Read the output file yourself after the subagent completes
The orchestrator never re-explains what a skill does — the skill file is the source of truth. The orchestrator never opens a sub-skill's SKILL.md file — see Hard Gates above.
Config Placeholder Convention
Sub-skill files reference config values as {devServerUrl}, {sourceDir}, {componentsRoot}, {pagesRoot}, {cssPath}, {tailwindConfigPath}, {iconLibrary}, {skillRoot}, etc. Subagents resolve these placeholders from state.json → config before executing any commands. The orchestrator also substitutes resolved values from state.config when composing dispatch prompts so subagents always receive concrete paths and URLs.
`componentsRoot` is an array. Most config references pass the full array to subagents. Subagents that write .figma/ tracking files derive the write path from each component's sourcePath (in component-map.json) rather than from a single componentsRoot prefix. For synthetic components (icons, assets) that have no source file, use the first entry in the array.
State Ledger
Maintain .temp/figma-from-code/state.json:
Subagents do not modify state.json. Each writes its own output file; the orchestrator reads it and updates state.
figmaNodes uses the pattern tier{N}FrameId for each tier (e.g., tier1FrameId, tier2FrameId, ...). The number of keys matches buildOrder.tierCount.
Fresh Run: Initialize state.json
Config detection (runs once, before Phase 0a). On a fresh run the orchestrator detects project-specific values before writing state.json:
- Read
package.json(root and any workspace roots) — find thedevorstartscript and extract the port from--port,PORT=, or Vite/CRA defaults; derivedevServerUrl. - Set
componentsRootto[](empty array). Component directories are discovered by Phase 0a and confirmed by the user at the Wave 1 pause. SetsourceDirto the most likely app source root (e.g.,src,packages/client/src) based onpackage.jsonworkspace structure. - Locate the pages/screens directory: look for
pages,screens, orroutesundersourceDir. - Locate the CSS custom-properties file: prefer
src/index.css,packages/*/src/index.css, or any*.cssfile containing--custom properties. - Detect
tailwindConfigPath: check fortailwind.config.js,tailwind.config.ts,tailwind.config.cjsat the repo root and likely package roots; set tonullif absent (Tailwind v4 / vanilla CSS project). - Detect
iconLibrary: greppackage.jsondependencies forlucide-react,react-icons,@heroicons/react,@radix-ui/react-icons; use the first match ornull. - Present the resolved config to the user in a compact table. Note that
componentsRootwill be populated after Phase 0a discovery. Ask for confirmation or corrections before proceeding. - Persist the confirmed object as
configinstate.json. Onresume, read config fromstate.json— never re-detect.
After confirming config, create .temp/figma-from-code/state.json from the template above. Set fileKey and startedAt to current ISO timestamp; set config to the confirmed object; all phases values to "pending"; all other fields empty.
Pre-Existing Components Rule
preExistingComponents is an immutable snapshot from Phase 0a. Never update it after Phase 0a.
Hard rule: Pause and get explicit user authorization before any action that modifies, replaces, or deletes a node in preExistingComponents. This includes rebuilding, running the icon preamble over existing icons, or any Phase 3 build that resolves to a pre-existing node.
Phase Dispatch Table
All skill files live under {skillRoot}/. Shell steps (normalization after Phase 0b, aggregation scripts after Phase 3 tiers and Phase 4) are in Per-Phase Notes. After each subagent succeeds, set phases.{phase}: complete in addition to the listed state fields.
Important: Each subagent does all of its work inline — no subagent spawns further subagents. Phase 3 dispatches one subagent per component (fresh context each time). The validation subagent (Phase 5) processes all screens sequentially.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/figma-from-code/skills/figma-from-code/SKILL.md
Popularity
- 7-day trend score
- 0
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/bitovi/ai-enablement-prompts/figma-from-code)