diff

diff is a command for Claude Code from coltonbearden/carrel. It costs 29 tokens per session (685 once invoked), scanned A, original, MIT.

A command for comparing two local files, including text, structured data, PDFs, and images.

In plain words
What is it for?
Use it to compare text files, JSON, CSV, or XML data, PDF text, or image pixels; image comparisons can also produce a difference heatmap.
Why use it?
It explains what changed and distinguishes differences from actual command failures, instead of leaving you to inspect raw output.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the carrel-inspect plugin — 1 skill, 4 commands shipped together

Good fit Use it to compare text files, JSON, CSV, or XML data, PDF text, or image pixels; image comparisons can also produce a difference heatmap.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/coltonbearden/carrel/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.

Clone the repo
git clone --depth 1 https://github.com/coltonbearden/carrel

Made for: Claude Code.

Or install carrel-inspect, the plugin that ships this one along with the rest of its 1 skill, 4 commands.

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 diff

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/coltonbearden/carrel/diff"><img src="https://agentmods.dev/badge/commands/coltonbearden/carrel/diff.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 685 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.00029 $0.00685
Opus 5.5 $0.00012 $0.00274
Sonnet 5.5 $0.00006 $0.00137
Haiku 4.5 $0.00003 $0.00068

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

Security

Grade A, and why

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 1mo 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.

plugins/carrel-inspect/commands/diff.md · 50 lines

What it actually says

Compare the two files the user asked about: $ARGUMENTS

Run the carrel CLI via Bash. Map the user's request onto the real flags in the --help block below (regenerated from the CLI by scripts/sync_plugins.py; if the installed carrel diff --help differs, trust the installed version — never invent flags):

Usage: carrel diff [OPTIONS] A B

  Compare two files A and B.

  Modes: text (unified diff), struct (json: dotted-path added/removed/changed; csv: per-row/column
  cell changes; xml: element-path changes), pdf (extracted text diff + page counts), image (Pillow
  pixel diff: dimensions, changed-pixel percentage, mean channel delta; sizes are padded to a common
  canvas and the mismatch reported). auto picks by type pair and falls back to a text diff when both
  files are text-like.

  Exit status:
    0  files are identical
    1  files differ
    2  bad usage
    3  missing optional dependency (pdf mode needs pdftotext)
    4  missing/unsupported input, or no mode fits the type pair

Options:
  --json                          Machine-readable JSON output.
  --mode [auto|text|struct|image|pdf]
                                  Comparison strategy; auto picks by type pair.  [default: auto]
  --out FILE                      Image mode: write a per-pixel delta heatmap PNG here.
  --help                          Show this message and exit.
  • --mode auto (default) picks by type pair; only override when the user asks for a specific comparison:
    • text: unified diff.
    • struct: json (dotted-path added/removed/changed), csv (per-row/column cell changes), xml (element-path changes).
    • pdf: extracted-text diff plus page counts.
    • image: Pillow pixel diff — dimensions, changed-pixel percentage, mean channel delta.
  • --out FILE (image mode only): writes a per-pixel delta heatmap PNG — offer this when comparing images.

Interpret the exit code first: 0 = identical, 1 = files differ (that's data, not an error), 2 = bad usage, 3 = missing optional dependency (pdf mode needs pdftotext — relay the install hint), 4 = missing/unsupported input or no mode fits the type pair. Then summarize the differences for the user: what changed, where, and how much — not a raw dump.

Requires the carrel CLI on PATH. If carrel is not found, tell the user to install it with uv tool install carrel (see the repo's INSTALL notes), or run it as uv run carrel ... from the carrel repo root.

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. 1mo ago Changed · +25 lines 79289e59f5bb
  2. 1mo ago Changed a7ea11141234
  3. 1mo ago First seen · 25 lines · 29 tokens per session scan A d16cc8a29953

Subscribe to this mod's changes

diff is a command published in the GitHub repository coltonbearden/carrel (2 stars, last pushed yesterday), licensed MIT. It adds 29 tokens to every session and 685 once invoked, about $0.0001 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-31.