explain-diff
Installation
SKILL.md
Explain Diff
Create a rich, interactive HTML explanation of a code change. The reader may be a teammate encountering the codebase for the first time or the author checking their own understanding — the document should serve both.
Resolve the change
Pin down exactly what to explain before writing anything:
- PR number or URL —
gh pr diff <number>for the diff,gh pr view <number>for the title, description, and discussion - Branch —
git diff <base>...<branch>against the repo's default branch - Commit —
git show <sha> - Nothing specified — the working tree (
git diff HEAD); if clean, the current branch against the default branch
Then explore beyond the diff: read the touched files in full, their callers, and the subsystem they belong to. The Background section lives or dies on your understanding of the surrounding system, not just the delta.
Sections
The explanation has four sections, in this order: