explain-diff

explain-diff is a skill for Claude Code, Codex from Filip-Podstavec/claude-leverage. It costs 80 tokens per session (1,646 once invoked), scanned A, original, MIT.

A plain-English summary of changes in a Git difference, which is the list of edits between two versions of a repository. It explains what changed, why it matters, and where the risk is concentrated.

In plain words
What is it for?
Use it before opening a pull request, while reviewing a change, or when returning to a branch after time away. It can format the result for a pull request, a reviewer, or your own notes.
Why use it?
It helps you or a reviewer understand an unfamiliar branch without reading every changed line first.

Skill for Claude CodeCodex

Part of the claude-leverage plugin — 16 skills, 5 commands, 14 agents, 4 hooks 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/filip-podstavec/claude-leverage/explain-diff
Any agent
npx skills add Filip-Podstavec/claude-leverage --skill explain-diff
Clone the repo
git clone --depth 1 https://github.com/Filip-Podstavec/claude-leverage

Made for: Claude Code, Codex.

Or install claude-leverage, the plugin that ships this one along with the rest of its 16 skills, 5 commands, 14 agents, 4 hooks.

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 explain-diff

README.md
[![agentmods](https://agentmods.dev/badge/skills/filip-podstavec/claude-leverage/explain-diff.svg)](https://agentmods.dev/skills/filip-podstavec/claude-leverage/explain-diff)
Your own site
<a href="https://agentmods.dev/skills/filip-podstavec/claude-leverage/explain-diff"><img src="https://agentmods.dev/badge/skills/filip-podstavec/claude-leverage/explain-diff.svg" alt="Measured on agentmods" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,646 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.00080 $0.01646
Opus 5 $0.00040 $0.00823
Sonnet 5 $0.00016 $0.00329
Haiku 4.5 $0.00008 $0.00165

Measured 4d ago against content hash 916db577a7fa, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

explain-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 4d 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.

skills/explain-diff/SKILL.md · 176 lines

How it starts

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

/explain-diff

What it does

Reads a git diff and produces a tight English narration of what changed, why a reviewer should care, and where the risk concentrates. Lives next to the vanilla commit workflow (mechanical Conventional Commits message) and /security-review (structured security audit) — covers the "narrative" niche neither does.

Three audience modes:

  • --for pr (default) — output is a PR-description-shaped block: ## Summary, ## Why, ## How to verify. Copy-pasteable into the PR body.
  • --for review — emphasizes what's load-bearing and what's mechanical; flags non-obvious decisions that the reviewer might miss without the author's voice ("the new IF EXISTS clause on line 47 is load-bearing — without it the migration is non-idempotent").
  • --for self — terse 3–5 bullet self-narration; useful before switching context or coming back to a branch later.

Workflow

  1. Resolve diff range.

    • Default: git diff HEAD (working tree + staged vs last commit).
    • If $ARGUMENTS starts with ^ or contains .. or ..., treat as a ref range and use git diff <range>.
    • If --for pr and the current branch has commits beyond main, use git diff main...HEAD instead (covers the whole branch).
  2. Get supporting context (parallel-OK):

    • git status --short for file-state breakdown.
    • git log --oneline -10 for repo style of commit messages.
    • git rev-parse --abbrev-ref HEAD for branch name.
  3. Read the diff in full. If the diff is enormous (>50k tokens estimated), STOP and report: "diff is too large — narrow with --paths <pattern> or <file>...". Don't try to chunk and summarize partial diffs; the result would be incoherent.

  4. Walk the diff and identify:

    • Files added vs modified vs deleted.
    • Hunks that look mechanical (renames, type-only changes, formatting).
    • Hunks that look load-bearing (new branches, new functions, condition changes, new dependencies).
    • Test changes (file paths matching *_test.*, *.test.*, tests/, etc.).
    • Doc / config-only changes.
    • Anything that touches a sensitive path (auth*, crypto*, *.env*, routes/, etc.) — surface as a "consider /security-review" reminder, not a substitute for it.
    • Load-bearing decisions shipped without an AIDEV- anchor (only in --for review). A load-bearing hunk that encodes a non-obvious choice — an ordering dependency, a perf carve-out, an idempotency trick, a deliberate rejection of the obvious approach — and carries no AIDEV-NOTE: / AIDEV-TODO: / AIDEV-QUESTION: in the added lines is a memory the next agent won't inherit. This is the review-boundary backstop for the ai-first-nudge hook, which only fires on ≥50-LOC single writes and so misses decisions built up incrementally.

Read the full file on GitHub · 176 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. 4d ago First seen · 176 lines · 80 tokens per session scan A 916db577a7fa

Subscribe to this mod's changes

explain-diff is a skill published in the GitHub repository Filip-Podstavec/claude-leverage (68 stars, last pushed 1mo ago), licensed MIT. It adds 80 tokens to every session and 1,646 once invoked, about $0.0004 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-30.

Related

Other skills, from other repositories

codex-pair-resume

Resume codex-pair for this project after a previous pause. Removes .codex-pair/state/paused and clears failure state. Review resumes on the next supported file edit; missing state is a no-op.

Lykhoyda/ask-llm · 51 tokens

generate-tests

Generate unit tests for a .NET service following the coverage-kit conventions. Use when the user asks to 'generate tests', 'backfill tests', 'characterize this service', or 'add tests for' a target after coverage-init has run. Operates in characterization mode (freeze current behavior for existing code) or spec mode…

livlign/claude-skills · 179 tokens

opik

This skill should be used when the user needs to add Opik tracing or integrations to their code, instrument an LLM application, or needs reference for Opik SDK usage (Python, TypeScript, REST API). Use for tasks like "add tracing", "instrument my code", "use trackopenai", "add OpikTracer", "what span types are…

comet-ml/opik-claude-code-plugin · 84 tokens

codex-review

Get a second opinion from OpenAI Codex on your current code changes. Analyzes staged/unstaged diffs and returns prioritized findings. Use when user asks to "review with Codex", "Codex code review", or "ask Codex to check my code".

Lykhoyda/ask-llm · 60 tokens

ollama-review

Get a second opinion from a local Ollama LLM on your current code changes. Analyzes staged/unstaged diffs and returns prioritized findings. No API keys needed. Use when user asks to "review with Ollama", "local code review", or "review offline".

Lykhoyda/ask-llm · 61 tokens

github-issue-fix-flow

Use when asked to take a GitHub issue number, implement a fix, run builds/tests, commit with a closing message, and push. End-to-end workflow using gh CLI, local code changes, and git.

patrickserrano/lacquer · 50 tokens