code-review · diff

git:20260902.6995fc4 to git:20260902.54b4710

16 added, 15 removed. Audit A to A.

---
name: code-review
description: Dispatches a fresh-context code review of a diff and prints the reviewer's report in full; the review methodology itself lives in `reviewing-code`, which the review agents load. Trigger on "review this diff", "review these changes", "code review this", or "/code-review".
effort: high
argument-hint: "[<diff target>]"
---
# Code Review
## Input
- `$ARGUMENTS` names the diff to review — a PR number or URL, a branch, a
- commit range, or a path. It is optional: with no argument, review the
- working tree's diff against the base branch. Resolve it once and pass the
- resolved target to the reviewer; never ask the user to restate it.
+ `$ARGUMENTS` names the diff — a PR number or URL, a branch, a commit range,
+ or a path. With no argument, review the working tree's diff against the base
+ branch. Resolve it once and pass the resolved target to the reviewer; never
+ ask the user to restate it.
## When Invoked Directly
- When a user asks for a review in the main session ("review this diff",
- `/code-review`), the session itself is not a valid reviewer — it holds the
- conversation history `reviewing-code` forbids. Do not review inline.
- Dispatch the `code-reviewer` agent (or, if unavailable, a fresh read-only
- subagent instructed to follow `reviewing-code`) against the resolved diff,
- then present its report in full, in the shape `reviewing-code`'s
- `## Report Format` pins — never a summary of it. The methodology
- `reviewing-code` carries is what that dispatched reviewer applies.
-
- ## Methodology
+ The main session holds the conversation history `reviewing-code` forbids, so
+ it is not a valid reviewer. Do not review inline. Run these in order:
- Call the Skill tool with `reviewing-code`.
+ 1. **Load the format.** Call the Skill tool with `reviewing-code` and read
+ its `## Report Format`. Order matters: a relay cannot hold a shape it has
+ not read, and loading it after the dispatch is the defect this sequence
+ fixes.
+ 2. **Dispatch.** Dispatch the `code-reviewer` agent, which preloads
+ `reviewing-code`, against the resolved target. When it is unavailable,
+ dispatch the built-in read-only `Explore` subagent and write the same
+ `## Report Format` requirement into its prompt.
+ 3. **Relay.** Print what the reviewer returned. `## Report Format` states
+ what a relay owes, and what to do with a report that does not match it.