From explain-my-pr
Use when preparing a merge request or git MR and the reviewer (lead/manager) needs a plain-language explanation of code changes. Triggers include MR submission, merge review docs, or "explain this diff for my reviewer."
How this skill is triggered — by the user, by Claude, or both
Slash command
/explain-my-pr:explain-my-prThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Produce a **manager-friendly MR explanation document** in the same style as [examples/example-output.md](examples/example-output.md). The reader has **not** seen the code; they need *why*, *what broke before*, and *what is safe after*.
Produce a manager-friendly MR explanation document in the same style as examples/example-output.md. The reader has not seen the code; they need why, what broke before, and what is safe after.
git diff <base-branch>...HEAD --statgit diff <base-branch>...HEAD -- <paths>git log <base-branch>..HEAD --onelinemain (before), feat/my-branch (after)).examples/.gitignore).main, develop, feat/short-description). Map employer-specific prefixes (e.g. internal dt-* branches) to main / feat/... in the written doc unless the user says the doc stays internal-only.acme_agent/...); use real paths only when the user confirms the output stays private.Unless the user specifies another path, save under:
docs/mr-change-explanations/<short-topic>.md
Use kebab-case filenames (base-tool-changes.md, auth-middleware.md). Create the directory if missing.
Follow sections in this order (see reference.md for fill-in template):
| # | Section | Purpose |
|---|---|---|
| 1 | Title + intro | # Why … changes when merging X into Y — files touched, line count, audience |
| 2 | What is X and why does it matter? | 3–6 bullets: role of the code in the system |
| 3 | TL;DR table | One row per distinct fix/change: #, What changed, Why it matters |
| 4 | Big picture | ASCII diagram of call flow / architecture |
| 5 | Fix 1…N (repeat) | Per change: problem → code before/after → step-by-step → safety → status today |
| 6 | All fixes together | Numbered trace: broken path (base) vs working path (MR) |
| 7 | Impact table | What changes for existing consumers (usually "nothing" + opt-in rows) |
| 8 | Reviewer checklist | 3–5 concrete things to grep/verify before merge |
| 9 | Suggested commit message | Multi-line conventional commit block |
| 10 | Reference table | File paths + line ranges on both branches |
Separate major sections with ---.
path/to/file.py:start-end (branch-name): then a fenced block; annotate inside the block with # ↑ or comments explaining the delta.## Fix N — Short title (plain English)
### What problem this fixes
[Symptom in production/logs/tests. Concrete case.]
### The change in code
#### <base-branch> (before)
`path/file.py:76-94` (<base-branch> branch):
```python
# ... snippet with comments ...
path/file.py:76-99 ( branch):
# ... snippet ...
Add `### Why this is a safe change` and `### Status today` when relevant.
## Quality Checklist (Before Handing to Reviewer)
- [ ] Title states merge direction (`merging A into B`)
- [ ] TL;DR row count matches number of `## Fix` sections
- [ ] Every code block has branch label and line range
- [ ] At least one end-to-end numbered trace (broken vs fixed)
- [ ] Impact table covers "nothing changes" cases explicitly
- [ ] Reviewer checklist has actionable grep/search items
- [ ] Companion doc links if sibling docs exist in the same output folder
## Anti-Patterns
| Don't | Do instead |
|-------|------------|
| Bullet dump of file names | One narrative per fix with why |
| "Refactored for clarity" | Name the bug or limitation removed |
| Diff-only paste without labels | Label `before` / `after` with branch names |
| Assume reviewer knows framework jargon | One-sentence definition on first use |
| One giant section for unrelated files | Split into separate `.md` files |
## Canonical Example
When unsure about tone or depth, read [examples/example-output.md](examples/example-output.md). Match its level of detail, tables, ASCII diagrams, and reviewer checklist. For internal-only work, the user may also keep a longer private example locally (gitignored).
## Full Template
Copy structure from [reference.md](reference.md).
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Applies a firm's KYC/AML rules grid to parsed onboarding records: assigns risk rating, checks required documents, outputs rule outcomes with citations, and routes for escalation.
Generates daily or weekly digests of activity from connected sources (chat, email, docs, tasks, CRM), highlighting action items, decisions, mentions, and project updates.
npx claudepluginhub hritikvaidwan007/explain-my-pr --plugin explain-my-pr