diff-explain

diff-explain is a skill for Claude Code from Sagargupta16/claude-skills. It costs 55 tokens per session (602 once invoked), scanned A, original, MIT.

A guide for writing one short, plain-English explanation of code changes. A diff is the set of additions, removals, and edits between two versions of a project.

In plain words
What is it for?
Use it to summarize a pasted diff, local branch, or pull request and describe the main changes, likely purpose, and risk.
Why use it?
It makes unfamiliar branch or pull-request changes easier to understand before review without requiring a line-by-line walkthrough.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

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

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/sagargupta16/claude-skills/diff-explain
Any agent
npx skills add Sagargupta16/claude-skills --skill diff-explain
Clone the repo
git clone --depth 1 https://github.com/Sagargupta16/claude-skills

Made for: Claude Code.

Or install diff-explain, 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 diff-explain

README.md
[![agentmods](https://agentmods.dev/badge/skills/sagargupta16/claude-skills/diff-explain.svg)](https://agentmods.dev/skills/sagargupta16/claude-skills/diff-explain)
Your own site
<a href="https://agentmods.dev/skills/sagargupta16/claude-skills/diff-explain"><img src="https://agentmods.dev/badge/skills/sagargupta16/claude-skills/diff-explain.svg" alt="Measured on agentmods" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 602 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.1 $0.00055 $0.00602
Opus 5 $0.00028 $0.00301
Sonnet 5 $0.00011 $0.00120
Haiku 4.5 $0.00006 $0.00060

Measured 6d ago against content hash 0abe755e6127, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

diff-explain 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 6d 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/diff-explain/skills/diff-explain/SKILL.md · 48 lines

How it starts

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

diff-explain

Live context (when diffing a local branch)

  • Current branch diff stat: !git diff $(git merge-base HEAD origin/main 2>/dev/null || git merge-base HEAD main 2>/dev/null || echo HEAD)...HEAD --stat 2>/dev/null || echo "no local diff vs main"

When to activate

  • User pastes a diff and asks "what does this do?" / "summarize" / "explain".
  • User shares a PR link or branch name and wants a quick read before reviewing.
  • Reviewing unfamiliar changes before merge.

Do NOT activate when the user is asking for a detailed line-by-line review -- that's a different task.

Steps

  1. Get the diff.
    • PR link: gh pr diff <url-or-number>
    • Local branch: git diff <base>...HEAD (default base: main or master)
    • Pasted: use what the user pasted.
  2. Read it fully. Don't skim the first 50 lines and guess.
  3. Group by concern. Even if the diff touches many files, most diffs have 1-3 concerns (a bug fix, a rename, a new feature). Name each concern in plain language.
  4. Write ONE paragraph. 3-5 sentences covering:
    • What changed (the concern, not the files).
    • Why it likely changed (if the commit message / PR title / linked issue says).
    • What risk it introduces (behavior change, API change, DB migration, dependency bump).
  5. Optional risk line. If one specific thing deserves attention before merge, append one line starting with Watch out for:.

Rules

  • No file-by-file walk. Group by concern, not by path.
  • No bullet lists. Prose only.
  • If the diff is large (>500 lines), say so in the first sentence and narrow to the top 2-3 concerns instead of trying to cover everything.
  • Don't speculate about business motivation beyond what commits, PR title, or linked issue state.
  • Flag real problems. Suspected bugs, security issues, missing tests, or breaking API changes go in the summary or in the "Watch out for" line. Don't paper over them.

Output

One paragraph. Optional single-line Watch out for: ... trailer.

Read the full file on GitHub · 48 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. 6d ago First seen · 48 lines · 55 tokens per session scan A 0abe755e6127

Subscribe to this mod's changes

diff-explain is a skill published in the GitHub repository Sagargupta16/claude-skills (5 stars, last pushed 1mo ago), licensed MIT. It adds 55 tokens to every session and 602 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

phpunit-test-team-reviewing

Use this skill when the user asks for a team-based, consensus, multi-reviewer, or red-team review of Shopware PHPUnit tests — trigger phrases like "team review these tests", "consensus review the tests in PR.

shopwareLabs/ai-coding-tools · 52 tokens

phpunit-test-reconciling

Internal sub-skill. Do not auto-activate. Use only when explicitly invoked by name by another skill or agent.

shopwareLabs/ai-coding-tools · 32 tokens

batch-simplify

Batch-run simplification across changed files, or across an entire repository, grouped by ecosystem and dependency order. Use when: 'batch simplify', 'simplify recent changes', 'forgot to run simplify', 'catch up on simplify', sweeping a named scope such as a branch, a whole repository, or one directory, or after a…

melodic-software/claude-code-plugins · 153 tokens

issue-analyzing

Use this skill when the user asks to analyze a specific GitHub issue, understand what area of code an issue affects, assess an issue's scope, or research the code context around an issue — example triggers like "analyze issue.

shopwareLabs/ai-coding-tools · 51 tokens

pr-analyzing

Use this skill when the user asks to analyze a specific GitHub pull request, review a PR's architectural impact, assess what changed in a PR and why it matters, or research the code relationships affected by a PR — example triggers like "analyze PR.

shopwareLabs/ai-coding-tools · 56 tokens

improve

Scan an existing codebase for module-level friction and architecture improvement opportunities (shallow modules, seam leaks, locality gaps), present candidates as an HTML report, interview on the selected candidate with a Design-It-Twice branch that designs the interface several radically different ways in parallel…

melodic-software/claude-code-plugins · 226 tokens