/code_review
Adversarial review of the current branch's diff
Run an adversarial review of the changes on your current branch against the base branch. Designed as a true second opinion: the reviewer’s job is to find ways the code will fail in production, not to compliment what works.
/code_review/code_review <focus>Examples:
/code_review/code_review security/code_review concurrency/code_review error handlingArguments
Section titled “Arguments”| Argument | Description |
|---|---|
<focus> | Free-text focus area, e.g. security, race conditions, error paths |
--codex | Require Tier 1 (codex CLI). Fails loudly if codex is missing or unauthenticated |
--claude | Force Tier 2 (Claude subagent) even when codex is available |
--xhigh | Codex only: use model_reasoning_effort=xhigh (slower, ~23x more tokens) |
-m <model> | Codex only: pass a specific model through (e.g. -m gpt-5.1-codex-max) |
The skill picks a tier automatically based on what’s available:
codex available | codex missing | |
|---|---|---|
| default | Tier 1 (codex) | Tier 2 (Claude subagent) |
--codex | Tier 1 | Stop with install instructions |
--claude | Tier 2 | Tier 2 |
- Tier 1 — codex. Runs OpenAI’s Codex CLI in
read-onlymode for a true cross-model second opinion. The diff between the current branch and the base branch is the input; codex streams reasoning, tool calls, and the final review. - Tier 2 — Claude subagent. Spawns the
adversarial-reviewersub-agent with a fresh context window. Same model family as the caller, but the clean window plus a canonical adversarial persona surface findings the main thread misses.
The first line of the response tells you which tier ran.
Behavior
Section titled “Behavior”- Read-only. Codex runs with
-s read-only; the subagent has noEditorWritetools. The skill never modifies files. - Verbatim output. The review body is presented as-is — no summarizing, truncating, or softening of findings.
- One pass per invocation. No looping. Re-run with a tighter focus argument if you need another angle.
- User-only. This command is
disable-model-invocation: true; other agents cannot trigger it. - Cross-model synthesis. If you ran Claude’s own
/reviewearlier in the conversation and Tier 1 ran, the skill appends across-model:block listing overlapping findings, codex-only findings, and claude-only findings.
Dependencies
Section titled “Dependencies”- hyprlayer >= 1.5.2. The skill streams codex’s
--jsonoutput throughhyprlayer codex stream, so older versions are rejected at Step 0 with an upgrade hint. - codex CLI (Tier 1 only). Install with
npm install -g @openai/codexand authenticate viacodex loginor$CODEX_API_KEY/$OPENAI_API_KEY. Tier 2 has no external dependencies.
Platform support
Section titled “Platform support”The skill ships parallel Bash (macOS / Linux) and PowerShell (Windows) helper scripts. Claude picks the right invocation from its system context, so no per-platform configuration is needed. Windows runs codex without the outer timeout 600 wrapper — the inner request timeout in codex itself enforces the bound — so set the Bash tool’s outer timeout to ~600s for parity.
Base branch detection
Section titled “Base branch detection”The skill resolves the base branch in this order:
gh pr view --json baseRefName(if a PR exists for the current branch)- The repo’s default branch via
gh repo view origin/HEADmainiforigin/mainexists, elsemaster
If there is no diff against the resolved base, the command stops with nothing to review.