/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. The reviewer hunts for the ways your code will fail in production.
/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 from what it finds:
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 cross-model second opinion. The skill feeds it the diff between the current branch and the base branch, and 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 skill prints the review body as-is. It never summarizes, truncates, or softens a finding.
- 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, and Step 0 rejects older versions 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 you configure nothing per platform. Windows runs codex without the outer timeout 600 wrapper, since codex’s own request timeout enforces the bound. 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.