explain-diff
Skill68 starsChanged 4 months agoMITView on GitHub
USE WHEN about to open a PR, when teammate asks "what's in this diff?", or when returning to a branch and needing self-orientation. Three modes: `--for pr|review|self`. Reads `git diff HEAD` (or passed range), returns 3–5 bullet plain-English narration. Read-only — defers security/test concerns to other skills.
- Reads credentials
10 other projects use a version of this.
Adopted by
Most recently taken up by
- eugenelim/agent-ready-repotheir own version, first seen Oct 3, 2026
- yogan/agent-skillstheir own version, first seen Sep 11, 2026
- claesbackman/AI-research-feedbacktheir own version, first seen Aug 26, 2026
- thettwe/nyanntheir own version, first seen Aug 22, 2026
- abdelkareemkobo/kareem-skillstheir own version, first seen Aug 18, 2026
- tyom/skillstheir own version, first seen Aug 13, 2026
Other versions10 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 10
- claesbackman/AI-research-feedback★ 491same name
- eugenelim/agent-ready-repo★ 24same name
- flpbalada/fb-skills★ 8same name
- thettwe/nyann★ 6same name
- yogan/agent-skills★ 2same name
- aryankeluskar/skills★ 1same name
- tyom/skills★ 1same name
- abdelkareemkobo/kareem-skills★ 0same name
- OlliTapio/claude_skills★ 0same name
- tryonelove/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository16 other files it gives its agents.
- AGENTS.mdAGENTS.md
- adr-newSkill
- arch-mapSkill
- codex-sandboxSkill
- conventions-initSkill
- dynamic-checkSkill
- glossary-initSkill
- init-repoSkill
- log-structuredSkill
- process-diagramSkill
- refresh-context-mapSkill
- repo-doctorSkill
- repo-mapSkill
- security-reviewSkill
- session-logSkill
- stack-checkSkill
The file
We split this skill into the rules it gives an agent
10 rules. 0 are common, 3 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 10 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 43
Default: git diff HEAD (working tree + staged vs last commit).
- Very specific: line 44
If $ARGUMENTS starts with ^ or contains ..
- Very specific: line 46
If --for pr and the current branch has commits beyond main, use git diff main...HEAD instead (covers the whole branch).
- Very specific: line 64
Test changes (file paths matching *_test.*, *.test.*, tests/, etc.).
- Distinctive: line 142
Read-only: No Edit/Write in the tool list.
- Distinctive: line 145
Never invent intent: If the diff doesn't make motivation obvious, explicitly say "motivation not inferable from diff" rather than guess.
- Very specific: line 148
Never expand scope to security audit: If sensitive paths show up, ONE LINE: "diff touches routes/auth/...
- Very specific: line 152
Skip noise: Don't list every renamed file individually if there are 30 of them.
- Very specific: line 158
Before opening a PR — paste the --for pr output into the PR body.
- Very specific: line 159
After receiving a code review request from a teammate, run --for review to make sure the diff is honestly readable.
“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/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 newIF EXISTSclause 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
- Resolve diff range.
- Default:
git diff HEAD(working tree + staged vs last commit). - If
$ARGUMENTSstarts with^or contains..or..., treat as a ref range and usegit diff <range>. - If
--for prand the current branch has commits beyondmain, usegit diff main...HEADinstead (covers the whole branch).
- Default:
- Get supporting context (parallel-OK):
git status --shortfor file-state breakdown.git log --oneline -10for repo style of commit messages.git rev-parse --abbrev-ref HEADfor branch name.
- 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. - 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 noAIDEV-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 theai-first-nudgehook, which only fires on ≥50-LOC single writes and so misses decisions built up incrementally.
- Emit narration in the requested shape.
--for pr output template
## Summary
- <one sentence per key change, ordered by importance>
## Why
<one paragraph: the motivation. If the diff doesn't make the motivation
obvious, say so explicitly — "motivation not inferable from the diff;
add to PR body".>
## How to verify
- [ ] <reviewer step 1>
- [ ] <reviewer step 2>
- <commands to run if applicable>--for review output template
## What changed (load-bearing)
- `file:line` — <description of load-bearing change>
- ...
## What changed (mechanical, low-risk)
- <bulk list, less detail>
## What to look at first
<top 1–2 things the reviewer should NOT skip>
## What's untested
- <files modified without corresponding test changes, IF the language
conventionally tests, IF the file is non-trivial>
## Load-bearing but un-anchored
- `file:line` — <the non-obvious decision that has no AIDEV anchor;
suggest the anchor to add, e.g. "AIDEV-NOTE: retry order matters —
webhook must land before the DB commit">
- <omit this section entirely if every load-bearing hunk is either
self-evident or already anchored — don't manufacture findings>--for self output template
- <bullet 1, ≤80 chars>
- <bullet 2>
- <bullet 3>
[max 5]Hard rules
- Read-only. No Edit/Write in the tool list. If the user asks "while you're at it, fix X" — STOP and surface that as a separate request.
- Never invent intent. If the diff doesn't make motivation obvious, explicitly say "motivation not inferable from diff" rather than guess.
- Never expand scope to security audit. If sensitive paths show
up, ONE LINE: "diff touches
routes/auth/...— consider/security-review". Don't try to be that skill. - Always cite file:line for load-bearing claims.
- Skip noise. Don't list every renamed file individually if there
are 30 of them; aggregate ("renamed 30 files from
services/old/*toservices/new/*").
When to run
- Before opening a PR — paste the
--for proutput into the PR body. - After receiving a code review request from a teammate, run
--for reviewto make sure the diff is honestly readable. - Coming back to a branch after a few days —
--for selfto re-orient.
What this skill does NOT do
- Generate the commit message. That's the vanilla commit workflow. They're different shapes: a commit message is per-commit; a PR description is per-branch. Don't conflate.
- Audit for security/correctness. Cite when sensitive paths
appear; let
/security-reviewdo the actual audit. - Run tests or verify claims. "How to verify" is suggestions for the reviewer; this skill doesn't execute anything.
- Compare against
mainautomatically in --for self / --for review modes. Default isHEAD(working tree vs last commit). User picks the range explicitly when they want branch-wide.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

