explain-diff-html

explain-diff-html is a skill for Claude Code, Codex from jamesyang124/agent-skills. It costs 32 tokens per session (639 once invoked), scanned A, a copy of explain-diff-html, MIT.

A rich HTML explanation of a code change, such as a diff, branch, or pull request. It explains the relevant background, illustrates the main idea with examples and diagrams, walks through the code, and includes a knowledge quiz.

In plain words
What is it for?
Use it to create an interactive explanation for onboarding, code reviews, team discussions, or learning from a particular implementation change.
Why use it?
It helps readers understand not only what changed but also how the surrounding system works and why the change matters. This is useful when the code or review is difficult to follow.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create an interactive explanation for onboarding, code reviews, team discussions, or learning from a particular implementation change.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jamesyang124/agent-skills/explain-diff-html
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 jamesyang124/agent-skills --skill explain-diff-html
Clone the repo
git clone --depth 1 https://github.com/jamesyang124/agent-skills

Made for: Claude Code, Codex.

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-html

README.md
[![agentmods](https://agentmods.dev/badge/skills/jamesyang124/agent-skills/explain-diff-html/github.svg)](https://agentmods.dev/skills/jamesyang124/agent-skills/explain-diff-html)
Your own site
<a href="https://agentmods.dev/skills/jamesyang124/agent-skills/explain-diff-html"><img src="https://agentmods.dev/badge/skills/jamesyang124/agent-skills/explain-diff-html/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-html

Your own site · 80×15
<a href="https://agentmods.dev/skills/jamesyang124/agent-skills/explain-diff-html"><img src="https://agentmods.dev/badge/skills/jamesyang124/agent-skills/explain-diff-html.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 639 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.
Origin 100% copy Near-identical to another mod 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.00032 $0.00639
Opus 5.5 $0.00013 $0.00256
Sonnet 5.5 $0.00006 $0.00128
Haiku 4.5 $0.00003 $0.00064

Measured 1mo ago against content hash cc2ad930f1f8, 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-html 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 1mo 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.

Origin

This is a copy

100% identical to explain-diff-html — 1 line differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.agent-settings/skills/tools/explain-diff-html/SKILL.md · 29 lines

What it actually says

Explain Diff

Please make me a rich, interactive explanation of the specified code change.

It should have these sections:

  • Background: Explain the existing system relevant to this change. (You should broadly explore surrounding code for this.) We don't know how much the reader already knows, so include a deep background for beginners (note that it can be skipped if the reader is already familiar), and then a more narrow background directly relevant to the change.
  • Intuition: Explain the core intuition for the code change. The focus here is to explain the essence, not the full details. Use concrete examples with toy data. Use figures and diagrams liberally.
  • Code: Do a high-level walkthrough of the changes to the code. Group/order the changes in an understandable way.
  • Quiz: Come up with five questions that test the reader's knowledge of this PR. This should be medium difficulty, difficult enough that you actually need to understand the substance of the PR to answer them, but not gotchas. The goal is to help the reader make sure that they've actually understood. These should be presented as interactive multiple-choice questions, and when the user clicks, it tells them whether they were correct and gives feedback.

Format:

  • Output a single self-contained HTML file which includes CSS and JavaScript. Make the whole thing one long page with section headers and a table of contents. Don't use tabs for the top-level structure. Basic responsive styling so you can view it on a phone is nice too. Put the file in a global place on my computer outside of the code repo, and make sure the filename always starts with today's date in YYYY-MM-DD- format, because it helps keep the files time-sorted and out of version control. For example: /tmp/2026-01-12-explanation-.html
  • Please write with the clarity and flow of Martin Kleppmann, making it engaging and written in classic style. Transitions between sections should be smooth.
  • Some tips on diagrams. Ideally, you should pick a small number of diagram families that can be reused throughout the explanation to explain various cases. Some useful kinds of diagrams:
    • A very simplified version of the UI that the user sees in the app, to explain UI changes.
    • A system diagram showing data flow or communication between components. Make sure to include example data here!
  • Don't use ASCII diagrams. Always use simple HTML designs for your diagrams, HTML lists for lists of things, etc.
    • For code blocks, always use <pre> tags. If you use a custom styled div instead, it must have white-space: pre-wrap in its CSS, or the browser will collapse all newlines into a single line. Before saving the file, scan each code block in the HTML source and confirm its CSS includes white-space: pre or pre-wrap.
  • Use callouts for key concepts or definitions, important edge cases, etc.
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. 1mo ago First seen · 29 lines · 32 tokens per session scan A cc2ad930f1f8

Subscribe to this mod's changes

explain-diff-html is a skill published in the GitHub repository jamesyang124/agent-skills (2 stars, last pushed 7d ago), licensed MIT. It adds 32 tokens to every session and 639 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to explain-diff-html, differing in 1 line, and is treated as a copy.

Related

Other skills, from other repositories

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

component-fixtures

Use when creating or updating component fixtures for screenshot testing or their shared infrastructure, or when designing UI components to be fixture-friendly. Covers fixture file structure, theming, service setup, CSS scoping, async rendering, validation, and common pitfalls.

microsoft/vscode · 53 tokens