diff-summary

A tool that summarizes a Git change set and groups files by likely role and review risk. A diff is the recorded difference between two versions of files.

In plain words
What is it for?
Use it to triage a pull request, inspect staged or working-tree changes, review changes against a base branch, and check whether source changes have matching test changes.
Why use it?
It shows where careful review may be needed without opening every changed file first.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/osouthgate/agent-plus/diff-summary
Any agent
npx skills add osouthgate/agent-plus --skill diff-summary
Clone the repo
git clone --depth 1 https://github.com/osouthgate/agent-plus

Made for: Claude Code, Codex.

Per session 109 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,391 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00109 $0.01391
Opus 5 $0.00055 $0.00696
Sonnet 5 $0.00022 $0.00278
Haiku 4.5 $0.00011 $0.00139

Measured yesterday against content hash e76840e23df7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

diff-summary 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 yesterday.

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.

diff-summary/skills/diff-summary/SKILL.md · 90 lines

How it starts

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

diff-summary

Structured triage of a git diff. One call replaces the per-file Read sweep an agent normally does to figure out which files in a diff are tests, which touch the public API, which are migrations, which need careful review.

Lives at ${CLAUDE_SKILL_DIR}/../../bin/diff-summary; the plugin auto-adds bin/ to PATH, so just run diff-summary ....

When to reach for this

  • User asks "what changed in this branch / triage this PR / is this safe to merge" → run diff-summary --base main --pretty. Read the summary.highRiskFiles and summary.byRole first; only Read individual files where risk is HIGH.
  • User asks "what am I about to commit" → run diff-summary --pretty (default = working tree) or diff-summary --staged --pretty after a git add.
  • Pre-PR sanity check → diff-summary --base main --risk medium --pretty shows only the files that need a second look.
  • "Did I forget to update the tests?" → check summary.sourceFilesWithoutTestChanges.

Headline command

diff-summary                              # working tree (default)
diff-summary --staged                     # staged index
diff-summary --base main                  # <base>...HEAD (3-dot merge-base)
diff-summary --range A..B                 # explicit range, passed verbatim

diff-summary --max-files 200              # cap files[] (default 200)
diff-summary --include-patches            # include raw unified diff per file (opt-in)
diff-summary --public-api-only            # filter files[] to publicApiTouched only
diff-summary --risk medium                # filter files[] to risk >= MIN
diff-summary --output /tmp/d.json --shape-depth 2  # offload large payload
diff-summary --pretty                     # indented JSON

The four diff-source flags (--staged, --base, --range, default) are mutually exclusive.

Output shape (truncated)

{
  "tool": {"name": "diff-summary", "version": "0.2.1"},
  "mode": "base",
  "base": "main",
  "head": "abc1234",
  "branch": "feature/foo",
  "summarizedAt": "2026-04-28T12:34:56Z",
  "stats": {"files": 12, "insertions": 234, "deletions": 67, "movedLinesEstimate": 18},
  "files": [
    {
      "path": "src/foo.ts",
      "status": "modified",
      "role": "source",
      "language": "typescript",
      "insertions": 42, "deletions": 5,
      "binary": false,
      "publicApiTouched": true,
      "risk": "high",
      "riskReasons": ["touches-public-api", "no-test-changes"]
    }
  ],
  "summary": {
    "byRole": {"source": 5, "test": 3, "config": 2, "doc": 1, "generated": 1},
    "highRiskFiles": ["src/foo.ts"],
    "testFilesTouched": 3,
    "sourceFilesWithoutTestChanges": ["src/bar.ts"],
    "publicApiTouches": ["src/foo.ts"],
    "migrationsTouched": [],
    "secretsRiskFiles": []
  }
}

Read the full file on GitHub · 90 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. yesterday First seen · 90 lines · 109 tokens per session scan A e76840e23df7

Subscribe to this mod's changes

diff-summary is a skill published in the GitHub repository osouthgate/agent-plus (4 stars, last pushed 1mo ago), licensed MIT. It adds 109 tokens to every session and 1,391 once invoked, about $0.0005 per session on Opus 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.