Guide
What you get: A read-only reviewer that reads your uncommitted diff and lists real bugs with file:line and a fix, then gives a ship / ship after fixes / don't ship verdict. Best for Developers using Claude Code (or Codex) who want a second look at a change before committing..
Before you start
- A git repository with uncommitted or staged changes
- Claude Code with project subagents in .claude/agents/ (or Codex with .codex/agents/)
- Fill in project_name and base_branch
Worked example (Oct 17, 2026, Claude Code 2.1.296; Codex 0.151.0 (gpt-5.6-sol))
Input
Planted change in src/lib/pagination.ts (left uncommitted): a new hasNextPage(page, itemCount, pageSize) that returns `page <= totalPages(...)` (off by one: it says there is a next page on the last page) plus an unused `import { readFileSync } from "node:fs"`. Request: "Use the code-reviewer subagent to review my uncommitted changes."Result
Claude Code: the code-reviewer subagent ran (confirmed in the log) and reported "hasNextPage is off by one, so 'Next' shows on the last page" at pagination.ts:15 with the fix `<` instead of `<=`, flagged the unused readFileSync import at :1, noted two older edge cases (NaN page size, negative page), and ended with "Verdict: ship after fixes." No files changed. Codex: on the second run it spawned the code-reviewer agent and reported the same two issues ("uses `<=`, so the final page ... incorrectly reports that another page exists") with "fix before shipping"; no files changed. Verified by hand: hasNextPage(3, 30, 10) returns true with the planted code.Test project: fresh create-next-app (Next.js 16.4.2, TypeScript), Node 24.14.1. Blanks filled with project_name = "demo-app (Next.js 16 + TypeScript)". Claude Code: body saved as .claude/agents/<name>.md, run headless with `claude -p "Use the <name> subagent to ..." --permission-mode acceptEdits`. Codex: converted to .codex/agents/<name>.toml (name, description, developer_instructions) and run with `codex exec -m gpt-5.6-sol -s workspace-write "Use the <name> agent to ..."`. Subagent use was confirmed from Claude Code's stream-json log (Agent call with subagent_type) and from Codex session logs (spawn_agent with agent_type, and the agent's instructions present in the child session). Claude Code allowed tools: Bash(git diff *), Bash(git status *), Bash(git log *). On Codex's FIRST run the agent was not used: Codex followed a code-review skill installed in this user's Codex setup and spawned a generic helper (no agent_type); it still found both issues. A second identical run used the code-reviewer agent. So Codex picked up the agent in 1 of 2 runs. After this test step 1 also checks git status, so new untracked files get reviewed.
How to check it worked
- Check the reviewer names the exact line of each bug and gives a concrete fix
- Run `git status` afterwards: the reviewer should not have changed any files
- Try one finding yourself (for example call the function with the failing input) before acting on it
Common problems
- `git diff` and `git diff --staged` do not show brand-new untracked files, so a new file you never `git add`-ed will not be reviewed
- In Codex, another installed review skill can take over and the agent may not be used; check that it says it used the code-reviewer agent
- Codex ignores the `tools:` line, so the 'do not edit files' rule relies on the instructions alone there
Log in to join the discussion.