visual-diff
Skill4 starsChanged 6 months agoMITView on GitHub
Pixel-compare two UI states and report where they differ — implementation vs a design/reference, before vs after a change, or the current UI vs a stored baseline under ./.rolepod-uiproof/baselines/. Use when a build "still doesn't match" its design and you need to locate the differences across the whole page. First capture for a baseline_id seeds the baseline; subsequent captures diff against it.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- lklimek/claudiustheir own version, first seen Nov 29, 2026
- binay-py/claude-skillstheir own version, first seen Nov 15, 2026
- jocarrd/crux-agentstheir own version, first seen Nov 8, 2026
- NicholasFlemmer/styx-apptheir own version, first seen Oct 9, 2026
- aditya-deokar/software-factorytheir own version, first seen Sep 29, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- NicholasFlemmer/styx-app★ 32same name
- jocarrd/crux-agents★ 4same name
- binay-py/claude-skills★ 2same name
- lklimek/claudius★ 1same name
- aditya-deokar/software-factory★ 0same name
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 repository8 other files it gives its agents.
- audit-a11ySkill
- audit-page-budgetSkill
- audit-seoSkill
- check-errorsSkill
- discover-flowsSkill
- measure-cwvSkill
- scaffold-e2eSkill
- verify-uiSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
No baseline exists yet AND the user is not OK with this run becoming the baseline (the first call always seeds) — unless you pre-drop a …
- Distinctive: line 77
Run artifacts are saved under:
- Distinctive: line 91
Do not attempt another backend (D-024).
“Common” is measured: kept by at least 6 in 10 of the 5 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-diff
Single-backend skill. Calls visual_diff on the rolepod-uiproof
MCP server. No fallback (D-024).
When to use
- Design-vs-implementation comparison — the build "still doesn't match" the
design/reference and you need to locate WHERE the page differs. Seed the
baseline from the reference (point the first call at a reference URL, or
drop the design export at
./.rolepod-uiproof/baselines/<baseline_id>.png— export at 1x and match the captureviewport, or every run will reportdimension_mismatch), then diff the implementation against it. Far faster and more precise than hunting with manual scroll-and-screenshot. - Detecting visual regressions against a known-good baseline.
- Verifying a CSS / styling change does not perturb unrelated elements.
When NOT to use
- No baseline exists yet AND the user is not OK with this run becoming the baseline (the first call always seeds) — unless you pre-drop a reference image as the baseline instead.
- The page has truly dynamic content (rotating banners, live timestamps) —
the diff will be noisy.
settle(default on) already freezes CSS animations and reveals scroll content; for changing content, scope withselectoror pick a different verification approach.
Inputs
target— URL.baseline_id— short stable name (e.g.homepage-light,checkout-success).viewport— optional{ width, height }so the baseline and the current capture share dimensions. Default uses the browser's natural viewport.threshold_pct— tolerated diff fraction. Default0.1(= 10%).pixel_threshold— pixelmatch sensitivity 0..1. Default0.1.settle— defaulttrue. Before capture, scroll the full page to trigger scroll-reveal (opacity:0 + IntersectionObserver) and lazy media, wait for network idle, freeze animations, return to top. Setfalsefor static pages or to reproduce the legacy immediate capture.selector— optional CSS selector. Diff only that element's bounding box instead of the whole page (region-scoped). Use a distinctbaseline_idper region.
Outputs
run_id— folder under./.rolepod-uiproof/artifacts/.diff_pct— fraction of differing pixels.passed—diff_pct <= threshold_pct(and dimensions match).baseline_path,current_path,diff_image_path.dimension_mismatch+dimensions— when baseline and current differ in size, the overlap is diffed anddimensionscarries baseline/current sizes- width/height deltas. A mismatch fails the check; re-seed if the new size is intended.
Process
- Build
visual_diffinput from the user's intent. For design-vs-implementation work, seed the baseline from the reference first (a reference URL, or place the design export at./.rolepod-uiproof/baselines/<baseline_id>.png). - Call the tool.
- Report
diff_pct,passed, and the three image paths. If the baseline was just seeded, say so explicitly. - Root-cause when the diff fails: the diff localizes WHERE pixels differ,
not WHY. Open
diff_image_path, identify the differing region, then pull the computed styles of the elements in that region (this server's computed-style extraction tool) to explain the difference — sizing, spacing, color, typography. Optionally re-run withselectorscoped to that region to confirm the fix.
Evidence routing
Run artifacts are saved under:
- Standalone:
.rolepod-uiproof/artifacts/<prefix>_<ts>_<uuid>/ - With
rolepodparent (detected via the marker file<git-root>/.rolepod/parent-activewritten by the parent's SessionStart hook):<git-root>/.rolepod/evidence/<ts>-rolepod-uiproof-<skill>/
Baselines under .rolepod-uiproof/baselines/ are always the same location regardless of mode — they are user-curated config, not per-run evidence. Either way the run directory contains a manifest.json per Extension Protocol v1.
If the tool is unavailable
Surface plainly:
The
/visual-diffskill needs the rolepod-uiproof MCP server, which is not currently available. Confirm the plugin is installed and try again.
Do not attempt another backend (D-024).
Examples
Seed a baseline then diff
First run:
{
"open": { "platform": "web", "url": "https://example.com" },
"baseline_id": "example-home",
"viewport": { "width": 1280, "height": 720 }
}Returns passed: true, diff_pct: 0, note: "Baseline did not exist…".
Second run (after a CSS change) returns passed: false, diff_pct: 0.18,
diff_image_path: …diff.png.
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.

