pixel-diff

pixel-diff is a skill for Claude Code, Codex from nathanonn/agent-skills. It costs 40 tokens per session (801 once invoked), scanned A, original, MIT.

An image comparison tool that checks two same-size screenshots or other raster images pixel by pixel. It creates visual difference files and a JSON summary of changed areas and counts.

In plain words
What is it for?
It is for checking a reference screenshot against an implementation, finding changed regions, and verifying image output.
Why use it?
It makes visual changes easier to verify than inspecting two images by eye, including whether differences stay within an allowed limit.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present.

Part of the pixel-diff plugin — 1 skill shipped together

Good fit It is for checking a reference screenshot against an implementation, finding changed regions, and verifying image output.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nathanonn/agent-skills/pixel-diff
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add nathanonn/agent-skills --skill pixel-diff
Clone the repo
git clone --depth 1 https://github.com/nathanonn/agent-skills

Made for: Claude Code, Codex.

Or install pixel-diff, the plugin that ships this one along with the rest of its 1 skill.

Wrote 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.

agentmods badge for pixel-diff

README.md
[![agentmods](https://agentmods.dev/badge/skills/nathanonn/agent-skills/pixel-diff/github.svg)](https://agentmods.dev/skills/nathanonn/agent-skills/pixel-diff)
Your own site
<a href="https://agentmods.dev/skills/nathanonn/agent-skills/pixel-diff"><img src="https://agentmods.dev/badge/skills/nathanonn/agent-skills/pixel-diff/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.

agentmods 80×15 button for pixel-diff

Your own site · 80×15
<a href="https://agentmods.dev/skills/nathanonn/agent-skills/pixel-diff"><img src="https://agentmods.dev/badge/skills/nathanonn/agent-skills/pixel-diff.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 801 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00040 $0.00801
Opus 5.5 $0.00016 $0.00320
Sonnet 5.5 $0.00008 $0.00160
Haiku 4.5 $0.00004 $0.00080

Measured 10d ago against content hash 1e9613dff0bb, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

pixel-diff 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 10d ago.

The scan reads SKILL.md. This mod also ships 8 executable files (scripts/pd_cli.py, scripts/pd_compare.py, scripts/pd_inputs.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

plugins/pixel-diff/skills/pixel-diff/SKILL.md · 43 lines

How it starts

The opening of the file, as written. The whole thing — 43 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Pixel diff

Use the bundled command to compare a reference image with a candidate. It produces a PNG comparison sheet, native-resolution masks and overlays, readable detail tiles, and JSON in a new run folder. The comparison and rendering run locally.

Run a comparison

Identify the input paths and which is the reference. A prototype is normally the reference when checking an implementation. Use the caller's output directory, or a pixel-diff-runs directory inside the current task's artifact folder.

Resolve scripts/pixel_diff.py relative to this skill's location. With Python 3.11-3.13 available:

python3 /path/to/pixel-diff/scripts/pixel_diff.py reference.png candidate.png --output ./pixel-diff-runs

On Windows, use py -3.11 instead of python3. The launcher installs pinned packages into its own environment on first use, subject to the environment's permissions. Later runs reuse them offline. If the skill folder is not writable (read-only or sandboxed installs), set PIXEL_DIFF_ENV_ROOT to a writable directory before the first run and keep it set for later runs. For setup failures, read runtime and setup.

The inputs must be equal-size PNG, JPEG, or still WebP, with 8-bit sRGB pixels and orientation already applied. Untagged images are assumed sRGB and reported as such. On dimension, color, orientation, or format errors, report the reason and the needed caller preparation. The command preserves original coordinates and does not resize or align inputs.

Choose comparison settings

The default result is exact RGBA comparison with no pass/fail verdict. Every changed coordinate counts once, including hidden RGB in transparent pixels.

  • For requested rendering-noise tolerance, add --tolerant. Keep and report the exact result alongside it. Read comparison rules when choosing a color threshold or the separate --filter-antialiasing option.
  • For an explicit acceptance budget, use --max-changed-pixels N, --max-changed-percent P, or both. Percent units are 0 through 100. Both supplied limits must pass. A tolerant verdict additionally requires --verdict-mode tolerant.
  • For caller-specified ignored areas, repeat --exclude X,Y,W,H. Exclusions affect verdict measurements only. Full-image masks and counts retain those changes.

Read the full file on GitHub · 43 lines

Changes

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.

  1. 10d ago First seen · 43 lines · 40 tokens per session scan A 1e9613dff0bb

Subscribe to this mod's changes

pixel-diff is a skill published in the GitHub repository nathanonn/agent-skills (23 stars, last pushed yesterday), licensed MIT. It adds 40 tokens to every session and 801 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-11-22.

Related

pixel-diff compared with skills from other repositories

pixel-diff next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
pixel-diffnathanonn/agent-skillsSkill23yesterdayMITA40Claude Code, Codex
webgl-holographic-foilnexu-io/open-designSkill111ktodayApache-2.0A41Claude Code, Codex
html-ppt-hermes-cyber-terminalnexu-io/open-designSkill111ktodayApache-2.0A53Claude Code, Codex
html-ppt-taste-brutalistnexu-io/open-designSkill111ktodayApache-2.0A78Claude Code, Codex
visual-ralphYeachan-Heo/oh-my-codexSkill34ktodayMITA52Codex
glance-canonical-layoutsandroid/skillsSkill11k8d agoApache-2.0A56Claude Code
accessibilitymicrosoft/hve-coreSkill1.7ktodayMITA47Claude Code