visual-review
Skill11 starsChanged 7 days agoMITView on GitHub
Comparing a screen built with @bydiorama/ui against its design pixel by pixel — exporting 1× references of frames and components, reproducing the exact state with a script, diffing on a canvas in the same browser and reading the result. Use when asked whether a screen or component matches Figma or Paper, to "match the design", to fix spacing, sizes or drift against a frame, to set up visual diffs in an app, or when a design asset URL 403s and an export is needed.
- Installs packages
18 other projects use a version of this.
Adopted by
Most recently taken up by
- Facta-Dev/beautifulqttheir own version, first seen Nov 29, 2026
- colinhacks/frizztheir own version, first seen Nov 21, 2026
- thedanielmay/visual-review-skilltheir own version, first seen Nov 16, 2026
- Yesterday-AI/ytstacktheir own version, first seen Nov 16, 2026
- somebox/pcb-kittheir own version, first seen Nov 16, 2026
- dsifry/metaswarmtheir own version, first seen Nov 8, 2026
Used with
Projects with it also use ship.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
AWSSkillship
Finalize dev work on an issue branch — update docs, push, and open a PR.
Also in 3 projects that use this
Other versions18 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 18
- ai-dynamo/dynamo★ 8.6ksame name
- nubjs/nub★ 4.5ksame name
- dsifry/metaswarm★ 443same name
- ethanplusai/astro-conversion-kit★ 114same name
- colinhacks/frizz★ 33same name
- usecompai/compound-operations-model★ 31same name
- helderberto/agent-skills★ 21same name
- markneonin/paneline★ 10same name
- robritacca-dotcom/rift-ds★ 10same name
- malinskibeniamin/skills★ 4same name
8 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- add-componentSkill
- app-motionSkill
- craftSkill
- create-skillSkill
- demo-pageSkill
- design-componentSkill
- effectsSkill
- motion-componentSkill
- motion-mediaSkill
- review-uiSkill
- static-renderingSkill
- stills-renderSkill
- video-renderSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 17 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Never skip from "read" to "fix".
- Very specific: line 26
Run the dev server, then pnpm visual [case-id …] and open visual/report.html — a wipe slider per case and the diff in red.
- Distinctive: line 115
No new red blocks on the screens you touched.
“Common” is measured: kept by at least 6 in 10 of the 17 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Visual review against the design
Eyeballing a screenshot is not a check. The first app built on Diorama
was 8–12px off on every section of its main screen, and nobody saw it until
a diff drew the difference in red. This is the method that found it, and the
script that runs it ships as the visual-diff registry item.
The loop: export → reproduce → diff → read the red → measure → fix → rerun. Never skip from "read" to "fix".
Setup, once per app
- Install the script, like any item, from the app:
npx @bydiorama/ui add visual-diff— the skill comes from theuiplugin, the script from the registry, so install it even when the skill is already loaded. It lands atscripts/visual-diff.mjs; its header documents every option. pnpm add -D playwright && pnpm exec playwright install chromium.- References in
design/references/(or pass--refs); cases inscripts/visual-cases.mjs(or--cases); the report foldervisual/goes in.gitignore. Add"visual": "node scripts/visual-diff.mjs"to scripts. - Run the dev server, then
pnpm visual [case-id …]and openvisual/report.html— a wipe slider per case and the diff in red.
1 · Export references at 1×
- Frames AND key components. A full frame tells you something moved; an element case (one row, one dialog, one picker, one toolbar) tells you what. Export the parts a screen repeats — a row that is 2px tall is 2px × 40 rows.
- 1×, always. The script captures at
deviceScaleFactor: 1; a 2× export diffs as a different size, not as a mismatch you can read. - Shadow bleed. A component export includes its drop shadow. The script
crops an element case's reference to its opaque box (alpha ≥ 250), so
targetshould be the element's own box. An export with an OPAQUE margin (a frame background around the component) defeats that — give the case an explicitrefCrop: [x, y, w, h]. - Record each reference's node URL (
CONFIG.links) so the report links back. - When the tool's asset host is blocked (Figma's MCP asset URLs return
403 in cloud sessions), get bytes as text instead of retrying the URL.
Figma:
get_screenshotwithenableBase64Responsefor a reference (withcontentsOnlyfor a component); for a vector,use_figmarunningawait node.exportAsync({ format: "SVG_STRING" })returns the SVG source. Paper:get_screenshot(scale 1) for a reference;get_jsxreturns an SVG node's markup. A raster you need as an asset: crop it from a saved screenshot — never retype base64 by hand.
2 · Reproduce the exact state
The diff is only as honest as the state behind it.
- Same data. Transcribe the frame's content into fixtures — names, copy, counts. A different name length moves every column.
- Same size.
viewport= the frame's size;fullHeightfor a frame taller than the viewport. - Scripted setup, by role and accessible name (
getByRole("dialog", { name: "Tags" })), never by coordinates: open the menu, tick the three rows, type the text the frame shows. A state you set up by hand cannot be rerun. - Fresh state per case (
CONFIG.reset: clear storage, reload); hide dev chrome the design does not draw (CONFIG.css); wait for fonts; let enter transitions settle (settleMs). The script disables animations and the caret at capture.
3 · Read the red, not the number
A design tool and Chromium rasterise glyphs differently, so 0% never happens. The percentage only compares runs of the same case.
| What the diff shows | What it is |
| A red outline of every glyph | Font rasterisation. Not a defect — unless the outline is offset (then it is position) |
| A doubled element: two copies, red where they disagree | An offset. The gap between the copies is the error in px |
| A red block | A missing, extra or mis-sized part |
| A red band along one edge of the whole case | The two images differ in size — the console prints size ref … vs actual …. Fix the size first; everything below it shifts |
| Red arcs only at the corners of an element case | The export is transparent outside a rounded box, the app has page ground there. Ignore |
| A red line where a hairline should be | Stroke placement — see the strokes trap below |
4 · Measure before you fix
Red says where; it does not say why. Before editing, hold two numbers:
// Playwright, in the reproduced state
const box = await page.getByRole("article").first().evaluate((el) => {
const r = el.getBoundingClientRect();
return { x: r.x, y: r.y, w: r.width, h: r.height };
});…and the design's own layout values for the same node: Figma
get_design_context on the section (padding, gap, sizes); Paper
get_computed_styles plus get_node_info world coordinates. Subtract.
"The row is 126px and the frame says 124" is a fix; "it looks a bit tall"
is three wrong fixes. Measure the element, then its children, until the
delta lands on one property.
Traps already paid for
| Trap | Rule |
| A 0.5px border made a 124px row 125–126px | Figma draws an inside stroke within the box (check the stroke alignment in your tool); a CSS border adds to it. On a fixed-height box use an inset outline (outline-offset negative) or an inset box-shadow |
| Masking the red away | A mask (masks) is only for what the app cannot reproduce on purpose — a sticker menu drawn over a row, rows the frame does not draw — and every mask carries a comment saying why. A mask without a reason hides the next regression |
| An empty, collapsed element still pushed its neighbours | It is still a flex child, so the container's gap applies to it. Group it with its neighbour in a gap-less wrapper, or remove it from the flow |
| Text wrapped at a different word than the design | Check the text STYLE first — the frame used Body/12 where Body/13 was assumed — before suspecting the font or the renderer |
| "Fixing" a 1px hairline | Diorama's 1.5px hairline renders at 1px in Chromium at DPR 1, and Paper's canvas snaps it the same way. Compare at the same DPR, and check what your design tool draws, before changing a stroke |
| A case that passes on the second run only | An enter transition was still running. Raise settleMs for that case, or wait for the element's final state in setup |
| A component restyled until the diff is green | When the design and a Diorama component disagree on geometry, that is a design-system gap: style through className, and report it upstream rather than forking the component silently |
| A screenshot judged at 2× in a viewer | Zoom lies about subpixels. Judge from the diff at 1×, and from the measured numbers |
Done means
No new red blocks on the screens you touched; what remains is glyph outline and the masked areas, each with its reason. Paste the before → after percentages for the touched cases into the pull request — they show the direction, the diff images show the proof.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

