code-review
Review the changes since a fixed point (commit, branch, tag, PR, or merge-base) on two axes — Standards (does it follow this repo's documented rules?) and Spec (does it do what the originating issue asked?). Each axis returns a verdict per enumerated item rather than an open-ended list of findings, so a round terminates. Use when the user wants to review a branch, a PR, working-tree changes, or asks to "review since X"; and again after fixes, to review the fix.
ConnorGriffin · AI review on file
Installation
Read the source and dependencies before running a command. Copying does not install or execute anything.
npx skills add ConnorGriffin/skills --skill code-reviewAbout this skill
name: code-review description: Review the changes since a fixed point (commit, branch, tag, PR, or merge-base) on two axes — Standards (does it follow this repo's documented rules?) and Spec (does it do what the originating issue asked?). Each axis returns a verdict per enumerated item rather than an open-ended list of findings, so a round terminates. Use when the user wants to review a branch, a PR, working-tree changes, or asks to "review since X"; and again after fixes, to review the fix.
Code review
Review a diff on two axes, in parallel sub-agents, and report them side by side.
- Standards — does the code follow the rules this repo documents?
- Spec — does the code do what the originating issue or plan asked for?
The premise that makes this different from "find problems in this diff": a review round has to be able to finish. An open-ended hunt samples a diff, and every fresh round samples it differently, so three rounds turn up three disjoint sets of real defects and nobody can tell whether the fourth would turn up more. Each axis here enumerates a closed list from a source document first, then returns a verdict per item. Findings are the items that came back bad. The reader learns what was checked, not just what was noticed.
Two rules follow from that, and they are the ones to keep if everything else is forgotten:
- Enumerate before you judge. The list of things to check comes from a document (the repo's standards, the issue's acceptance criteria), so it is finite, and the same on every run.
- A finding carries a failure scenario. Concrete input or state, traced in
the code, and the wrong thing that results. No scenario means it goes in
unverifiedor is dropped. A plausible-sounding finding nobody traced is how a fix gets written for a defect that was never there.
Delegation authority
Invoking this skill authorizes every sub-agent dispatch that this procedure marks mandatory, including a mandatory nested review skill. Do not ask again solely because a session-level preference says "do not spawn agents"; apply that preference to discretionary delegation only. An explicit task-level refusal of this required review or revocation of delegation overrides this authorization: stop and state that the requested workflow cannot run without its required independent review.
Dependency and reviewer selection
At the standard skill root, when orchestrate is installed, read its
references/review-routing.md and references/routing-table.md directly before
dispatch. Use the four-row reviewer matrix, classify this skill's area as
Code review, and apply the matrix's Claude-parent Codex presence/headroom gate
to select the initial reviewer adapter and model.
When orchestrate or its review-routing.md is not installed, say so in one
line and continue Claude-only: use Sonnet for routine review or Opus for
load-bearing review, with no Codex attempt.
Modes
First review — the full process below.
Re-review (after fixes land): the diff under review is the fix, not the original change. Run the same two axes over it, with one extra question per fixed finding: does the fix do what the finding asked, and does it contradict anything the original code or its documents already said? This mode is not optional politeness. A fix written from the finding text rather than from the code is the single most reliable source of new defects, because the author has the finding in front of them and not the system. Scope the divergent-copies check to the fix: enumerate the copies of every fact the fix touched, and return a verdict per pair. A fix that edits one copy of a fact with four encodings has minted three new pairs that can disagree, and the next round will find one.
Hard cap: three rounds. If round 3 still returns new violated items on the same enumeration, the change has a structural problem, not undiscovered typos — almost always a fact with too many copies, or logic that exists only as prose. Stop reviewing. Name the structure problem and route it to the author as a design decision. A fourth fix round on the same enumeration buys new defects, not fewer.
Fixing findings
Rules for the change's author, not for the reviewing session — a review still only finds, and hands these to whoever holds the code. This is where rounds are manufactured.
- Re-derive the fix from the code and its documents, never from the finding text alone. The finding names the symptom; the code owns the truth. Open the file, read what is actually there, and decide the fix from that. Patching the sentence or line a finding quotes, without re-reading what surrounds it, is how a round's worst defect ends up authored by the previous round's fix.
- A fix that touches a fact with copies updates every copy, or collapses them to one authority — and says which it did. Half a fact updated is worse than none: it converts a redundancy into a contradiction.
- When a finding cites a rule with a rationale, sweep the diff for every other site that rationale covers before declaring it fixed. One measured fix applied a case-insensitivity correction to 1 of the 3 regexes that shared its reason, and the other 2 cost a further round.
- A fix that edits prose triggers a re-read of the surrounding section, for sentences the edit now contradicts. Prose has no compiler; the only check on a documentation fix is the paragraphs it sits inside.
Process
1. Pin the fixed point
Whatever the user named is the fixed point: a SHA, branch, tag, main, HEAD~5,
a PR URL or number, or nothing (meaning the working tree against HEAD).
For a PR, fetch it rather than trusting the local checkout:
git fetch origin pull/<n>/head:pr-<n> && git fetch origin <base>
Then resolve and check the base is not stale:
git rev-parse <fixed-point> && git rev-parse origin/<fixed-point>
If a local branch a
Read the complete source ↗