explain-diff

explain-diff is a skill for Claude Code from nicknisi/claude-plugins. It costs 118 tokens per session (910 once invoked), scanned A, original, MIT.

A self-contained HTML guide that explains a code change with background, diagrams, a code walkthrough, and an interactive quiz. It is meant for readers who may be new to the codebase.

In plain words
What is it for?
Use it to understand or present a code change, including its surrounding system, implementation details, and important decisions.
Why use it?
It turns a difficult diff, pull request, branch, or commit into an explanation that is easier to follow and verify.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the essentials plugin — 6 skills, 4 agents shipped together

Good fit Use it to understand or present a code change, including its surrounding system, implementation details, and important decisions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nicknisi/claude-plugins/explain-diff
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.

Any agent
npx skills add nicknisi/claude-plugins --skill explain-diff
Clone the repo
git clone --depth 1 https://github.com/nicknisi/claude-plugins

Made for: Claude Code.

Or install essentials, the plugin that ships this one along with the rest of its 6 skills, 4 agents.

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/nicknisi/claude-plugins/explain-diff/github.svg)](https://agentmods.dev/skills/nicknisi/claude-plugins/explain-diff)
Your own site
<a href="https://agentmods.dev/skills/nicknisi/claude-plugins/explain-diff"><img src="https://agentmods.dev/badge/skills/nicknisi/claude-plugins/explain-diff/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for explain-diff

Your own site · 80×15
<a href="https://agentmods.dev/skills/nicknisi/claude-plugins/explain-diff"><img src="https://agentmods.dev/badge/skills/nicknisi/claude-plugins/explain-diff.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 118 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 910 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00118 $0.00910
Opus 5.5 $0.00047 $0.00364
Sonnet 5.5 $0.00024 $0.00182
Haiku 4.5 $0.00012 $0.00091

Measured 2mo ago against content hash c6091568576c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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.

plugins/essentials/skills/explain-diff/SKILL.md · 62 lines

How it starts

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

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:

  1. Background — Explain the existing system this change slots into. The reader's familiarity is unknown, so layer it: a deep background for beginners (marked as skippable for readers who already know the system), then a narrower background directly relevant to the change.

  2. Intuition — Explain the core idea of the change: what problem existed, what insight the change embodies, why this approach. Focus on the essence, not the full details. Use concrete examples with toy data, and use figures and diagrams liberally.

  3. Code — A high-level walkthrough of the changes. Group and order them for understanding — by concept or data flow — not by file order in the diff.

  4. Quiz — Five interactive multiple-choice questions testing whether the reader understood the substance. Medium difficulty: answerable only by someone who actually understood the change, but no gotchas. On click, reveal whether the answer was correct with a short explanation either way — the feedback is where the learning happens.

Output format

Produce a single self-contained HTML file:

Read the full file on GitHub · 62 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. 2mo ago First seen · 62 lines · 118 tokens per session scan A c6091568576c

Subscribe to this mod's changes

explain-diff is a skill published in the GitHub repository nicknisi/claude-plugins (114 stars, last pushed 2mo ago), licensed MIT. It adds 118 tokens to every session and 910 once invoked, about $0.0005 per session on Opus 5.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

explain-diff compared with skills from other repositories

explain-diff next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
explain-diffnicknisi/claude-pluginsSkill1142mo agoMITA118Claude Code
hr-onboardingnexu-io/open-designSkill106ktodayApache-2.0A62Claude Code, Codex
book-mirrorgarrytan/gbrainSkill32ktodayMITA138Claude Code
exam-forecastanthropics/claude-for-legalSkill9.9ktodayApache-2.0A73Claude Code
lean-formalizewanshuiyin/Auto-claude-code-research-in-sleepSkill19kyesterdayMITA81Claude Code
eli5companion-inc/feynmanSkill10k6d agoMITA63Claude Code, Codex
deck-course-modulenexu-io/html-anythingSkill9.4kyesterdayApache-2.0A25Claude Code, Codex