explain-diff

Generate self-contained HTML review documents from git diffs, pull requests, and commit histories.

Updated Jul 2, 2026
One-click install
npx skills add https://github.com/B-R-P/explain-diff --skill explain-diff-b-r-p
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: explain-diff
Source: https://github.com/B-R-P/explain-diff/tree/main/skills/explain-diff
Command: npx skills add https://github.com/B-R-P/explain-diff --skill explain-diff-b-r-p

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Explaining code changes to non-terminal audiences like product managers, QA, or stakeholders is hard when the only artifact is a raw git diff or chat message. This Skill turns diffs, PRs, branch comparisons, and commit histories into polished, self-contained HTML review documents with progressive disclosure that survive beyond the chat window. ## Core Features & Use Cases - Structured HTML reviews: Produces an executive summary, before/after impact table, commit evolution arc, expandable per-file breakdowns, and a caveats & tradeoffs callout. - Tone calibration: Asks the user to choose between deeply technical, highly technical but understandable, or accessible business-focused registers, then holds that tone across every section. - Rigorous diff analysis: Audits commit history for reverts, WIP commits, and missing tests; checks whether signature, import, or permission changes break code outside the diff; and scans for security risk signals. - Wrapper script: Uses scripts/html_wrap.py to inject a stylesheet with dark mode, print support, and reduced-motion handling into the authored HTML fragment. - Use Case: After finishing a feature branch, ask for a shareable HTML review of the PR to attach to a ticket so stakeholders can scan the summary and expand file details on demand. ## Quick Start Ask the agent to create a self-contained HTML review document explaining the diff of your current branch or pull request, then pick a tone when prompted.

Frequently Asked Questions about explain-diff

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I turn a git diff into an HTML report?

Ask for a self-contained HTML document explaining the diff, PR, or commit range. The skill analyzes the commits, authors a semantic HTML fragment, and runs scripts/html_wrap.py to produce a complete styled document with an executive summary, impact table, and expandable file breakdowns.

How to create a shareable pull request review document?

Request an HTML review of the PR or branch comparison and choose a tone when prompted. The output is a single HTML file with progressive disclosure that you can attach to a ticket or email, readable by non-terminal audiences.

When should I not use an HTML diff report?

Skip it for one-line commits, terminal-only debugging, internal notes never shared externally, or cases where a plain markdown answer in chat suffices. The skill is designed for shareable artifacts aimed at stakeholders, not ephemeral explanations.

Does the HTML output support dark mode and printing?

Yes. The default stylesheet injected by html_wrap.py includes a prefers-color-scheme dark variant, a print stylesheet that forces details sections open, and a prefers-reduced-motion rule. Custom styles via --style must reimplement the dark mode variant.

What happens if the html_wrap.py script is missing?

The skill instructs the agent to stop and inform the user rather than hand-writing a full HTML document. The wrapper script at scripts/html_wrap.py is a required tool, and improvising the HTML shell is explicitly treated as a red flag.