Required for any bug fix or behaviour change in the Design editor (the canvas, layers, inspector and export in templates/design/app), and for clips of Design editor bugs: copy the real design, reproduce the bug on it in a browser, fix obvious bugs directly, measure Figma only when the right behaviour is unclear, and verify side by side. Not for Design's server, actions or AI generation. Runs in a Fusion branch or on your own machine.
76
96%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Low
Low-risk findings worth noting
Work like a careful engineer: reproduce the bug on the real design, fix what is obviously wrong, and measure Figma only when the right behaviour is unclear. There is no time limit; a skipped step is a failed run, so report what blocked you instead.
The harness detects a Fusion branch (FUSION_ENVIRONMENT) and otherwise
assumes your own machine. Run everything from the repo root.
| Fusion branch | Your machine | |
|---|---|---|
| Design app | 127.0.0.1:8080/design on the branch's dev gateway | .agents/skills/design-clip-repro/harness/start-dev.sh: one port and database per worktree |
| Shared browser (Figma, osmouse) | headed Chromium on display :99, DevTools :9222, started with the branch | your Chrome, started with --remote-debugging-port=9222 and logged in to Figma |
| Figma login | scripts/figma-login.mjs, from the FIGMA_COOKIES_B64 secret | your own session; the script only checks it |
| osmouse | harness/osmouse-linux (xdotool) | build once: swiftc -O .agents/skills/design-clip-repro/harness/osmouse.swift -o templates/design/.tmp/osinput/osmouse, and give the terminal Accessibility permission |
| Real designs | copy-design.mjs as the test account (DESIGN_TEST_EMAIL / DESIGN_TEST_PASSWORD) | the same, if you set those variables |
node .agents/skills/design-clip-repro/harness/doctor.mjs: PASS → go on. WAIT → run it
again (the dev server is still compiling). FAIL → report the line and its
screenshot, and stop.node .agents/skills/design-clip-repro/scripts/clip.mjs "<link>", then open
its contact sheet. Open a single frame only when you need its detail.node .agents/skills/design-clip-repro/scripts/copy-design.mjs <id>. The id
comes from clip.mjs or the URL bar in the frames; if neither shows it, ask.
It prints a production copy (the unfixed build) and a local copy (this
checkout). Read its source.json, the real HTML, before theorising.openEditor(prodCopyId, { prod: true }). Gate: change no source until
every issue is reproduced and its capture matches the clip frame (lay them
side by side with sheet). If you cannot reproduce it, stop and ask for the
design id, sharing, or the exact steps. Never prove a bug on a design you
built yourself.No clip? Same loop: get the design where the problem shows up (ask for its id), reproduce, decide, fix, verify.
| Need | Use |
|---|---|
| Harness check | harness/doctor.mjs (above) |
| Clip | scripts/clip.mjs "<link>" [atMs,...]: transcript, frames, contact sheet, design ids |
| Real design | scripts/copy-design.mjs <id or URL>; --delete-prod-copy <id> when done |
| Design editor | import { openEditor } from ".agents/skills/design-clip-repro/harness/dlib.mjs". openEditor(id, { prod, reuse }) returns page, close(), selectLayer(name), clickLabel(label, { panel }), inspector(), setField(label, value), styles(nodeId), menu(), exportPreview(path), files(), plus drag and draw helpers. reuse: true keeps the tab open in the shared browser between scripts, so only the first load is slow. End every script with await d.close(). |
| Figma | node .agents/skills/design-clip-repro/scripts/figma-login.mjs once, then open() from harness/figlib.mjs inside withLock("osmouse", …) from harness/lock.mjs: newPage(), mkText(x, y, text), tree(), selExact(name), click(label), inspector(), setField(label, value), panelShot(path). Figma runs in the one shared browser, hence the lock. |
| Side by side | node .agents/skills/design-clip-repro/harness/sheet.mjs "<title>" "Clip=<img>" "Before=<img>" …, or sheet(title, cells) in a script |
| Screenshots | shots(tag) from harness/shot.mjs; files go to templates/design/.tmp/parity/shots/ |
Write probe scripts with the file tool in templates/design/.tmp/parity/
(gitignored), import the harness by absolute path, and run them from the repo
root. Harness scripts stop themselves with an error before a command would
time out.
inspector(), styles() and
files() for values; take a screenshot only for a visual or Figma claim, and
compare with a sheet rather than opening shots one by one.Read only opens workspace files, which is why screenshots live under
templates/design/.tmp/parity/shots/.tsc of templates/design next to the
dev server and the browser has run the machine out of memory. Close editor and
Figma tabs first, prefer the changed files' tests, and cap a type check with
NODE_OPTIONS=--max-old-space-size=4096.|| fallback beside the bug usually means the layer below it is wrong.design-editor-architecture
skill: editor behaviour lives in app/pages/design-editor/commands/*.ts..agents/skills/design-clip-repro/reference/figma.md: measuring Figma in detail, and refreshing its login.agents/skills/design-clip-repro/reference/input-and-osmouse.md: HTML drag-and-drop, canvas input, osmouse.agents/skills/design-clip-repro/reference/verification.md: instrumenting, and rules that each prevented a wrong claim.agents/skills/design-clip-repro/reference/fixing.md: worked fixes and when not to fix.agents/skills/design-clip-repro/reference/tests-and-blast-radius.md: changing specs, blast radius.agents/skills/design-clip-repro/reference/performance.md: lag clips (profile on production, not a local build).agents/skills/design-clip-repro/reference/evidence.md: evidence rules and report shape.agents/skills/design-clip-repro/harness-recipes.md: more harness helpersa941a2e
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.