explain-diff-for-human-review

explain-diff-for-human-review is a skill for Claude Code, Codex from amazing-fish/agent-skills. It costs 107 tokens per session (3,489 once invoked), scanned A, original, Apache-2.0.

A tool that turns a code change into a self-contained HTML report for a person to review. It explains the change’s purpose, effects, risks, compatibility, and supporting checks instead of only showing added and removed lines.

In plain words
What is it for?
Use it to review commits, branches, pull requests, staged changes, working-tree changes, or selected files.
Why use it?
It gathers the surrounding code, callers, tests, configuration, and documentation so reviewers can understand the change in context. It keeps uncertain conclusions separate from confirmed facts and does not alter product code.

Skill for Claude CodeCodex

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

Good fit Use it to review commits, branches, pull requests, staged changes, working-tree changes, or selected files.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/amazing-fish/agent-skills/explain-diff-for-human-review"><img src="https://agentmods.dev/badge/skills/amazing-fish/agent-skills/explain-diff-for-human-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 107 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,489 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 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.00107 $0.03489
Opus 5 $0.00053 $0.01744
Sonnet 5 $0.00021 $0.00698
Haiku 4.5 $0.00011 $0.00349

Measured 10d ago against content hash bcba45cb6111, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

explain-diff-for-human-review 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 10d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/classify_diff_size.py, scripts/resolve_report_path.py, scripts/validate_independent_review.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/explain-diff-for-human-review/SKILL.md · 190 lines

How it starts

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

生成人工代码检视报告

修改说明:本文件从 GitHubxsy/agent-skills 引入,并由 amazing-fish/agent-skills 修改了报告输出位置、规模控制、GitHub 固定链接证据策略、可选独立子 Agent 审查和明暗主题视觉基线。来源与上游版本见仓库根目录 sources.lock.json

生成一份自包含的 HTML 报告,将原始代码差异转化为供人类检视的上下文、证据和待确认事项。帮助检视者作出判断,不要替检视者自动批准改动,也不要只复述增加或删除了哪些代码行。

确定检视范围

  1. 准确解析用户指定的目标:单个提交、提交范围、分支比较、代码评审请求(PR 或 MR)、暂存区、工作区或指定文件。
  2. 如果目标不明确,使用对话中最近讨论的一组改动,并在报告中明确说明该假设。
  3. 检查 diff、改动前的代码、相关调用方、测试、配置和文档。
  4. 区分代码中可以确认的事实和对修改意图的推断;对不确定的结论加以标注。
  5. 除非用户另行要求修复,否则在解释 diff 时不要修改产品代码。

优先使用仓库原生命令,例如:

git show --stat --oneline <commit>
git diff <base>...<head>
git show <commit> -- <path>
rg "<symbol>" <relevant-paths>

生成报告

不要将运行生成物默认写入 Skill 安装目录。按以下优先级确定一个 UTF-8 HTML5 输出文件:

  1. 用户显式指定的文件或目录。
  2. 当前仓库根目录下的 reports/explain-diff-<target>.html
  3. 当前可写工作区下的 reports/explain-diff-<target>.html
  4. 无仓库和工作区时,系统临时目录下的 reports/explain-diff-<target>.html

如果本 Skill 包含 scripts/resolve_report_path.py,优先用它确定路径并创建父目录。显式路径以 .html 结尾时视为文件,否则视为目录。始终在最终响应中返回实际绝对路径。Skill 安装目录只有在用户明确指定时才可作为输出位置。

报告必须能够通过直接打开文件使用:

  • 将全部 CSS 内嵌到 HTML。
  • 不使用远程字体、脚本、样式表、图片、分析服务或其他托管资源。
  • 使用语义化 HTML、响应式布局、清晰的键盘焦点和足够的文字对比度。
  • 将代码、路径、提交信息以及用户提供的文本写入 HTML 前进行转义。
  • 优先使用 CSS 图示和带标签的流程图;仅在确实有助于理解关系时使用内联 SVG。
  • 使用 <details> 折叠较长的代码片段、验证命令和问答答案。
  • 如果代码托管平台提供稳定的网页地址,链接到具体提交、文件和代码行;支持 GitHub、CodeHub、GitLab、Gitee 及其他类似平台,不绑定任何特定厂商。
  • 优先使用固定到提交哈希的永久链接,不使用可能随分支变化而失效的链接。
  • 先读取仓库 remote,并仅在能够可靠识别托管平台及其 URL 规则时生成网页链接。不要根据猜测拼接地址。
  • 如果托管平台未知、没有网页访问地址或无法确定链接格式,则显示仓库相对路径、符号、提交哈希和行号,不降低报告的可读性。
  • 提供打印样式,确保报告导出为 PDF 后仍然可读。

如果本 Skill 包含 assets/report-theme.css,将它作为报告视觉基线,并把完整内容内联到 HTML 的 <style>;不要从生成报告链接该文件。扩展样式时继续使用其中的语义 --color-* token,不要在组件规则中散落新的颜色值。保留以下主题契约:

  • :root 定义浅色 token,以 prefers-color-scheme: dark 仅覆盖同一组 token;不使用 JavaScript 切换主题。
  • 页面、内容表面、导航、链接、代码、表格、发现、验证状态、边框和焦点指示均使用语义 token;状态还必须有文字或形状标记,不能只靠颜色传意。
  • 普通文字、链接和状态文字与其背景至少达到 4.5:1;键盘焦点指示与相邻表面至少达到 3:1。
  • 保留响应式规则,以及强制浅色、高对比、无阴影和非粘性导航的打印 token/布局;屏幕处于深色模式时打印仍应节墨且清晰。

控制报告规模

生成 HTML 前统计 changed files、增加/删除行数、可获得的 patch 字节数,以及缺失 patch 的文件数。如果本 Skill 包含 scripts/classify_diff_size.py,使用它选择模式;默认阈值为:

Read the full file on GitHub · 190 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 10d ago First seen · 190 lines · 107 tokens per session scan A bcba45cb6111

Subscribe to this mod's changes

explain-diff-for-human-review is a skill published in the GitHub repository amazing-fish/agent-skills (2 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 107 tokens to every session and 3,489 once invoked, about $0.0005 per session on Opus 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-31.