code-review-diff

code-review-diff is a skill for Claude Code from lttr/claude-marketplace. It costs 74 tokens per session (1,507 once invoked), scanned A, original, MIT.

A read-only code-review tool for changes in Git, the version-control system used to track code. It reviews the current branch, staged changes, a branch or commit reference, or a local diff file, then produces a Markdown report.

In plain words
What is it for?
For reviewing current or staged changes, Git branches, commits, tags, `.diff` files, or `.patch` files before merging them.
Why use it?
It lets you inspect code changes without checking out branches, connecting to a code-hosting service, or posting comments on a pull request.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: positional $N argument.

Part of the aiwork plugin — 11 skills, 2 hooks shipped together

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.

agentmods
npx agentmods add skills/lttr/claude-marketplace/code-review-diff
Any agent
npx skills add lttr/claude-marketplace --skill code-review-diff
Clone the repo
git clone --depth 1 https://github.com/lttr/claude-marketplace

Made for: Claude Code.

Or install aiwork, the plugin that ships this one along with the rest of its 11 skills, 2 hooks.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/lttr/claude-marketplace/code-review-diff.svg)](https://agentmods.dev/skills/lttr/claude-marketplace/code-review-diff)
Your own site
<a href="https://agentmods.dev/skills/lttr/claude-marketplace/code-review-diff"><img src="https://agentmods.dev/badge/skills/lttr/claude-marketplace/code-review-diff.svg" alt="Measured on agentmods" height="20"></a>
Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,507 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00074 $0.01507
Opus 5 $0.00037 $0.00754
Sonnet 5 $0.00015 $0.00301
Haiku 4.5 $0.00007 $0.00151

Measured yesterday against content hash 9077639bacdb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

code-review-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 yesterday.

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/aiwork/skills/code-review-diff/SKILL.md · 143 lines

How it starts

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

Code Review

Pure git-native review pipeline. Resolves a diff from git-native inputs, runs the review pipeline, and produces a markdown report.

Does NOT check out branches, talk to Azure DevOps / GitHub, or post comments. PR resolution is the caller's job (see Usage).

Arguments

$ARGUMENTS is a space-separated string. Parse out optional flags first, then treat the remainder as the diff source.

Flag Meaning
--rules <path> Project rules markdown file.
--pr <number> PR / MR id (label only — no platform fetch).
--ticket <id> Ticket / work-item id (label only).
--name <title> Override inferred report title.
--print Print review to stdout; skip save prompt.

Wrappers may pre-pin any of rules_file, pr, ticket, name — user-passed flags WIN.

Input Detection

After flags are stripped, the remainder selects the diff source:

Form Source
empty current branch vs base (master/main)
staged git diff --staged
path ending .diff or .patch local diff file
anything else treat as git ref (branch / sha / tag)

Ambiguous → ask user. Do NOT guess. Never treat a bare numeric as a PR id — PR identity is set only via --pr.

Workflow

1. Resolve input → diff file path + metadata

empty
base=$(git rev-parse --verify master 2>/dev/null && echo master || echo main)
cur=$(git branch --show-current)
[ "$cur" = "$base" ] && abort "On base branch ($base). Switch to a feature branch."
git diff "$base"...HEAD > "/tmp/code-review-diff-$(date +%s).diff"
files=$(git diff --name-only "$base"...HEAD)
title="$cur"
slug="$cur"

Read the full file on GitHub · 143 lines

Files

What ships with it

1 file 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. yesterday Changed · +1 lines 9077639bacdb
  2. 6d ago First seen · 142 lines · 74 tokens per session scan A 85655f2e3822

Subscribe to this mod's changes

code-review-diff is a skill published in the GitHub repository lttr/claude-marketplace (2 stars, last pushed 3d ago), licensed MIT. It adds 74 tokens to every session and 1,507 once invoked, about $0.0004 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.