by noemuch
Design in Figma with Claude Code. Bridge connects your terminal to the Figma Plugin API via WebSocket.
# Add to your Claude Code skills
git clone https://github.com/noemuch/bridgeCompiler-driven design generation for Figma — 100% design system compliant.
Bridge turns Claude Code into a designer that knows your design system inside out. Instead of writing raw Figma Plugin API scripts, Claude produces declarative scene graph JSON with token references. A local compiler resolves tokens, validates structure, enforces all Figma API rules, and generates correct executable code — then executes it in Figma via MCP.
The result: production-ready Figma designs that use your real components, bound variables, and text styles. Zero hardcoded values.
You describe what you want
→ Claude consults the knowledge base (your DS, documented)
→ Claude writes a CSpec (structured YAML specification)
→ Claude converts CSpec to a scene graph JSON
→ Compiler resolves tokens, validates, generates code
→ Code executes in Figma via MCP
→ You review, iterate, ship
Claude Code ──CSpec YAML──> Scene Graph JSON ──> Compiler ──Plugin API──> MCP ──> Figma
Bridge supports two MCP transports:
Claude Code ──MCP──> figma-console-mcp ──WebSocket──> Figma Desktop (preferred)
Claude Code ──MCP──> Figma MCP Server ──Cloud──> Figma Cloud (official, fallback)
Auto-detection picks the best available transport. See transport-adapter.md for details.
claude mcp add figma-console -s user \
-e FIGMA_ACCESS_TOKEN=figd_YOUR_TOKEN \
-- npx -y figma-console-mcp@latest
Get your token from Figma Settings > Personal access tokens.
npx figma-console-mcp@latest --print-path to find the plugin directoryfigma-desktop-bridge/manifest.jsoncd your-project
npx @noemuch/bridge-ds init
This scaffolds:
.claude/skills/design-workflow/ — the workflow skill + references + compiler.claude/commands/design-workflow.md — the /design-workflow slash commandspecs/ — directory for active, shipped, and dropped specsOpen Claude Code in your project:
/design-workflow setup
Claude will extract your entire DS from Figma, analyze every component, token, and style, and generate intelligent guides and a recipe index.
/design-workflow make a settings page for account information
Claude consults the knowledge base, matches recipes, generates a CSpec, compiles it to a scene graph, and executes it in Figma. Then:
- Describe changes -> Claude modifies and recompiles
- "I adjusted in Figma" -> triggers fix flow (diff + learn)
- "done" / "ship it" -> triggers done flow (archive + recipe extraction)
| Command | Purpose |
|---------|---------|
| /design-workflow make <description> | Spec + compile + execute + verify (unified flow) |
| /design-workflow fix | Diff Figma corrections, extract learnings, iterate |
| /design-workflow done | Archive spec, extract recipes, ship |
| /design-workflow setup | Extract DS + build knowledge base |
| /design-workflow status | Show current state, suggest next action |
| /design-workflow drop | Abandon with preserved learnings |
A structured YAML format that describes what to build: layout tree, components, tokens, variants. Human-readable and machine-parseable. Templates exist for screens and components.
The compiler (lib/compiler/compile.js) takes a declarative JSON scene graph with $token references and produces correct Figma Plugin API code:
node lib/compiler/compile.js --input scene.json --kb <kb-path> --transport <console|official>
Pipeline: Parse > Resolve tokens > Validate structure > Plan chunks > Generate code > Wrap for transport
The compiler enforces all 26 Figma API rules automatically (FILL after appendChild, resize before sizing, setBoundVariableForPaint, etc.). Claude never needs to remember them.
Recipes are pre-built scene graph templates stored in knowledge-base/recipes/. When a user requests a design, recipes are scored by archetype match, tag overlap, structural similarity, and confidence. High-scoring recipes pre-fill the CSpec, accelerating generation.
Recipes evolve: the fix and done flows extract learnings and patch recipes based on user corrections.
knowledge-base/
registries/ <- components.json, variables.json, text-styles.json, icons.json
guides/ <- tokens/, components/, patterns/, assets/
recipes/ <- _index.json + individual recipe JSON files
learnings.json <- Accumulated design preferences
v3.0 is a complete architecture rewrite. Key changes from v2:
make command: Replaces the old spec > design > review cycle with a single continuous flow.fix command: Snapshot diffing, learning extraction, recipe auto-patching.figma-api-rules.md, bundle.js, old action files (spec.md, design.md, review.md, quick.md, sync.md, learn.md).See CHANGELOG.md for the full list.
Bridge DS works as a plugin for:
.claude/skills/.cursor-plugin/Both use the same MCP transport and compiler infrastructure.
Built by Noe Chague — Design System @ Finary
MIT
No comments yet. Be the first to share your thoughts!