review-a-diff

review-a-diff is a skill for Claude Code from skilletmd/skillet. It costs 47 tokens per session (688 once invoked), scanned A, original, Apache-2.0.

A code-review checklist for examining a set of code changes, called a diff, for bugs, security problems, and missing tests.

In plain words
What is it for?
Reviewing a pull request or checking your own branch for incorrect edge-case handling, unsafe code, broken error paths, concurrency issues, and missing tests.
Why use it?
It focuses review time on problems that automated checks may miss before changes are merged or pushed.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Reviewing a pull request or checking your own branch for incorrect edge-case handling, unsafe code, broken error paths, concurrency issues, and missing tests.

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

Made for: Claude Code.

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 review-a-diff

README.md
[![agentmods](https://agentmods.dev/badge/skills/skilletmd/skillet/review-a-diff.svg)](https://agentmods.dev/skills/skilletmd/skillet/review-a-diff)
Your own site
<a href="https://agentmods.dev/skills/skilletmd/skillet/review-a-diff"><img src="https://agentmods.dev/badge/skills/skilletmd/skillet/review-a-diff.svg" alt="Measured on agentmods" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 688 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.00047 $0.00688
Opus 5 $0.00023 $0.00344
Sonnet 5 $0.00009 $0.00138
Haiku 4.5 $0.00005 $0.00069

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

Security

Grade A, and why

review-a-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 8d 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.

skills/review-a-diff/SKILL.md · 65 lines

How it starts

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

review-a-diff

Most review feedback is noise a linter should have caught. This skill spends your attention where it pays: correctness, security, and the tests that prove the change works. Read the diff three times, once per lens, instead of once for everything.

When to use

Reviewing a PR, or checking your own branch before git push. Works on any language.

Get the diff

git diff main...HEAD          # your changes since you branched from main
git diff main...HEAD --stat   # files touched, at a glance

Read the --stat first. A change that touches 40 files for a "small fix" is the first finding.

Lens 1 — Correctness

Read the diff as if it will run with the worst possible input.

  • Off-by-one, wrong comparison operator, inverted boolean.
  • Null / undefined / empty: what happens when the list is empty, the map misses, the call returns nothing?
  • Error paths: is the error swallowed, logged, or propagated? Does a failed write leave half-written state?
  • Concurrency: shared state touched without a lock, an await that races a later read.
  • The change does what the PR says — and nothing the PR doesn't say.

Lens 2 — Security

# Which files touch sensitive surfaces (matches filenames)?
git diff main...HEAD --name-only | grep -iE "auth|sign|cred|token|secret|crypto|sql"

# Are there secrets in the added lines themselves (matches diff content)?
git diff main...HEAD | grep -nE "^\+" | grep -iE "api.?key|secret|token|password|BEGIN [A-Z ]*PRIVATE KEY"

If either matches, slow down. Check for:

  • User input reaching a query, shell, file path, or eval without validation.
  • Secrets committed in the added lines — keys, tokens, passwords, .env values.
  • Authorization checks that are missing, not just authentication (is the user allowed to touch this record?).
  • Logging that prints tokens, passwords, or full request bodies.

Lens 3 — Tests

A change without a test is a claim without proof.

  • Is there a test that fails before this change and passes after?
  • Does it cover the edge case the change is about, or just the happy path?
  • If there's no test, the PR should say why ("config-only", "covered by the integration suite") — not stay silent.

Read the full file on GitHub · 65 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. 8d ago First seen · 65 lines · 47 tokens per session scan A 91db7ab0fe9a

Subscribe to this mod's changes

review-a-diff is a skill published in the GitHub repository skilletmd/skillet (3 stars, last pushed 9d ago), licensed Apache-2.0. It adds 47 tokens to every session and 688 once invoked, about $0.0002 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.