img-compare
Skill1 starsChanged 5 months agoApache-2.0View on GitHub
Visually diff two images — similarity metrics, a difference heatmap, and a labeled side-by-side (e.g. /img-compare before.png after.png)
In this repository4 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- imagemagickSkill
- img-optimizeSkill
- imgSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 16
If dimensions differ, say so up front — that alone often answers the question.
- Very specific: line 30
Read the report image to actually look at it, then report: the metric scores with a plain-language read (RMSE near 0 / SSIM near 1 = …
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/img-compare — visual diff of two images
The user wants two images compared: $ARGUMENTS
Instructions
- Consult the
imagemagickskill in this plugin for syntax and pitfalls. Identify both inputs withmagick identifyfirst — note dimensions, format, and alpha. magick compareexits 1 when images differ. That is a result, not an error — append|| trueor capture the metric from stderr. Only exit code 2 is a real failure.- If dimensions differ, say so up front — that alone often answers the question. For pixel comparison, resize a copy of the second image to match the first (
-resize WxH!) and note that the comparison is post-resize. Never modify the originals. - Compute metrics (both write the score to stderr):
magick compare -metric RMSE a.png b.png null: 2>&1 || true # 0 = identical magick compare -metric SSIM a.png b.png null: 2>&1 || true # 1 = identical - Build the visual report in one temp/derived location (never overwrite inputs):
# difference heatmap: red where pixels differ (compare's default rendering) magick compare a.png b.png diff.png || true # labeled side-by-side including the heatmap magick montage -label 'A: %f' a.png -label 'B: %f' b.png -label diff diff.png \ -tile 3x1 -geometry +8+8 -background '#f4f4f4' compare-report.png - Read the report image to actually look at it, then report: the metric scores with a plain-language read (RMSE near 0 / SSIM near 1 = near-identical), where the differences concentrate, and the path to
compare-report.png. If the images are identical, say exactly that.
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.

