ir:code-review
FreeNo executable scriptsNot checkedReview a working diff for defects and report findings worst-first — the repo-owned, agent-invocable counterpart to the built-in `/code-review`, which is…
by ingo-eichhorst★ 105 GitHub starsAbout this skill
Review the Working Diff
/ir:code-review [effort] [base]
| Argument | Values | Default |
|---|---|---|
effort |
low · medium · high · xhigh · max |
medium |
base |
any git diff spec | origin/main...HEAD |
Both are positional and both optional: /ir:code-review, /ir:code-review high,
and /ir:code-review low origin/main...HEAD are all valid. A bare effort word is
an effort, never a PR number — this skill reviews a local diff and never
takes a PR argument.
Why this skill exists
The built-in /code-review is marked disable-model-invocation: the Skill
tool refuses it and it cannot be reached from Bash either. It is a
human-triggered path. That left ir:exec's review gate unrunnable (#1205),
so this is the repo's own reviewer — same job, agent-invocable, and aware of
conventions in AGENTS.md that a general-purpose reviewer wouldn't check.
It is not a replacement for the real thing. For a large or risky diff,
a human running /code-review <tier> origin/main...HEAD — or /code-review ultra for the cloud multi-agent pass — is still the stronger review, and
recommending that is a legitimate outcome of this skill.
1 · Resolve the diff
git fetch origin main # refresh the base before diffing
git diff --stat <base> # scope
git diff <base> # the review surface
This skill already defaults to origin/main...HEAD. Keep it — inside a
worktree, both of the defaults you'd otherwise reach for by hand mislead:
the local main ref is stale (never updated
when other PRs merge, so main...HEAD drags in already-merged hunks), and once
the branch has been pushed with git push -u, @{upstream}...HEAD is ~empty
(upstream now points at the pushed branch, so it reviews nothing).
origin/main...HEAD after a fetch is the honest surface.
Review only what the diff changed, plus whatever the change puts at risk. An unrelated pre-existing wart is not a finding.
2 · Effort ladder
Effort buys depth, and above low it buys an adversarial verify pass. Each tier
includes everything below it.
| Effort | Find | Verify pass |
|---|---|---|
low |
One careful read of the whole diff; obvious correctness and convention breaks | none — report findings unverified |
medium |
Trace each changed code path to its callers; check the tests that cover it | one refutation attempt per finding |
high |
Probe blast radius beyond the diff; confirm tests genuinely exercise the new behaviour rather than merely passing | 3 independent refutation attempts per finding |
xhigh |
Re-derive the change's intent from the issue/PR and check the diff actually achieves it; hunt edge cases by construction | 3 attempts, each from a distinct lens (correctness · security · does-it-reproduce) |
max |
Everything above, plus a completeness critic: what did this review not look at? | 3 distinct-lens attempts, then re-review whatever the critic surfaced |
Never escalate past the effort you were given. If the diff clearly warrants more, say so in the report instead of silently spending it.
3 · Dimensions
Defects first — this skill hunts bugs. Quality cleanups are secondary here
(/simplify owns that pass, and ir:exec runs it separately).
- Correctness — logic errors, off-by-one, nil/zero-value handling, error paths that swallow or mis-wrap, concurrency (races, unsynchronised shared state, aliasing of returned structs), resource leaks, boundary conditions.
- Repo conventions (
AGENTS.mdKey Conventions — a break here is a real finding, not a nit):- The session-state vocabulary is
session.CanonicalStates()and nothing else — a call site that retypes the list has become a second source of truth. No cancelled state (cancellation maps toready). Watch for enumerations that were complete under an older vocabulary: acasearm, aswitch, a format string or a doc line naming some-but-not-all states is the shape that shipped four separate defects in #1796.tools/state-vocabulary-lint.shcatches the single-line ones; a partition split across lines is yours to catch. - Hexagonal import direction:
domain/→ports/→adapters/→application/services/.domain/andports/must not import outward;application/services/reachesadapters/inbound/only throughports/. - Errors are logged via the
Loggerinterface, not propagated withfmt.Errorf. - Child sessions (subagents, background agents) link via
ParentSessionID. - Every adapter read or modification is consent-gated behind one of its
declared
Permissions— nothing exercised while pending or denied. - Format-specific transcript parsers live in the agent adapter package, not in shared tailer code.
- The session-state vocabulary is
- Test coverage — does a test actually reach the changed behaviour? A defect fix needs a test that was seen red before the fix existed; a test that passes
Install ir:code-review in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the ir:code-review skill do?
Review a working diff for defects and report findings worst-first — the repo-owned, agent-invocable counterpart to the built-in `/code-review`, which is `disable-model-invocation` and can only be run by a human. Scales from a single read to an adversarially-verified pass, and checks this repo's own conventions (the derived session-state vocabulary, hexagonal layering, permission gating, defect-tests-seen-red) on top of ordinary correctness. Invoked as `/ir:code-review [effort] [base]`. Triggers on "/ir:code-review", "review the diff", "review my changes", "review this branch", or when `ir:exec` reaches its review gate.
How do I install the ir:code-review skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the ir:code-review skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
by AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
by Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
by Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
by Anthropic