compare-screenshots
Skill1 starsChanged 15 days agoMITView on GitHub
Compare screenshots against the intended design, distinguishing approved references from historical baselines. Use for iterative implementation matching, before/after visual review, objective image telemetry, or checking a lone capture for flat, empty, or badly framed content.
5 other projects use a version of this, 5 of them edited.
Adopted by
Most recently taken up by
- dzhng/jevgrepedited, first seen Nov 7, 2026
- dzhng/skillsedited, first seen Nov 4, 2026
- dzhng/duet-agentedited, first seen Oct 30, 2026
- dzhng/yapedited, first seen Oct 15, 2026
- transitive-bullshit/skillsedited, first seen Oct 13, 2026
Used with
Projects with it also use implement-spec-with-codex, audit-decisions and 2 more.
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.
dzhngSkillimplement-spec-with-codex
Run [implement-spec](../implement-spec/SKILL.md) with Codex doing the implementation passes while you orchestrate, integrate, and review. Use when the user asks to implement a spec with Codex, or to run implement-spec with Codex as the implementer.
Also in 4 projects that use this
wolverin0Skillaudit-decisions
Standardize remediation decisions, baseline-policy entries, and legal-review banners for accepted, deferred, or policy-blocked audit findings.
Also in 4 projects that use this
dzhngSkillport-features
Port a feature from an existing repository by copying its actual code and editing the copy, so its bug fixes and behavioral nuances survive, then naturalizing it to this project's names and environment. Use when asked to copy or port an existing feature (especially an exact copy), when moving one into a different framework or host, or when a previous reimplementation missed upstream behavior.
Also in 3 projects that use this
antonio-orionusSkillfind-state-machines
Report every implicit state machine in a project, with its states, transitions and flaws.
Also in 3 projects that use this
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 5
- dzhng/jevgrep★ 3.2k92% same
- dzhng/skills★ 1.5k92% same
- dzhng/yap★ 11292% same
- dzhng/duet-agent★ 5592% same
- transitive-bullshit/skills★ 590% same
Wrote their own version · 0
None found.
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 repository49 other files it gives its agents.
- AGENTS.mdAGENTS.md
- a11ySkill
- agents-mdSkill
- antislop-codeSkill
- antislop-copywritingSkill
- antislop-humanSkill
- antislop-layoutmobileSkill
- antislopSkill
- antislop-uiSkill
- askSkill
- audit-agentsSkill
- audit-choicesSkill
- audit-performanceSkill
- audit-testsSkill
- auto-researchSkill
- close-specSkill
- code-reviewSkill
- debugSkill
- design-mdSkill
- design-with-imagesSkill
- document-codebaseSkill
- eli5Skill
- eval-skillsSkill
- explore-unknownsSkill
- handoff-specSkill
- implementSkill
- learnSkill
- marketing-pagesSkill
- memorySkill
- okf-contextSkill
- preview-shotsSkill
- quick-planSkill
- ratchet-filesSkill
- refactor-cleanSkill
- rememberSkill
- repoagent-doc-generationSkill
- retroSkill
- reviewSkill
- rtkSkill
- screenshot-critiqueSkill
- specifySkill
- spec-planSkill
- spec-tasksSkill
- statusSkill
- system-designSkill
- verifySkill
- write-docsSkill
- write-skillsSkill
- write-testsSkill
The file
We split this skill into the rules it gives an agent
10 rules. 10 are common, 0 are distinctive, and 0 are very specific to this project.
10
Common
Most of the 5 edited versions we read keep these.
0
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
- Common: line 15
Establish the target: Use the user-approved reference and stated design requirements when available.
- Common: line 21
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 …
- Common: line 24
Do not quietly default to the baseline to avoid asking.
- Common: line 56
Resolve mismatches to an approved target: When implementing a selected design, record material differences in spacing, shape, softness, …
- Common: line 66
Never accept on a lower score alone or reject on a higher one.
- Common: line 96
Every metric above measures one image against another, so none of them can answer "is this capture worth anything" when there is nothing to …
- Common: line 117
Use them to decide where to look, then say what the frame is actually doing — never adjust a capture to raise a number, which is the same …
- Common: line 123
When a single fixed-pair number is useful, this default works for structural changes:
- Common: line 143
Prefer edge metrics for missing-content bugs.
- Common: line 148
If the camera is wrong, pixel scores are diagnostic only.
“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
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.
Useful Metrics
Pick metrics that answer the question. For full visual comparisons, report:
mae: mean absolute grayscale difference, 0..255, lower is closer.rmse: grayscale root mean square error, lower is closer.diffRatio16,diffRatio32,diffRatio64: fraction of pixels over each grayscale delta threshold.pixelmatchRatio: mismatch ratio from pixelmatch over grayscale images.edgeEnergyCurrentandedgeEnergyCandidate: average Sobel edge strength.edgeEnergyRatio: candidate/current. Far below 1 usually means missing geometry, props, labels, or terrain; far above 1 usually means noisy or incorrect detail.edgeDiffRatio32: fraction of pixels whose Sobel edge differs materially.avgLuminanceCurrent,avgLuminanceCandidate,avgLuminanceDelta: average brightness and delta. Use when a render is visibly too dark/light even if a broader distance score improves.- Content proxies relevant to the scene: black/void ratio, terrain-like ratio, water-like ratio, team-color ratio, label/text mask ratio.
For UI/document/layout reviews, also use crop bounds, text/foreground mask coverage, contrast checks, edge clipping, element positions, and before/after dimensions when those beat global pixel distance.
Single-Image Metrics
Every metric above measures one image against another, so none of them can answer "is this capture worth anything" when there is nothing to compare it to — and the pair score is symmetric, so an enormous distance never says which side is the empty frame. A few absolute numbers do, computed on a coarse grid from a single PNG:
colorEntropyBitsunder ~3.0, ordominantColorShareover ~0.6: one colour owns the frame. A sparse scene, an unlit one, or a subject that never drew.edgeDensityunder ~0.04: almost no form anywhere. Empty framing, a primitive-dominant scene, or the subject sitting outside the crop.luminanceContrastunder ~60: fog, darkness, or haze compressing the whole frame into one band.transparentShareabove 0 on a capture that should be opaque: the capture itself is wrong. A transparent pixel keeps whatever RGB it was left with, so an invisible frame can look rich until it is composited — the scene metrics composite before measuring, and name the invisible share rather than letting you infer it. The pair metrics above still read stored RGB, so this field is where transparency gets told either way.
These are thresholds for suspicion, not gates. A deliberately minimal design, a night scene, an empty-state screen, and a whiteboard all trip them honestly. Use them to decide where to look, then say what the frame is actually doing — never adjust a capture to raise a number, which is the same failure as cropping away a difference.
Distance Score
When a single fixed-pair number is useful, this default works for structural changes:
distance = 0.35 * diffRatio32 + 0.25 * pixelmatchRatio + 0.25 * edgeDiffRatio32 + 0.15 * min(1, abs(log2(edgeEnergyRatio)))
It measures distance from the other image, nothing more. Because the baseline can be wrong, a distance of 0 is not success and a large distance is not failure — a richer scene, clearer models, stronger labels, real depth, or better lighting all legitimately raise it. Use the score to find where the images move; decide who is right in step 5. Name the field for what it measures (distance, not "parity") so no one reads it as a verdict.
Report the full-frame score and, when UI dominates the shot, a labeled world-crop score. Use the world-crop score to locate renderer movement and keep the full-frame score so UI/camera mistakes stay visible.
Score Discipline
- Quote the previous and new distance for the same pair each iteration, then say whether the movement is toward the target, away from it, or diagnostic noise.
- Prefer edge metrics for missing-content bugs. A flat top-down map can show a deceptively moderate grayscale diff while edge energy proves trees, roads, city forms, or army silhouettes are absent.
- Segment out stable UI when it dominates and the question is the world render; keep a full-frame score too, labeled.
- If the camera is wrong, pixel scores are diagnostic only. Fix camera intent first, then judge the render.
Tooling
Visual comparison is integrated into buddhi-cli:
buddhi scripts visual-parity-diffis a built-in helper with pure Python PNG decoding and pixel-diffing (no external binary or Node dependencies needed). Run it withREFERENCE_DIR=<png-folder>,CANDIDATE_DIR=<png-folder>, and optionalOUT_DIR=<artifact-folder>.REPORT_ORDER=a,b,cpins ordering;CROPS_JSON=<file>adds labeled crops (keyed by image id, each crop in pixels or{ "unit": "ratio" }normalized bounds). Pair reports carry asceneMetricsblock per side.- Drop
REFERENCE_DIRto run the same helper on a folder with no counterpart: it writesscene-metrics.jsonwith the single-image numbers above and no diff artifacts. Use it on a lone screenshot, on a full capture set before anyone reviews it, or to find which side of a large distance is the empty one. - For other tasks, adapt the same artifact set rather than adding one-off scripts to the application. Extend the helper if a needed pair is uncovered.
References
references/reference-landmarks.md: landmark table for measuring approved designs.references/subagent-visual-review.md: neutral subagent prompt/config for an independent judgment when history could bias you.
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.

