Claude Code Agent Development
anthropics/claude-plugins-official
Explains how to write agents for Claude Code plugins: the markdown file with YAML frontmatter, trigger descriptions, model and color settings, and system prompt design.
Orchestrates the full code-to-Figma rebuild workflow for a web application.
$ npx skills add bitovi/ai-enablement-prompts --skill figma-from-code -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install bitovi/ai-enablement-prompts figma-from-code --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/bitovi/ai-enablement-prompts.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/figma-from-code/skills/figma-from-code .claude/skills/figma-from-code && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "figma-from-code" agent skill from https://github.com/bitovi/ai-enablement-prompts/tree/main/plugins/figma-from-code/skills/figma-from-code into .claude/skills/figma-from-code/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "figma-from-code", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/bitovi/ai-enablement-prompts/tree/main/plugins/figma-from-code/skills/figma-from-codeType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add bitovi/ai-enablement-prompts --skill figma-from-code -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install bitovi/ai-enablement-prompts figma-from-code --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/bitovi/ai-enablement-prompts.git skills-src && mkdir -p .agents/skills && cp -r skills-src/plugins/figma-from-code/skills/figma-from-code .agents/skills/figma-from-code && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "figma-from-code" agent skill from https://github.com/bitovi/ai-enablement-prompts/tree/main/plugins/figma-from-code/skills/figma-from-code into .agents/skills/figma-from-code/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "figma-from-code", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add bitovi/ai-enablement-prompts --skill figma-from-code -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install bitovi/ai-enablement-prompts figma-from-code --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/bitovi/ai-enablement-prompts.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/plugins/figma-from-code/skills/figma-from-code .cursor/skills/figma-from-code && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "figma-from-code" agent skill from https://github.com/bitovi/ai-enablement-prompts/tree/main/plugins/figma-from-code/skills/figma-from-code into .cursor/skills/figma-from-code/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "figma-from-code", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/bitovi/ai-enablement-prompts.git --path plugins/figma-from-code/skills/figma-from-code--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add bitovi/ai-enablement-prompts --skill figma-from-code -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install bitovi/ai-enablement-prompts figma-from-code --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/bitovi/ai-enablement-prompts.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/plugins/figma-from-code/skills/figma-from-code .gemini/skills/figma-from-code && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "figma-from-code" agent skill from https://github.com/bitovi/ai-enablement-prompts/tree/main/plugins/figma-from-code/skills/figma-from-code into .gemini/skills/figma-from-code/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "figma-from-code", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install bitovi/ai-enablement-prompts figma-from-codeInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add bitovi/ai-enablement-prompts --skill figma-from-code -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/bitovi/ai-enablement-prompts.git skills-src && mkdir -p .github/skills && cp -r skills-src/plugins/figma-from-code/skills/figma-from-code .github/skills/figma-from-code && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "figma-from-code" agent skill from https://github.com/bitovi/ai-enablement-prompts/tree/main/plugins/figma-from-code/skills/figma-from-code into .github/skills/figma-from-code/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "figma-from-code", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add bitovi/ai-enablement-prompts --skill figma-from-code -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install bitovi/ai-enablement-prompts figma-from-code --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/bitovi/ai-enablement-prompts.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/plugins/figma-from-code/skills/figma-from-code .opencode/skills/figma-from-code && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "figma-from-code" agent skill from https://github.com/bitovi/ai-enablement-prompts/tree/main/plugins/figma-from-code/skills/figma-from-code into .opencode/skills/figma-from-code/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "figma-from-code", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
figma-from-codeOrchestrates the full code-to-Figma rebuild workflow for a web application.
Figma From Code is an agent skill from bitovi/ai-enablement-prompts. 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, phase25, phase3, phase4, phase5). Never calls usefigma or getscreenshot directly.
Its SKILL.md is about 7.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 22 other files, including scripts (for example `REVIEW.md`, `scripts/browser-connect.js` and `scripts/browser-server.js`).
It sits in Agent Workflows, covering Subagents. It works with Figma. The repository describes itself as: Prompts Bitovi uses for software development. The licence is MIT.
3 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit df229b1. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships 18 files in scripts/ (JavaScript, from the files we listed), which the agent can run.
Shell commands in SKILL.md call:
nodeFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Figma From Code loads about 7.4k tokens when it runs. Until then it costs about 85 tokens; SKILL.md has 2,075 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from bitovi/ai-enablement-prompts at commit df229b1, republished under its MIT licence (© bitovi). 2,075 words, ~7,442 tokens.
.claude/skills/figma-from-code/SKILL.md (or your agent's skills folder). This skill also uses 21 other files; get the full folder from GitHub.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.
fileKey: Figma file keyresume (optional): true to skip completed phasesconfig (optional): per-project overrides; any omitted key falls back to the generic default shown below{
"devServerUrl": "http://localhost:5173",
"devServerStart": "npm run dev",
"sourceDir": "src", // app source root
"componentsRoot": ["src/components"], // array of component directories (supports monorepos); populated after Phase 0a discovery
"pagesRoot": "src/pages", // where page/screen sources + figma-screen.json live
"cssPath": "src/index.css", // CSS custom-properties file for token extraction
"tailwindConfigPath": "tailwind.config.js", // or null for Tailwind v4 / vanilla CSS projects
"iconLibrary": "lucide-react", // or null to skip icon extraction
"skillRoot": "plugins/figma-from-code/skills/figma-from-code" // where this skill tree lives; ${CLAUDE_PLUGIN_ROOT}/skills/figma-from-code when running as an installed plugin
}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.
When dispatching a subagent:
fileKey + any state fields it needs (listed in the table below){ "success": true/false, "outputFile": "<path>" }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.
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.
Maintain .temp/figma-from-code/state.json:
{
"fileKey": "{fileKey}",
"startedAt": "ISO timestamp",
"config": {
"devServerUrl": "http://localhost:5173",
"devServerStart": "npm run dev",
"sourceDir": "packages/client/src",
"componentsRoot": ["packages/client/src/components"],
"pagesRoot": "packages/client/src/pages",
"cssPath": "packages/client/src/index.css",
"tailwindConfigPath": "packages/client/tailwind.config.js",
"iconLibrary": "lucide-react",
"skillRoot": "plugins/figma-from-code/skills/figma-from-code"
},
"phases": {
"phase0a": "complete|in_progress|pending",
"phase0b": "complete|in_progress|pending",
"phase1": "complete|in_progress|pending",
"phase2": "complete|in_progress|pending",
"phase2_5": "complete|in_progress|pending",
"phase3": "complete|in_progress|pending",
"phase4": "complete|in_progress|pending",
"phase5": "complete|in_progress|pending"
},
"tierProgress": { "tier1": "complete|complete_with_failures|in_progress|pending" },
"buildOrder": { "tierCount": 0, "tiers": [{ "tier": 1, "label": "...", "components": ["..."] }] },
"figmaNodes": {
"foundationsPageId": "...",
"componentsPageId": "...",
"screensPageId": "...",
"foundationsFrameId": "...",
"iconsFrameId": "...",
"screensFrameId": "...",
"tier1FrameId": "...",
"tier2FrameId": "..."
},
"existingCollections": [],
"existingPages": [],
"variableMapPath": ".temp/figma-from-code/variables.json",
"builtComponents": {},
"builtScreens": {},
"preExistingComponents": {},
"preExistingScreens": {},
"screenBodySize": { "w": 1440, "h": 900 },
"iconDiscovery": { "iconCount": 0, "icons": [], "assetCount": 0, "assets": [] }
}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.
Config detection (runs once, before Phase 0a). On a fresh run the orchestrator detects project-specific values before writing state.json:
package.json (root and any workspace roots) — find the dev or start script and extract the port from --port, PORT=, or Vite/CRA defaults; derive devServerUrl.componentsRoot to [] (empty array). Component directories are discovered by Phase 0a and confirmed by the user at the Wave 1 pause. Set sourceDir to the most likely app source root (e.g., src, packages/client/src) based on package.json workspace structure.pages, screens, or routes under sourceDir.src/index.css, packages/*/src/index.css, or any *.css file containing -- custom properties.tailwindConfigPath: check for tailwind.config.js, tailwind.config.ts, tailwind.config.cjs at the repo root and likely package roots; set to null if absent (Tailwind v4 / vanilla CSS project).iconLibrary: grep package.json dependencies for lucide-react, react-icons, @heroicons/react, @radix-ui/react-icons; use the first match or null.componentsRoot will be populated after Phase 0a discovery. Ask for confirmation or corrections before proceeding.config in state.json. On resume, read config from state.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.
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.
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.
| Phase | Skill file | Inputs to pass | Output file to read | State fields to update | Skip if |
|---|---|---|---|---|---|
| 0a | 1-discovery-components/SKILL.md | fileKey; config: devServerUrl, sourceDir | discovery-summary.json | buildOrder, builtComponents, preExistingComponents, preExistingScreens; also extract figma.variableCollections → existingCollections and figma.pages → existingPages from the summary | phase0a: complete |
| 0b | 2-discovery-assets/SKILL.md | config: sourceDir, iconLibrary | icons-summary.json | iconDiscovery | phase0b: complete |
| 1 | 3-setup-tokens/SKILL.md | fileKey, existingCollections; config: cssPath, tailwindConfigPath | tokens-summary.json | variableMapPath | phase1: complete AND tokens-summary.json AND variables.json AND resolved-colors.json all exist under .temp/figma-from-code/ |
| 2 | 4-setup-structure/SKILL.md | fileKey, existingPages | structure-summary.json | figmaNodes (foundationsPageId, componentsPageId, screensPageId, foundationsFrameId, iconsFrameId, screensFrameId) | phase2: complete AND page/icons/screens IDs in figmaNodes are non-null |
| 2.5 | 5-precapture/SKILL.md (one subagent) | fileKey only — subagent owns and builds all manifests itself from component-map.json; config: devServerUrl | precapture-all.json, precapture-screens.json | phases.phase2_5 | phase2_5: complete |
| 3 pre | 6-icon-preamble/SKILL.md | fileKey, figmaNodes; subagent reads builtComponents.json from disk; config: devServerUrl, componentsRoot (array) | icon-preamble-results.json | merge created into builtComponents; rewrite builtComponents.json | all icons already in builtComponents |
| 3 tiers | 7-build-component/SKILL.md (one subagent/component) | fileKey, componentName, tier, tierFrameId, componentsPageId (from figmaNodes); subagent reads builtComponents.json from disk; config: devServerUrl, componentsRoot (array) | per-component: build-results/{Name}.json | builtComponents (after each component); figmaNodes.tier{N}FrameId; rewrite builtComponents.json after each; set phases.phase3: complete after all tiers | component already in builtComponents |
| 4 | 8-build-screens/SKILL.md (one subagent/screen) | fileKey, figmaNodes, preExistingScreens; per-screen: screenName, route, pageSourceFile, keyComponents (read from component-map.json → routes/tree); subagent reads builtComponents.json from disk; config: devServerUrl, pagesRoot | build-screens.json | phases.phase4 | phase4: complete |
| 5 | 9-validate/SKILL.md | fileKey, figmaNodes, preExistingScreens, buildOrder; config: devServerUrl | validation-summary.json | phases.phase5 | always runs |
Phases have dependency constraints but several can overlap. Follow this wave structure to minimize wall-clock time:
Wave 1 (parallel): Phase 0a || Phase 0b
- 0a: static route enumeration + browser crawl + interaction pass
(interactions.json reveals dialogs/menus/edit modes) + Figma inspection
- 0b: static icon/asset scan (no Figma, no browser needed)
After Phase 0b completes: run normalization script (before the pause)
⏸ PAUSE — Component Directory Confirmation (see below); then ask
user to continue or stop
Wave 2 (as soon as normalization + Phase 0a are both done):
Phase 1 || Phase 2 (parallel — both only need 0a outputs)
⏸ PAUSE — write progress.md, ask user to continue or stop
Wave 3 (starts when normalization + Phase 1 + Phase 2 are ALL done):
Before dispatching Phase 2.5, start the shared browser server:
node {skillRoot}/scripts/browser-server.js &
(Background process. Scripts fall back to per-script browsers if it
isn't running. Phase 5 (9-validate) kills it via pw-server.pid.)
Phase 2.5 — dispatch ONE subagent with unified manifest (all
components in a single sorted batch; chunked at 15 entries per
script run to stay within the 60s timeout)
Subagent owns and builds all manifests; read precapture-all.json and precapture-screens.json after complete.
⏸ PAUSE — write progress.md, ask user to continue or stop
Wave 4 (sequential): Phase 3 preamble → Phase 3 tiers (one tier at a time)
Each tier waits for the prior tier; preamble runs before Tier 1.
Within a tier, one subagent per component (fresh context each time).
⏸ PAUSE after preamble
⏸ PAUSE after EACH tier — write progress.md, ask user
Wave 5 (parallel): Phase 4 screens — dispatch ALL in parallel
Screens only instance built components, never modify masters.
⏸ PAUSE — write progress.md, ask user to continue or stop
Wave 6 (sequential): Phase 5 validation
⏸ PAUSE — write final progress.md (build complete)At the Wave 1 pause, read componentDirectories and excludedDirectories from discovery-summary.json and present them to the user for confirmation before proceeding:
One directory found:
I found 1 component directory with {count} components:
{path}({count} components, subdirs: {list})Is this the correct directory to use?
Multiple directories found (monorepo or multi-app):
I found {N} component directories across your project:
# Directory Components Subdirs 1 {path1}{count1} {subdirs1} 2 {path2}{count2} {subdirs2} … … … … Which directories should be included? (Select all that apply, or provide a custom list.)
Zero directories found:
No component directories were automatically detected. Please provide the path(s) to your component directories.
Excluded directories (always shown if any):
The following directories were excluded by default:
{path}— {reason} (e.g., "shadcn primitives (ui/ under components/)", "test directory")Let me know if any should be included.
After the user confirms:
state.json → config.componentsRoot with the confirmed array of directory pathssourceDir from the common ancestor of all confirmed roots if it's not already set correctly (e.g., if all roots are under packages/client/src/, set sourceDir to packages/client/src; if roots span multiple packages, keep sourceDir as the repo root or the user-confirmed value)progress.mdDependency summary:
existingCollections)existingPages)component-map.json for capture data — exact URL, selector, fallbacks, interaction replay per component); Phase 1 + Phase 2 must also be done before Phase 3 can start, but Phase 2.5 itself only needs normalizationvariables.json), Phase 2 (figmaNodes), Phase 2.5 (screenshots)builtComponents), Phase 2 (figmaNodes.screensFrameId)Run the normalization script, then re-read discovery-summary.json to refresh buildOrder in state. Skip if phase0b: complete AND phase3 is in_progress or complete (normalization already applied).
node {skillRoot}/scripts/normalize-component-map.js \
.temp/figma-from-code/component-map.json \
.temp/figma-from-code/icons.json \
--writeThe script rewrites component-map.json in place with normalized names and regenerates discovery-summary.json from the normalized map. Re-read discovery-summary.json and update buildOrder in state.
After the pre-capture subagent completes, read both output files and verify that screenshot file counts are non-zero. There is no aggregation script — the orchestrator reads each file directly.
precapture-all.json — component screenshots; schema: { "components": [{ "name", "selector", "screenshotFile", "status": "captured|failed|skipped" }] }precapture-screens.json — full-page screen screenshots; schema: { "screens": [{ "screenName", "route", "pageSourceFile", "keyComponents": [], "appScreenshot", "textFile", "status": "captured|failed|skipped" }] }builtComponents.json is the on-disk pass mechanism for all Phase 3 and Phase 4 subagents — they read it directly rather than receiving builtComponents inline. Keep it in sync with state.builtComponents before every dispatch.
Write current state.builtComponents to disk before dispatching the preamble subagent:
node -e "const s=JSON.parse(require('fs').readFileSync('.temp/figma-from-code/state.json','utf-8')); require('fs').writeFileSync('.temp/figma-from-code/builtComponents.json', JSON.stringify(s.builtComponents||{},null,2));"After preamble completes, merge new icons into state.builtComponents and rewrite builtComponents.json. The file persists through all of Phase 3 and Phase 4 as the live registry of built components.
build-tier{N}.json schema:
{
"tier": 1,
"tierFrameId": "<figma-node-id>",
"status": "complete|complete_with_failures",
"completed": [{ "name": "...", "nodeId": "...", "variants": 1, "matchPct": 95 }],
"failed": [{ "name": "...", "status": "failed", "reason": "..." }]
}After reading build-tier{N}.json, extract tierFrameId and store it as figmaNodes.tier{N}FrameId in state. Then run:
node {skillRoot}/scripts/collect-tier-results.js --tier {N} --components "{comma-separated}" --tier-frame-id "{tierFrameId}"Read stdout for the one-line JSON summary. Then follow the End-of-Phase Pause Protocol: update state.json, write progress.md, and ask the user whether to continue to the next tier or stop. Each tier is a full pause point — the user may stop and a new orchestrator agent can resume from the next tier.
After all screen subagents complete:
mkdir -p .temp/figma-from-code/build-results/screens
node {skillRoot}/scripts/collect-screen-results.js --screens "{comma-separated}"After every pause point, the orchestrator writes .temp/figma-from-code/progress.md — a human-readable narrative that allows a fresh orchestrator agent (with no memory of prior work) to understand what happened and where to continue.
progress.md is the handoff document. state.json is the machine-readable truth. Both must exist and stay in sync.
# Figma-from-Code Build Progress
**File Key:** {fileKey}
**Last Updated:** {ISO timestamp}
**Status:** Paused after {phase/tier description}
## Completed Phases
| Phase | Description | Key Output | Completed At |
| ----- | -------------------- | ------------------------------------------------ | ------------ |
| 0a | Component discovery | {component count} components, {tier count} tiers | {timestamp} |
| 0b | Asset/icon discovery | {icon count} icons, {asset count} assets | {timestamp} |
| ... | ... | ... | ... |
## Current State
- **Built components:** {count} / {total}
- **Tiers completed:** {N} / {total tiers}
- **Screens built:** {count} / {total}
- **Figma nodes created:** {list key node IDs}
## Next Step
**Phase to execute:** {phase ID and name}
**Prerequisites:** {what must be true — e.g., "dev server running on {devServerUrl}"}
**What it does:** {one-sentence description}
**Estimated dispatches:** {number of subagents or script runs}
## Warnings / Partial State
- {any incomplete tiers, failed retries, or pre-existing component conflicts}On every invocation, before doing any work:
.temp/figma-from-code/progress.md existsprogress.md in fullstate.json, validate it matches progress.md, skip to next incomplete phase.temp/figma-from-code/) or manual phase selectionstate.json exists (orphaned state without progress file)state.json exists → warn user, offer to reconstruct progress from state or start freshstate.json from template, proceed to Phase 0a)After completing any pause point (see Pause Points below), the orchestrator MUST:
Update state.json — mark the phase/tier complete, update all relevant state fields
Write progress.md — regenerate the full file from current state.json using the template above
Report to user — show key metrics (counts, node IDs, any warnings)
Ask the user:
"{Phase/tier} complete. {Brief metric summary}. Continue to {next phase/tier}, or stop here so a new agent can resume later?"
If user says stop → confirm progress.md is written, say "Build paused. A new agent can resume by invoking this skill." and terminate
If user says continue → proceed to the next dispatch
The orchestrator never auto-continues to the next pause point without explicit user confirmation.
Every wave boundary and every Phase 3 tier is a mandatory pause point:
| Pause Point | After | Before |
|---|---|---|
| Wave 1 → 2 | Phase 0a + 0b complete (+ normalization) | Phase 1 + Phase 2 |
| Wave 2 → 3 | Phase 1 + Phase 2 complete | Phase 2.5 |
| Wave 3 → 4 | Phase 2.5 complete | Phase 3 preamble |
| Phase 3 preamble | Icon preamble complete | Tier 1 |
| Phase 3 Tier N | Tier N complete | Tier N+1 (or Wave 5 if last tier) |
| Wave 4 → 5 | Phase 3 all tiers complete | Phase 4 screens |
| Wave 5 → 6 | Phase 4 screens complete | Phase 5 validation |
| End | Phase 5 complete | — (build finished) |
| Scenario | Action |
|---|---|
| Dev server not running | Halt before Phase 2.5, tell user to start it |
Subagent reports success: false | Report error, offer retry — never silently skip |
| State inconsistency | Trust per-tier build JSON files; rebuild state from outputs |
| Pre-existing component needs modification | Pause, apply authorization protocol, wait for user |
© bitovi, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 21 other files (scripts) in plugins/figma-from-code/skills/figma-from-code of bitovi/ai-enablement-prompts.
Open the folder on GitHubat commit df229b1
Figma From Code next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Figma From Code this skillbitovi/ai-enablement-prompts | 121 | — | ~7.4k | Automated safety check: Pass | MIT | |
| Claude Code Agent Developmentanthropics/claude-plugins-official | 37k | 8 repos | ~2.8k | Automated safety check: Pass | Apache-2.0 | |
| Subagent Driven DevelopmentAsvarox/allkaraoke | 261 | 37 repos | ~1.2k | Automated safety check: Pass | None | |
| Dispatching Parallel Agentsultralisp/ultralisp | 258 | 40 repos | ~1.5k | Automated safety check: Pass | None | |
| Paseo Advisor Second Opiniongetpaseo/paseo | 20k | 1 repos | ~756 | Automated safety check: Pass | Custom licence | |
| Task Observerrebelytics/one-skill-to-rule-them-all | 3.2k | 1 repos | ~12k | Automated safety check: Pass | CC-BY-4.0 |
anthropics/claude-plugins-official
Explains how to write agents for Claude Code plugins: the markdown file with YAML frontmatter, trigger descriptions, model and color settings, and system prompt design.
Asvarox/allkaraoke
A skill your agent uses when executing implementation plans with independent tasks in the current session
ultralisp/ultralisp
A skill your agent uses when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies
getpaseo/paseo
Launches one separate agent through Paseo to give a second opinion on the current task, with a self-contained briefing and no permission to edit files.
rebelytics/one-skill-to-rule-them-all
Monitors task execution for skill improvement opportunities.
openobserve/openobserve
Splits a change into planner, coder and independent reviewer roles: you confirm a spec, a subagent implements it, and a separate reviewer checks each round's local WIP commit.
bitovi/ai-enablement-prompts
Track reusable UI components and unextracted patterns. An agent skill from bitovi/ai-enablement-prompts.
bitovi/ai-enablement-prompts
Extract and compare computed CSS styles between a baseline URL and a dev/Storybook URL using Playwright MCP evaluate calls.
bitovi/ai-enablement-prompts
A skill your agent uses when the user asks to "create a plugin", "add a plugin", "make a new plugin", "build a plugin", or wants to package skills into an installable plugin for this marketplace.
bitovi/ai-enablement-prompts
Create React components, hooks, or utilities following the modlet pattern.
bitovi/ai-enablement-prompts
A skill your agent uses when the user asks to "create a skill", "add a skill", "make a new skill", "build a skill", or wants to automate a repeated workflow into a reusable prompt.
bitovi/ai-enablement-prompts
Create new Agent Skills for this project. An agent skill from bitovi/ai-enablement-prompts.
Works with
Categories
Orchestrates the full code-to-Figma rebuild workflow for a web application. Figma From Code is an agent skill from bitovi/ai-enablement-prompts. Orchestrates the full code-to-Figma rebuild workflow for a web application.
Figma From Code fits situations like: tasks that involve Subagents.
Run `npx skills add bitovi/ai-enablement-prompts --skill figma-from-code -a claude-code`. Or copy the skill folder (plugins/figma-from-code/skills/figma-from-code in bitovi/ai-enablement-prompts) into .claude/skills/figma-from-code in your project. Claude Code loads it when a task matches its description.
Run `npx skills add bitovi/ai-enablement-prompts --skill figma-from-code -a codex`. Or copy the skill folder (plugins/figma-from-code/skills/figma-from-code in bitovi/ai-enablement-prompts) into .agents/skills/figma-from-code in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add bitovi/ai-enablement-prompts --skill figma-from-code -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/figma-from-code, .gemini/skills/figma-from-code, .github/skills/figma-from-code and .opencode/skills/figma-from-code in your project.
Going by SKILL.md and its folder, Figma From Code needs JavaScript for the scripts in its folder and the command-line tools its instructions call (node). Our summary lists: Node.js.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Figma From Code is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 7.4k tokens (SKILL.md is roughly 30k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Figma From Code: Claude Code Agent Development (anthropics/claude-plugins-official, 37k stars), Subagent Driven Development (Asvarox/allkaraoke, 261 stars), Dispatching Parallel Agents (ultralisp/ultralisp, 258 stars) and Paseo Advisor Second Opinion (getpaseo/paseo, 20k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
bitovi (a GitHub organization) maintains it in bitovi/ai-enablement-prompts, which has 121 GitHub stars. The repository holds 40 skills in this directory. The repository was last updated on September 11, 2026.
Source: bitovi/ai-enablement-prompts on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.