skills/golem-powers/figma-loop/SKILL.md
Iterative Figma-to-implementation pixel-perfect verification loop. Use when implementing or refining UI from Figma designs. Drills on screenshots, comparing Figma vs implementation, fixing one thing at a time until 3 consecutive checks pass. Covers figma iteration, pixel perfect, design verification, ui drilling, figma comparison. NOT for: fetching Figma specs only (use figma-workflow docs), creating new components from scratch without a reference design.
npx skillsauth add etanhey/golems figma-loopInstall 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.
Drill on Figma designs until pixel-perfect. Compare screenshots, fix one thing at a time, repeat until 3 consecutive checks pass with no changes needed.
At least one of these Figma MCP tools must be available:
| Tool | When Available |
|------|---------------|
| mcp__figma__get_screenshot | Figma desktop app is open |
| mcp__figma-remote__get_screenshot | Always (uses API with fileKey) |
Plus browser automation for implementation screenshots:
| Tool | Purpose |
|------|---------|
| mcp__claude-in-chrome__computer | Screenshot of running app |
| mcp__claude-in-chrome__navigate | Navigate to the right page |
| mcp__claude-in-chrome__resize_window | Match Figma viewport size |
Or for React Native:
| Tool | Purpose |
|------|---------|
| Simulator screenshot | xcrun simctl io booted screenshot /tmp/screen.png |
| Device build | npx expo run:ios --device |
Track iteration progress with check.sh:
SCRIPT="~/.claude/commands/golem-powers/figma-loop/scripts/check.sh"
$SCRIPT init "WelcomeScreen" "95:72" # Start session
$SCRIPT pass # Record passing check (increments counter)
$SCRIPT fail "spacing off by 8px" # Record fail (resets counter to 0)
$SCRIPT status # Show progress (X/3 passes)
| What you want to do | Workflow | |---------------------|----------| | Full iteration loop (start to finish) | workflows/iterate.md | | Set up tracking file | workflows/setup.md | | Just do a single comparison check | workflows/check.md |
A component is only "done" when 3 consecutive checks pass with zero changes needed.
Check 1: Fix spacing → FAIL (made change) → counter resets to 0
Check 2: Fix color → FAIL (made change) → counter resets to 0
Check 3: All good → PASS → counter = 1
Check 4: All good → PASS → counter = 2
Check 5: All good → PASS → counter = 3 → DONE
Why 3? One pass could be lucky. Two could miss something. Three consecutive passes with fresh eyes each time gives confidence.
For each element, verify ALL of these:
| Category | What to Check | |----------|--------------| | Position | Top, left, right, bottom, center alignment | | Size | Width, height, padding, margin | | Colors | Background, text, border, shadow | | Typography | Font size, weight, line height, letter spacing | | Spacing | Gaps between elements, internal padding | | Order | RTL consideration (first in DOM = RIGHT visually) | | Icons | Which icon, size, color, position relative to text | | States | Default, hover, pressed, disabled, focused | | Radius | Border radius on all corners |
gap-[16px] → gap-4
p-[8px] → p-2
p-[12px] → p-3
p-[16px] → p-4
p-[24px] → p-6
rounded-[8px] → rounded-lg
rounded-[12px] → rounded-xl
rounded-[16px] → rounded-2xl
rounded-[24px] → rounded-3xl
text-[14px] → text-sm
text-[16px] → text-base
text-[18px] → text-lg
text-[20px] → text-xl
text-[24px] → text-2xl
text-[28px] → text-3xl
| Visual Position (RTL) | DOM Order | Tailwind |
|----------------------|-----------|----------|
| RIGHT | First | items-start, justify-start |
| LEFT | Last | items-end, justify-end |
Button icons in RTL:
// Icon on LEFT visually (after text in RTL)
<Button rightIcon={<Phone />}>Call</Button>
// Icon on RIGHT visually (before text in RTL)
<Button leftIcon={<Phone />}>Call</Button>
| Don't | Do Instead | |-------|------------| | Fix 5 things at once | Fix ONE thing, re-screenshot, verify | | Skip checks when "it looks close" | Always do formal screenshot comparison | | Hardcode pixel values | Use Tailwind scale or CSS vars | | Ignore RTL | Verify element order matches RTL expectations | | Guess colors | Use exact hex from Figma design context | | Stop after 1 passing check | Need 3 CONSECUTIVE passes |
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).