Borrowing it
Nothing to install: this file belongs to dzhng/duet-agent. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/dzhng/duet-agent/main/.agents/skills/compare-screenshots/SKILL.mdgit clone --depth 1 https://github.com/dzhng/duet-agentWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/dzhng/duet-agent/compare-screenshots)<a href="https://agentmods.dev/skills/dzhng/duet-agent/compare-screenshots"><img src="https://agentmods.dev/badge/skills/dzhng/duet-agent/compare-screenshots/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/dzhng/duet-agent/compare-screenshots"><img src="https://agentmods.dev/badge/skills/dzhng/duet-agent/compare-screenshots.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00051 | $0.02402 |
| Opus 5.5 | $0.00020 | $0.00961 |
| Sonnet 5.5 | $0.00010 | $0.00480 |
| Haiku 4.5 | $0.00005 | $0.00240 |
Grade A, and why
compare-screenshots scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 13d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 183 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Compare Screenshots
Judge images against the intended result. A user-approved design is the target; a historical baseline is only an earlier attempt and may be wrong. Metrics locate differences, never decide correctness. Use design-with-images for the full exploration-to-implementation loop.
Workflow
- Establish the target. Use the user-approved reference and stated design
requirements when available; do not replace them with your own taste. Otherwise
derive the target from the visual requirement, what the thing depicts in reality
and the domain skill that owns the look. Write it down in one or two
concrete sentences ("low sun should cast long shadows east; trees fill the
canopy; labels stay legible at this zoom").
- If the right answer isn't clear — competing valid readings, a taste or product-intent call, a tradeoff only the owner can settle — stop and ask the user what the correct answer should be. Show them the comparison. Do not quietly default to the baseline to avoid asking; that bakes in whatever the baseline got wrong.
- Confirm comparability so the differences you see are real, not capture artifacts: same viewport, DPR, route/page, frozen time/tick, camera intent, UI state, data, fonts/assets where they matter. If not comparable, fix capture setup or compare only a crop/feature where the mismatch is harmless.
- Measure the approved design. For reference matching, read and complete Reference Landmarks before changing code or accepting a candidate. Then generate artifacts sized to the question: side-by-side, key-feature crops/zooms, grayscale, absolute grayscale heatmap, pixelmatch diff, per-image Sobel/edge maps, edge-difference heatmap, JSON metrics.
- Inspect boundaries before judging the whole. For every changed visual effect, inspect all sides at native scale and in matched detail crops. Include the effect's full fade and surrounding space; a crop ending at the component box hides spill. Compare top/right/bottom/left extents separately, anchored to visible text, rules or silhouettes rather than inferred CSS bounds. Check every foreground feature crossed by the effect (lines, icons, text, adjacent panels): brightness, color, sharpness and continuity must match the target. A readable line can still be incorrectly dimmed. Record each check as reference observation → candidate observation → pass/fix/uncertain, with its crop. Use the landmark table to resolve local distances and contrast; full-frame averages cannot settle a local defect.
- Judge each divergence against the target. For every place the two images differ, name what is actually there in plain terms — missing content, wrong camera, bad hierarchy, weak contrast, wrong depth, text overlap, layout shift, clipped edge, unexpected blur, style mismatch — and decide which side is closer to correct. The answer can be the candidate, the baseline, both wrong, or a genuine toss-up.
- Get a neutral second opinion for disputed or high-stakes calls: a fresh
subagent given only the two images and neutral labels, per
references/subagent-visual-review.md. - Resolve mismatches to an approved target. When implementing a selected design, record material differences in spacing, shape, softness, typography and hierarchy; revise, recapture and repeat until resolved or the user changes the target. Do not silently exempt a difference because the code is simpler.
- Conclude with one verdict: candidate is less wrong (accept, and re-bless the baseline if one exists), baseline is less wrong (reject), both wrong (another pass needed — say what's still off), or unclear (ask the user). Accept only when every boundary/overlap check passes or has an explicit user-approved deviation; uncertainty requires closer evidence, not a pass. Overall resemblance or a positive second opinion cannot cancel a local defect. Never accept on a lower score alone or reject on a higher one. Never hide content, blur detail, crop away differences, or make the capture less truthful to move a number.
What ships with it
35 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- references/reference-landmarks.md 2.9 KB
- references/subagent-visual-review.md 3.6 KB
- scripts/visual-parity-diff.eval.mjs 14 KB runs code
- scripts/visual-parity-diff.mjs 23 KB runs code
- test/fixtures/target-without-helper-packages/candidate/fixture.png 297 B
- test/fixtures/target-without-helper-packages/README.md 70 B
- test/fixtures/target-without-helper-packages/reference/fixture.png 297 B
- test/visual-parity-diff.test.mjs 2.5 KB runs code
- vendor/pixelmatch/index.js 12 KB runs code
- vendor/pixelmatch/LICENSE 738 B
- vendor/pixelmatch/package.json 904 B
- vendor/pngjs/lib/bitmapper.js 6.3 KB runs code
- vendor/pngjs/lib/bitpacker.js 4.6 KB runs code
- vendor/pngjs/lib/chunkstream.js 4.1 KB runs code
- vendor/pngjs/lib/constants.js 662 B runs code
- vendor/pngjs/lib/crc.js 853 B runs code
- vendor/pngjs/lib/filter-pack.js 4.2 KB runs code
- vendor/pngjs/lib/filter-parse-async.js 558 B runs code
- vendor/pngjs/lib/filter-parse-sync.js 483 B runs code
- vendor/pngjs/lib/filter-parse.js 4.7 KB runs code
- vendor/pngjs/lib/format-normaliser.js 2.3 KB runs code
- vendor/pngjs/lib/interlace.js 2.0 KB runs code
- vendor/pngjs/lib/packer-async.js 1.1 KB runs code
- vendor/pngjs/lib/packer-sync.js 1.2 KB runs code
- vendor/pngjs/lib/packer.js 3.6 KB runs code
- vendor/pngjs/lib/paeth-predictor.js 372 B runs code
- vendor/pngjs/lib/parser-async.js 4.3 KB runs code
- vendor/pngjs/lib/parser-sync.js 2.5 KB runs code
- vendor/pngjs/lib/parser.js 7.5 KB runs code
- vendor/pngjs/lib/png-sync.js 252 B runs code
- vendor/pngjs/lib/png.js 4.3 KB runs code
- vendor/pngjs/lib/sync-inflate.js 3.7 KB runs code
- vendor/pngjs/lib/sync-reader.js 1.1 KB runs code
- vendor/pngjs/LICENSE 1.1 KB
- vendor/pngjs/package.json 1.8 KB
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 13d ago Changed · +2 lines 856df00e15b4
- 25d ago Changed · +58 lines · -14 tokens per session bf514a2ee89e
- 1mo ago First seen · 123 lines · 65 tokens per session scan A 77247bc2bb14
compare-screenshots is a skill published in the GitHub repository dzhng/duet-agent (52 stars, last pushed 7d ago), licensed Apache-2.0. It adds 51 tokens to every session and 2,402 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
harness-creator
Build, audit, and improve harnesses that make AI coding agents reliable: AGENTS.md/CLAUDE.md instruction files, feature/state tracking, verification gates, scope boundaries, session handoff, memory persistence, context budgets, tool-permission safety, and multi-agent coordination. Use this whenever a coding agent is…
web-design
Penguin visual language for generated web pages and app UIs — GitHub-style simplicity with a single blue accent, light and pure-black dark themes, design tokens, component and chat-interface recipes, plus an opt-in warm paper editorial theme.
a2ui
Make a reply easier to read and act on with rich blocks inside ordinary Markdown — a choice the user picks from, a form that collects several answers, a procedure as steps with warnings in place, a callout, a Mermaid diagram, a weather card, a live clock or countdown, a dashboard of gauges for a quota, a budget or a…
bento-slides
Create and edit Bento presentations — self-contained .bento.html decks whose document is JSON. Use whenever the user wants a slide deck or presentation: from scratch, from source material, or by improving an existing file.
imagegen
Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, UI mockups, product shots, or transparent-background cutouts. Use when the result should be an image asset rather than repo-native SVG, HTML/CSS, or canvas.
ui-ux-pro-max
UI/UX design intelligence for web and mobile. Includes 50+ styles, 161 color palettes, 57 font pairings, 161 product types, 99 UX guidelines, and 25 chart types across 10 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind, shadcn/ui, and HTML/CSS). Actions: plan, build, create, design…