skills/golem-powers/_archive/figma-swarm/SKILL.md
Multi-agent Figma screen decomposition and component build pipeline. Use when implementing multiple screens from Figma designs, breaking down screens into components, mapping to existing component library, and coordinating parallel builds. Triggers on "decompose screens", "build from Figma", "screen components", "figma swarm", "component mapping", "design to components", or when the user shares multiple Figma screen node IDs for implementation. Also use when re-checking for design drift against Figma.
npx skillsauth add etanhey/golems figma-swarmInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Decompose Figma screens into components, map to your existing library, negotiate shared components across screens, build what's missing, and verify everything with figma-loop.
An orchestrator Claude (you) spawns one screen agent per Figma screen via /cmux-agents. Each agent decomposes its screen, maps components to the local library, and flags what needs building. Shared components are resolved through a consensus protocol — no duplicates, no conflicts. Once mapping is complete, the orchestrator reviews, consults the user, and creates Linear issues.
Orchestrator (you)
├── Screen Agent A (Personal Details)
├── Screen Agent B (Link Accounts) ←── collab/figma-swarm/<project>/
├── Screen Agent C (Search Preferences)
└── Screen Agent D (Account Settings)
│
├── component-needed.md ← shared registry (claims + status)
└── mailbox/messages.jsonl ← message passing (orchestrator ↔ agents)
| Tool | Purpose |
|------|---------|
| Figma MCP (mcp__figma__get_screenshot or mcp__figma-remote__get_screenshot) | Extract screen screenshots and component details |
| /cmux-agents skill | Spawn and manage parallel screen agents |
| /figma-loop skill | Pixel-perfect verification per component |
| Component inventory files | Know what's already built (e.g., ui-web-inventory.md, ui-native-inventory.md) |
| What you want | Workflow | |---------------|----------| | Full pipeline (decompose → map → build → verify) | workflows/orchestrate.md | | Set up collab folder for a project | workflows/setup.md | | Screen agent: decompose + map one screen | workflows/screen-agent.md | | Resolve shared component conflicts | workflows/consensus.md | | Re-check for design drift | workflows/drift.md |
Create the collab folder structure and gather inventories.
collab/figma-swarm/<project>/
├── component-needed.md # Shared component registry
├── component-map.md # Final mapping (component → local file)
├── mailbox/
│ └── messages.jsonl # JSON Lines: {to, from, type, body, read_by: []}
└── screens/
├── screen-a.md # Per-screen decomposition
└── screen-b.md
Before spawning agents, the orchestrator must:
component-needed.md with header and empty tableSpawn screen agents via /cmux-agents. Each agent's task:
component-needed.md with Figma specscollab/figma-swarm/<project>/screens/<screen-name>.mdAfter all agents finish decomposition, shared components need negotiation. This is the most important part — it prevents duplicate work and ensures consistency.
See workflows/consensus.md for the full protocol. Summary:
Claim flow:
component-needed.md for unclaimed components it needs| StatusBadge | Agent-B | CLAIMED | specs... |2-straight-consensus-loops rule: For shared components (needed by 2+ agents), all interested parties must agree on the spec twice in a row before anyone builds. This ensures:
Variant consolidation: When two agents have similar-but-not-identical components (e.g., a StatusTag with blue vs purple), they should consider:
variant or colorScheme prop?Once claims are resolved:
/figma-loop on every component they build (3 consecutive passes required)component-needed.md for status → DONEThe orchestrator (you):
The mailbox is a JSONL file at collab/figma-swarm/<project>/mailbox/messages.jsonl.
Message format:
{"id":"msg-001","ts":"2026-03-10T20:00:00Z","from":"agent-screen-a","to":"orchestrator","type":"status","body":"Decomposition complete. 12 components found, 3 need building.","read_by":[]}
Message types:
| Type | From | To | Purpose |
|------|------|----|---------|
| status | agent | orchestrator | Progress update |
| claim | agent | all | "I'm building ComponentX" |
| conflict | agent | agent(s) | "I also need ComponentX, my spec differs" |
| consensus | agent | agent(s) | "I agree with this spec" (counts toward 2-loop) |
| review | orchestrator | agent | "Reconsider this mapping" |
| done | agent | orchestrator | "My screen is fully mapped/built" |
Reading messages:
# Find unread messages for me
grep -v '"read_by".*"my-agent-name"' messages.jsonl | grep '"to":"my-agent-name"\|"to":"all"'
Marking as read:
After processing a message, append your agent name to read_by. Use Edit tool or a small script to update the JSON line.
component-needed.md)Shared file all agents read and write to track component status.
# Component Registry — <project>
| Component | Needed By | Claimed By | Status | Figma Node | Specs | Local Path |
|-----------|-----------|------------|--------|------------|-------|------------|
| StatusBadge | screen-a, screen-c | agent-a | BUILDING | 540:9301 | 24x24, green/yellow/red | — |
| BottomDrawer | screen-b, screen-d | — | UNCLAIMED | 687:6107 | full-width, 60% height | — |
| PriceSlider | screen-c | agent-c | DONE | 540:9559 | reuse from onboarding | components/PriceSlider.tsx |
Statuses: UNCLAIMED → CLAIMED → CONSENSUS → BUILDING → DONE
Re-run the decomposition workflow on screens that were previously mapped. Compare the new Figma screenshot + extracted specs against the stored component map. Flag:
See workflows/drift.md.
tools
The human-eval UX contract for Phoenix views: turn-by-turn scrollable replay (not a scorecard), hide-but-copyable IDs, collapsed thinking, identity chips, tool filters, tiny frozen starter datasets, mark-wrong-in-thread, mobile-first. Use when: building or reviewing ANY Phoenix/eval view, annotation UI, session replay, or human-grading surface. Triggers: phoenix view, eval UI, annotation view, session replay, human eval UX, grading interface. NOT for: Phoenix data pipelines/ingest (capture scripts have their own specs).
tools
macOS systems specialist — AppKit NSPanel architecture, launchd services, socket activation, MCP bridge resilience, syspolicyd, and high-frequency SwiftUI dashboards. Use when building menu-bar apps, LaunchAgents, debugging syspolicyd/Gatekeeper/TCC, resilient UDS/MCP bridges, or SwiftUI dashboards at 10Hz+.
development
Bulk LLM-judging protocol for fleet-dispatched verdict runs (KG cluster, eval harness). Use when: dispatching or running judge workers (J1/J2/RT), planning bulk-apply from verdict JSONL, or triaging evidence_degraded outputs. Triggers: judge fleet, bulk judge, R3 verdicts, kg-judge, RT gate, evidence_degraded. NOT for: single-item code review, Phoenix view UX (use phoenix-human-view), or non-judge eval pipelines.
development
Quiet-down protocol for sprint close: when the fleet wraps, delete ALL polling crons and monitors, send ONE final dashboard + ONE message, then go SILENT. Use when: fleet wraps, all workers done, overnight queue exhausted, sprint close, Etan asleep/away with nothing approved left. Triggers: fleet wrap, wrap the fleet, stand down, going quiet, sprint close. NOT for: mid-sprint monitoring (keep your loops), spawning a successor (use /session-handoff first).