| ํญ๋ชฉ | ๋ด์ฉ |
|---|---|
| Invoke | /pixel-loop |
| Aliases | /pixel, /figma:loop |
| Category | cocode-flutter |
| Complexity | high |
| MCP Servers | figma, maestro, dart |
/pixel-loop โ ๋์์ธ ๋๊ฐ์ด ๋ง์ถ๊ธฐ ์๋ ๋ฃจํ#
ํ๋ง๋๋ก#
Figma ๋์์ธ ์์๊ณผ ์ค์ ์ฑ ํ๋ฉด์ ๋๋ํ ๋๊ณ ํ๋ฆฐ ๊ณณ์ ์ฐพ์ ์๋์ผ๋ก ๊ณ ์น๊ธฐ๋ฅผ ๋ฐ๋ณตํด, ํ๋ฉด์ ์์๊ณผ ํฝ์ ๋จ์๋ก ๋๊ฐ์ด ๋ง์ถฐ ์ฃผ๋ ๊ธฐ๋ฅ์ ๋๋ค. "์์ ๋ณด๊ณ โ ์ฝ๋ ๊ณ ์น๊ณ โ ์ฑ ์๋ก๊ณ ์นจํ๊ณ โ ํ๋ฉด ์ฐ์ด์ โ ์์๊ณผ ๋น๊ต"๋ฅผ ์ฌ๋์ด ๋ง์กฑํ ๋๊น์ง ์์์ ๋๋ ค ์ฃผ๋ ์๋ ๊ฒ์ ๋ฃจํ์์.
๋๊ฐยท์ธ์ ์ฐ๋์#
- ์ ํ๋ฉด์ ๋์์ธ ์์ ๊ทธ๋๋ก ๋ง๋ค๊ณ ์ถ์ ๋ ("์ด Figma ํ๋ฉด์ ํฝ์ ํผํํธ๋ก ๊ตฌํํด ์ค")
- ๋ง๋ค์ด ๋ ํ๋ฉด์ด ์์์์ ์ด๊ธ๋ฌ์ ๋ ๋ค์ ๋ง์ถ๊ณ ์ถ์ ๋ ("์ด ํ๋ฉด์ด ๋์์ธ์ด๋ ๋ฌ๋ผ์ก์ด โ ๊ณ ์ณ ์ค")
- ํน์ ํ๋ฉด์ด ์์๊ณผ ์ผ๋ง๋ ๋ค๋ฅธ์ง ์ ๊ฒ(audit) ํ๊ณ ์ถ์ ๋
๋ฌด์์ ํด์ฃผ๋์#
- ์ฑ ํ๋ฉด์ Figma ์์๊ณผ ํฝ์ ๋จ์๋ก ๋น๊ตํด ์ฐจ์ด ๋๋ ๋ถ๋ถ์ ์ฐพ์๋ด๊ณ , ์ฝ๋๋ฅผ ๊ณ ์ณ ์์์ ๊ฐ๊น๊ฒ ๋ง์ถฐ ์ค๋๋ค.
-
๋น๊ต์ ์ด ์คํฌ๋ฆฐ์ท๊ณผ ๋น๊ต ๊ฒฐ๊ณผ ํ์ผ์ด
.claude/docs/pixel-loop/<๋ ์ง-์๊ฐ>/ํด๋์ ์ ๋ฆฌ๋์ด ๋จ์ต๋๋ค. - ์ฒ์ ์ฐ๋ ๊ฒฝ์ฐ์ ํ์ํ ์ฐ๊ฒฐ ๋๊ตฌ(Figma / Maestro / Dart)๋ฅผ ํ ๋ฒ์ ์ค์นยท๋ฑ๋กํด ์ค๋๋ค.
์ด๋ป๊ฒ ์ฐ๋์#
# ์ ํ๋ฉด ๊ตฌํ (Figma ์์ ์ฃผ์๋ง ์ฃผ๋ฉด ์์)
/pixel-loop loop https://www.figma.com/design/ < key > / < name > ?node-id= < id >
# /home ํ๋ฉด์ด ์์์์ ์ด๊ธ๋ ๊ฒ์ ๋ค์ ๋ง์ถ๊ธฐ
/pixel-loop loop < figma-url > --mode=repair --route=/home
# ํ ๋ฒ๋ง ๋น๊ตํด์ ์ ๊ฒ (๊ธฐ์กด ์คํฌ๋ฆฐ์ท vs ์์)
/pixel-loop compare --figma= < figma-url > --screenshot=.claude/docs/pixel-loop/home_actual.png
# ํ๋ฉด ์คํฌ๋ฆฐ์ท๋ง ํ ์ฅ ์ฐ๊ธฐ
/pixel-loop capture --route=/home --label=baseline
# ์ฒ์ ์ธ ๋ ๋๊ตฌ ์ค์นยท๋ฑ๋ก
/pixel-loop setup
- Figma ์์ ์ฃผ์๋ง ์ฃผ๋ฉด ์๋์ผ๋ก ์ ํ๋ฉด์ ๋ง๋๋ ๋ชจ๋(
--mode=create)๋ก ์์ํฉ๋๋ค. -
--mode=repair๋ ์ด๋ฏธ ์๋ ํ๋ฉด์ ๋ค์ ๋ง์ถ๋ ๋ชจ๋๋ก, ์ด๋ค ํ๋ฉด์ธ์ง--route(์:/home)๋ฅผ ๊ฐ์ด ์๋ ค ์ค์ผ ํฉ๋๋ค. -
๊ทธ ๋ฐ์ ํ์ฉ ์ค์ฐจ(
--tolerance), ๋ฐ๋ณต ํ์ ์ ํ(--iteration-cap), ๋น๊ต์ ์ธ ๊ธฐ๊ธฐ ์ ํ(--target) ๊ฐ์ ์ต์ ์ ๋ถ์ผ ์ ์์ต๋๋ค.
์์์ ๋ฌด์จ ์ผ์ด ๋ฒ์ด์ง๋์#
๋ณธ๊ฒฉ์ ์ผ๋ก ๋๊ธฐ ์ ์ ๋จผ์ ์ค๋น ์ํ๋ถํฐ ํ์ธํฉ๋๋ค.
-
์ฌ์ ์ ๊ฒ โ Dart ์ฐ๊ฒฐ, ํ๋ฉด์ ๋์ธ ๊ธฐ๊ธฐ(Maestro) ์ฐ๊ฒฐ, Figma ์์ ์ ๊ทผ์ด ๋ชจ๋ ๊ฐ๋ฅํ์ง ํ์ธํฉ๋๋ค. ํ๋๋ผ๋ ์ ๋๋ฉด ๋ฉ์ถ๊ณ
/pixel-loop setup์ ๋จผ์ ๋๋ฆฌ๋ผ๊ณ ์๋ดํฉ๋๋ค. - ๋ฐ๋ณต ๋ฃจํ โ ์์์ ์ฝ๊ณ (Read) โ ์ฝ๋๋ฅผ ๊ณ ์น๊ณ (Write) โ ์ฑ์ ์๋ก๊ณ ์นจํ๊ณ (Reload) โ ํ๋ฉด์ ์ฐ์ด(Capture) โ ์์๊ณผ ๋น๊ต(Compare)ํ๋ ๊ณผ์ ์, ์ฐจ์ด๊ฐ ํ์ฉ ์ค์ฐจ ์์ ๋ค ๋๊น์ง ๋ฐ๋ณตํฉ๋๋ค.
-
๊ฒฐ๊ณผ ์ ๋ฆฌ โ ๋น๊ต์ ์ด ์คํฌ๋ฆฐ์ท๊ณผ ๊ฒฐ๊ณผ๋ฅผ
.claude/docs/pixel-loop/<๋ ์ง-์๊ฐ>/ํด๋์ ์ ์ฅํฉ๋๋ค.
โ๏ธ ์์ธ ์ต์ ยท์คํ ๋ช ์ธ (๊ฐ๋ฐ์ / AI ์์ด์ ํธ์ฉ)
Triggers#
- "Implement this Figma screen pixel-perfect"
- "This screen drifted from the design โ fix it"
- "Audit
<screen>against<figma-url>"
Context Trigger Pattern#
/pixel-loop < subcommand > [args...]Subcommands#
| Subcommand | Purpose |
|---|---|
loop | Full Read โ Write โ Reload โ Capture โ Compare loop (see commands/pixel-loop/loop.md) |
capture | Maestro screenshot of the current route with metadata (commands/pixel-loop/capture.md) |
compare | One-shot visual diff between an existing screenshot and a Figma node (commands/pixel-loop/compare.md) |
setup | Install + register Figma / Maestro / Dart MCPs (commands/pixel-loop/setup.md) |
Default Behavior#
When invoked with a Figma URL only, defaults to:
/pixel-loop loop < figma-url > --mode=create --target=auto--target=auto picks the first connected Maestro device, preferring iOS Simulator โ Android Emulator โ desktop.
Examples#
# New screen implementation
/pixel-loop loop https://www.figma.com/design/ < key > / < name > ?node-id= < id >
# Drift repair on /home
/pixel-loop loop < figma-url > --mode=repair --route=/home
# One-shot audit
/pixel-loop compare --figma= < figma-url > --screenshot=.claude/docs/pixel-loop/home_actual.png
# Just grab a screenshot
/pixel-loop capture --route=/home --label=baseline
# First-time setup
/pixel-loop setupRequired Inputs#
| Mode | Required | Optional |
|---|---|---|
loop --mode=create | figma-url | --route, --target, --tolerance, --iteration-cap |
loop --mode=repair | figma-url, --route | --target, --tolerance |
capture | --route | --label, --target |
compare | --figma, --screenshot | --tolerance |
setup | โ | โ |
Prerequisites Check#
Before any non-setup subcommand runs, the command verifies:
- Dart MCP is connected (DTD URI valid).
- Maestro MCP reports at least one connected device.
- Figma MCP can resolve the given file key.
If any check fails, the command pauses and instructs the user to run /pixel-loop setup.
Output#
All output goes to .claude/docs/pixel-loop/<YYYYMMDD-HHMM>/ (see skills/pixel-loop/SKILL.md for full schema).
Related#
- Skill:
cc-flutter-pixel-loop:pixel-loop - Companion command:
cc-flutter-inspector:inspector:visual-verify - End-to-end feature pipeline:
cc-flutter-dev:figma:analyze