Agent skill

Explain Diff

by claesbackman in claesbackman/AI-research-feedback

Explain a code change as a standalone offline HTML page with a five-question quiz.

MITAuto-check: notesEducation

Install Explain Diff

skills CLI
$ npx skills add claesbackman/AI-research-feedback --skill explain-diff -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install claesbackman/AI-research-feedback explain-diff --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/claesbackman/AI-research-feedback.git skills-src && mkdir -p .claude/skills && cp -r skills-src/Skills/explain-diff .claude/skills/explain-diff && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
explain-diff
GitHub stars
491
Token cost
~2.1k tokens
SKILL.md length
1,255 words
Files
1
Skills in repo
10
Repo updated
First seen
Licence
MIT

At a glance

Explain a code change as a standalone offline HTML page with a five-question quiz.

  • Tasks that involve HTML artifacts
  • SKILL.md covers Scope, Read from scratch, Verify before you claim and Sections, plus 4 more sections
  • Calls git

What it does

Explain Diff is an agent skill from claesbackman/AI-research-feedback. Explain a code change as a standalone offline HTML page with a five-question quiz. Reads the diff and the surrounding code from scratch, states the consequences for the empirical results, and saves the page outside the repository under a dated filename.

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Education, covering HTML artifacts. It works with Git. The repository describes itself as: A collection of Claude Code skills for academic research review. These tools were developed by Claes Bäckman. The licence is MIT.

When your agent uses it

  • Tasks that involve HTML artifacts

Example prompts

  • “/explain-diff”

Requirements

  • Pre-approved tools (allowed-tools): Bash, Read, Write, Glob, Grep

What it can do on your machine

Read from SKILL.md and the folder at commit d129756. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Read
    • Write
    • Glob
    • Grep

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Explain Diff loads about 2.1k tokens when it runs. Until then it costs about 67 tokens; SKILL.md has 1,255 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~67
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Read, Write, Glob, Grep

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from claesbackman/AI-research-feedback at commit d129756, republished under its MIT licence (© claesbackman). 1,255 words, ~2,064 tokens.

Download SKILL.mdSave it as .claude/skills/explain-diff/SKILL.md (or your agent's skills folder).
name
explain-diff
description
Explain a code change as a standalone offline HTML page with a five-question quiz. Reads the diff and the surrounding code from scratch, states the consequences for the empirical results, and saves the page outside the repository under a dated filename.
allowed-tools
Bash, Read, Write, Glob, Grep
argument-hint
[optional: git ref or range, default working tree vs HEAD]
disable-model-invocation
true

Explain a Change

Produce one self-contained HTML page that explains a code change well enough that someone who did not write it could defend it, ending in a quiz that tests whether they actually followed.

Scope

Set the target from $ARGUMENTS:

  • No argument — uncommitted working tree against HEAD. Use git status --short and git diff (add git diff --cached if anything is staged).
  • One ref (abc123, main) — that ref against the working tree, or against HEAD if the tree is clean.
  • A range (main..HEAD, abc123..def456) — use it as given.

New files are part of the change. git diff shows nothing for an untracked file, so a change that only adds scripts looks empty. Always read git status --short for ?? entries and treat every new file as an addition to explain: read it in full, since there is no diff to read. A new robustness script is exactly the kind of change worth explaining, and it is the one the diff will hide.

Stop only when git status --short and the diff are both empty.

Read from scratch

Work only from the code and the diff. If the conversation already contains an account of this change — yours or the user's — ignore it and read the files. A summary written earlier is a hypothesis, not evidence.

Do not stop at the diff hunks. For every changed block, read the function, script, or stage that contains it, and read what consumes its output. A three-line addition to a pipeline stage is usually only comprehensible from the two files on either side of it.

Verify before you claim

The single most common failure here is reporting a change in results that did not happen, or missing one that did. Check, do not infer:

  • Generated files. Tables, .tex bodies, and rendered figures often show as modified when only a timestamp comment or a nondeterministic tie-break changed. Diff them and look at what actually differs before calling it a result change.
  • Binary artifacts. If an image changed, compare both versions visually. The old version lives in git rather than on disk, so extract it first — git show HEAD:path/to/figure.png > /tmp/old-figure.png — then read the extracted copy alongside the working-tree one. A re-render with identical content is not a finding.
  • Logs. Compare sample sizes, observation counts, and headline coefficients between the old and new run. Identical numbers are the proof that an added block was inert; do not assert it from code reading alone.
  • Numbers you quote. Every figure in the page should come from an output file you opened, not from the prose of the diff. If the change writes a new CSV, read it.
  • Samples. When a new block filters data, compare its filter line by line against the filters of the existing estimation samples. Differences of one clause are the interesting ones.

Sections

Write these five, in order, under clear headings.

1. What this code did before. Explore the surrounding scripts. Do not rely on the diff alone. Establish what the code produced, what consumed it, and — where it matters — what it conspicuously did not produce.

2. What changed and why, in plain language. No code in this section at all. Prose only. Name the problem the change solves before describing the solution.

3. Consequences for the results. Which sample, which coefficients, which tables, and in which direction. Be specific about magnitudes. If the answer is that nothing changed, say so explicitly and prominently, then show the evidence — matching observation counts, matching coefficients, timestamp-only diffs. A reader must not have to infer "no effect" from the absence of a claim. Where a change adds something rather than altering something, say what is new and what sample it rests on.

4. Walkthrough of the changed code, grouped by purpose rather than by file. One group per job the change does, even when a single job spans two files. Quote the code in <pre> blocks with the file and line range above each. Explain the lines that are load-bearing and skip the ones that are not, and say why a line is there when the reason is not obvious from reading it.

5. Quiz. Five multiple-choice questions, medium difficulty — hard enough that answering requires understanding the substance, not gotchas.

Show full SKILL.md (554 more words)Show less

Quiz rules

  • At least two questions must be about empirical consequences rather than syntax: which observations enter the sample, what the coefficient now identifies, what would change if an assumption failed, whether a modified output file means the results moved.
  • Distractors must be plausible misunderstandings — the reading someone would arrive at from a careless pass over the diff. Match the correct answer in length, grammar, specificity, and confidence. A correct answer that is visibly longer or more hedged than its distractors is a giveaway.
  • Randomise the position of the correct answer independently for each question. Do not settle into a pattern.
  • On click: report whether the answer was correct, then explain every option — why the right one is right and why each wrong one is wrong. The wrong-answer explanations carry most of the teaching.
  • Cite the file and line each answer rests on, below the explanation.

Page

Single HTML file. Embed all CSS and JavaScript so it works offline with no network access.

  • Clear prose. Full sentences, not bullet fragments, wherever the content allows.
  • Concrete toy examples with made-up small numbers — a four-row table showing what a reshape or a merge does beats a paragraph describing it.
  • Simple HTML/CSS diagrams rather than ASCII art: flex-box pipeline boxes, positioned dots and bars for a chart, styled tables for data.
  • Code in <pre> tags, with the file path and line range in a small monospace label above.
  • Support light and dark via prefers-color-scheme.
  • Real tables for tabular data, wrapped in an overflow-x: auto container.

Provenance

Pages accumulate. Six months on, the only thing that makes one worth keeping is knowing exactly which change it describes, so record that in the page itself rather than trusting the filename.

Directly under the page title, a small block giving:

  • Repository name, from git rev-parse --show-toplevel.
  • Branch, from git rev-parse --abbrev-ref HEAD.
  • The comparison, spelled out as the git command you actually ran — git diff against HEAD, git diff abc123, main..HEAD.
  • The full 40-character SHA of each endpoint, from git rev-parse. Short SHAs collide as a repository grows; the page is the archival record, so it carries the full one.
  • The date the page was written.

When the comparison involves the working tree, say so explicitly and add the list of changed and new files. An uncommitted tree is not reproducible — the state this page describes may never exist again, and a reader who later checks out the recorded SHA will not see it. That caveat belongs on the page.

Output

Save outside the repository. Default directory ~/Documents/; use a different one if the user names it. Confirm with git status afterwards that the repo is untouched.

Filename: today's date in YYYY-MM-DD- format, a short kebab-case slug of the change, then a ref tag so the file can be matched back to a commit without opening it.

  • Working tree against HEAD — wt- plus the short SHA of HEAD, as in 2026-08-01-cluster-by-municipality-wt-e956a7e.html.
  • One ref — its short SHA.
  • A range — both short SHAs joined by a hyphen, as in a1b2c3d-def4567.

Then tell the user the path, and follow it with a short plain-text summary of what you found — the same conclusions the page reaches, including anything you noticed while reading that the change's author might want to know. Do not make the user open the file to learn whether the results moved.

© claesbackman, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in Skills/explain-diff of claesbackman/AI-research-feedback.

Open the folder on GitHubat commit d129756

Compare with similar skills

Explain Diff next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Explain Diff compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Explain Diff this skillclaesbackman/AI-research-feedback491—~2.1kAutomated safety check: NotesMIT
Visual Reviewai-dynamo/dynamo8.2k—~4.5kAutomated safety check: PassApache-2.0
Paper ReaderAlphaLab-USTC/ResearchClaw134—~1.6kAutomated safety check: PassMIT
Researcherkrzysztofdudek/ResearcherSkill265—~5.5kAutomated safety check: WarnMIT
Flashcardsserenakeyitan/open-exam-skills142—~1.5kAutomated safety check: PassCustom licence
Lesson Generatordair-ai/dair-academy-plugins6142 repos~1.1kAutomated safety check: PassMIT

Similar skills

  • Visual Review

    ai-dynamo/dynamo

    Create self-contained interactive HTML code-review dashboards from GitHub or GitLab pull requests, checked-out branch diffs, or supplied unified diffs, with correctness and safe-to-merge scores…

    8.2k GitHub stars~4.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Paper Reader

    AlphaLab-USTC/ResearchClaw

    Deep-read an arXiv paper and generate structured Deep Note reading notes.

    134 GitHub stars~1.6k tokensUpdated 6 mo ago
    Research & ScienceAuto-check passed
  • Researcher

    krzysztofdudek/ResearcherSkill

    A skill your agent uses when user wants to optimize or tune something measurable through repeated experiments — "make X faster", "improve [metric]", "find best config", "iterate overnight", "run…

    265 GitHub stars~5.5k tokensUpdated 2 days ago
    EducationAuto-check: warnings
  • Flashcards

    serenakeyitan/open-exam-skills

    Render study flashcards into an interactive HTML deck. An agent skill from serenakeyitan/open-exam-skills.

    142 GitHub stars~1.5k tokensUpdated 8 mo ago
    EducationAuto-check passed
  • Lesson Generator

    dair-ai/dair-academy-plugins

    Builds a self-contained multi-lesson course page with lesson navigation, objectives, flashcards, quizzes and source links, as plain HTML, CSS and JavaScript.

    614 GitHub starsUsed in 2 repos~1.1k tokens
    EducationAuto-check passed
  • Yao Bayesian Skill

    yaojingang/yao-open-skills

    Convert uncertain real-world choices into an auditable Bayesian evidence-to-action report with priors, evidence grading, posterior update, action thresholds, sensitivity checks, multi-turn decision…

    1.3k GitHub stars~956 tokensUpdated 1 mo ago
    EducationAuto-check passed

More from claesbackman/AI-research-feedback

All 10 skills in this repo
  • Explorable Deck

    claesbackman/AI-research-feedback

    Build a Quarto reveal.js slide deck in the explorable-explanation style (Nicky Case) — one idea per slide, assertion titles, a concrete running example, run-time SVG stages the presenter drives…

    491 GitHub stars~2.9k tokensUpdated 12 days ago
    Auto-check passed
  • PDF To Markdown

    claesbackman/AI-research-feedback

    Split a PDF into chunks and convert it to readable markdown text.

    491 GitHub stars~1.8k tokensUpdated 12 days ago
    Auto-check passed
  • Review Paper Light

    claesbackman/AI-research-feedback

    Run a fast 2-agent pre-submission check for an economics paper — focuses on contribution, identification, and causal overclaiming.

    491 GitHub starsUsed in 1 repo~2.3k tokens
    Auto-check: notes
  • Paper Version

    claesbackman/AI-research-feedback

    Convert a LaTeX research paper into a policy brief, 1-page summary, or 5-page summary for a general audience, with factual review and a standalone HTML page for GitHub Pages.

    491 GitHub stars~4k tokensUpdated 12 days ago
    Auto-check: notes
  • Review Grant

    claesbackman/AI-research-feedback

    Run a 6-agent pre-submission panel review for a grant proposal targeting a specified funder or program

    491 GitHub starsUsed in 1 repo~5.6k tokens
    Auto-check: notes
  • Review Paper Checks

    claesbackman/AI-research-feedback

    Run a fast 3-agent mechanical check of an economics paper — spelling and grammar, internal consistency and cross-references, and unsupported claims.

    491 GitHub stars~4.3k tokensUpdated 12 days ago
    Auto-check: notes

Works with

Categories

Questions about Explain Diff

What does Explain Diff do?

Explain a code change as a standalone offline HTML page with a five-question quiz. Explain Diff is an agent skill from claesbackman/AI-research-feedback. Explain a code change as a standalone offline HTML page with a five-question quiz.

When should I use Explain Diff?

Explain Diff fits situations like: tasks that involve HTML artifacts.

How do I install Explain Diff in Claude Code?

Run `npx skills add claesbackman/AI-research-feedback --skill explain-diff -a claude-code`. Or copy the skill folder (Skills/explain-diff in claesbackman/AI-research-feedback) into .claude/skills/explain-diff in your project. Claude Code loads it when a task matches its description.

How do I install Explain Diff in Codex?

Run `npx skills add claesbackman/AI-research-feedback --skill explain-diff -a codex`. Or copy the skill folder (Skills/explain-diff in claesbackman/AI-research-feedback) into .agents/skills/explain-diff in your project. Codex loads it when a task matches its description.

Can I use Explain Diff in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add claesbackman/AI-research-feedback --skill explain-diff -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/explain-diff, .gemini/skills/explain-diff, .github/skills/explain-diff and .opencode/skills/explain-diff in your project.

What does Explain Diff need to run?

Going by SKILL.md and its folder, Explain Diff needs the command-line tools its instructions call (git). Its frontmatter pre-approves these tools: Bash, Read, Write, Glob, Grep.

Does Explain Diff access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Explain Diff safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Explain Diff use?

Explain Diff is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Explain Diff use?

About 2.1k tokens (SKILL.md is roughly 8.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Explain Diff?

Skills that share tags, products or a category with Explain Diff: Visual Review (ai-dynamo/dynamo, 8.2k stars), Paper Reader (AlphaLab-USTC/ResearchClaw, 134 stars), Researcher (krzysztofdudek/ResearcherSkill, 265 stars) and Flashcards (serenakeyitan/open-exam-skills, 142 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Explain Diff?

claesbackman (a GitHub user) maintains it in claesbackman/AI-research-feedback, which has 491 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on September 25, 2026.

Source: claesbackman/AI-research-feedback on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.