Figma AI Bridge
Use this skill for the local workflow:
textFigma Desktop plugin -> localhost bridge -> lean handoff bundle -> Codex implementation
Do not use Figma REST API, Dev Mode MCP, access tokens, or Figma mutation.
Preflight
From the repo root:
bash./figma-ai-bridge doctor ./figma-ai-bridge status
If the bridge is stopped or stale:
bash./figma-ai-bridge restart
Health endpoint:
bashcurl http://localhost:4778/health
Capture Boundary
Fully automatic capture from Figma requires the Figma Desktop plugin UI. Codex can automate post-capture work once a bundle exists.
For plugin setup and user-facing troubleshooting, read references/figma-plugin-setup.md.
Bundle Workflow
Prefer commands over manual JSON inspection:
bash./figma-ai-bridge summary latest ./figma-ai-bridge validate latest
For a specific bundle:
bash./figma-ai-bridge summary out/figma-bundle_YYYY-MM-DD_HH-mm-ss ./figma-ai-bridge validate out/figma-bundle_YYYY-MM-DD_HH-mm-ss
Read references/bundle-contract.md before judging missing or extra generated files.
Post-Capture Automation
Default automation is Codex-first and batches 3 captures per task section:
bash./figma-ai-bridge auto latest
This validates the bundle and writes portable Codex task files:
codex-visual-brief-task.mdcodex-enrichment-task.md
Manual alternatives:
bash./figma-ai-bridge brief latest ./figma-ai-bridge codex latest --batch-size 3 ./figma-ai-bridge enrich latest --batch-size 3
./figma-ai-bridge brief latest creates a Codex task by default. Generated public artifacts use English headings by default. External vision providers are opt-in:
bash./figma-ai-bridge brief latest --provider omp --command 'omp -p --model gpt-5.1 {image_refs} {prompt}'
Read references/automation.md when the user asks for end-to-end automatic operation.
Implementation Reading Order
prompt.mdpage-map.mdlinks-report.mdif present./figma-ai-bridge summary <bundle>- Each relevant capture's
visual-brief.mdif present - Each relevant capture's
preview.png - Each relevant capture's
implementation.md - Each relevant capture's
ai-notes.mdif present texts.jsononly for exact strings omitted from the higher-signal filesdesign-context.jsononly for exact geometry, colors, typography, autolayout, effects, and hierarchy
Do not load manifest.json, every texts.json, or full design-context.json files by default. Work only with captures relevant to the requested implementation.
Enrichment Rules
- Use
preview.pngonce to writevisual-brief.md; do not try to replace image inspection with JSON-only analysis when visual fidelity matters. - Write generated public artifacts in English by default unless the user explicitly asks for another language.
- Use existing
visual-brief.mdandimplementation.mdfirst. Inspectpreview.pngagain only when the brief is missing or ambiguous; opentexts.jsonanddesign-context.jsonselectively. - Keep assumptions explicit. Do not invent business logic.
- After enrichment,
index/visual-briefs.mdshould link every generatedvisual-brief.mdandai-notes.md. - Index-level reports should be concrete, not placeholders:
index/ai-summary.mdindex/screen-inventory.mdindex/component-candidates.mdindex/implementation-risks.md
Failure Modes
- Bridge unavailable: run
./figma-ai-bridge restart, then./figma-ai-bridge status. - Stale bridge warning: restart before capture; otherwise Figma may use old generator code.
- No latest bundle: ask the user to run the Figma Desktop plugin or provide a bundle path.
- Validation errors: fix generator bugs before trusting the bundle for implementation.
- Cross-file links unresolved: the target file must be open in Figma Desktop; this workflow intentionally avoids Figma REST API.


