Skip to content
Back to skills

Cross Model Code Review Codex Gemini Claude

ASecurity

Reviews pull requests or local branch diffs using a model different from the author (Codex CLI, Gemini CLI / Antigravity CLI, or a fresh Claude session) chosen per chat, with strict quota-ceiling fallback, concurrency limits, safe fix commits, and single-commit verdicts. Use when asked to review a PR or branch with another model, switch reviewer engine per chat ("use codex reviewer", "use gemini reviewer", "use claude reviewer"), enforce cross-model code review, or configure review fallback a...

  • 14 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 26, 2026
ai-agentsrustgobashnodecode-reviewgit

Works with

  • claude code
  • cli

Security analysis

A100/100

Pro scans all 16 files and shows the line behind each finding

Scanned December 5, 2026

npx -y skills add mestrecs/skills --skill cross-model-code-review-codex-gemini-claude --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cross Model Code Review Codex Gemini Claude?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Cross Model Code Review Codex Gemini Claude
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mestrecs-cross-model-code-review-codex-gemini-claude/badge)](https://www.skillsdirectory.com/skills/mestrecs-cross-model-code-review-codex-gemini-claude)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: cross-model-code-review-codex-gemini-claude
description: Reviews pull requests or local branch diffs using a model different from the author (Codex CLI, Gemini CLI / Antigravity CLI, or a fresh Claude session) chosen per chat, with strict quota-ceiling fallback, concurrency limits, safe fix commits, and single-commit verdicts. Use when asked to review a PR or branch with another model, switch reviewer engine per chat ("use codex reviewer", "use gemini reviewer", "use claude reviewer"), enforce cross-model code review, or configure review fallback and quota caps.
license: MIT
compatibility: Needs Node.js 20 or newer, git, and at least one review CLI (codex, gemini, agy, or claude). GitHub CLI (gh) is required only for --pr. Scripts have zero npm dependencies and run on Windows, macOS, and Linux.
---

# Cross-Model Code Review (Codex, Gemini, Claude)

Review a pull request (`--pr <n>`) or a local branch diff (`--base <ref>`) with a model different from the one that wrote the change. The reviewer reads the code and callers directly (not trusting the PR description), may fix clear defects on the branch, and writes a verdict valid for one head commit.

- **Per-chat reviewer choice:** stored in `~/.engine-switch/chats/<session-id>.json` under role `reviewer`.
- **Strict ordered fallback:** moves to the next engine **only** when the current one is missing, logged out, or proven at its quota ceiling — **never** because it is slow.
- **Concurrency cap:** limits concurrent reviews per engine (default `3`) via machine-wide slot locks so a shared account is not drained.
- **Compatible verdict format:** writes `reviews/REVIEW-PR<n>.md` with `VERDICT: APPROVE|BLOCK` on line 1 and `REVIEWED-HEAD: <sha>` on line 2, matching `parallel-worktree-pr-merge-end-to-end`.
- **Review rounds:** the first pass checks all five failure cases and reports every finding. Follow-ups use the diff from the last reviewed head. Two BLOCKs require a separation before another review.

## When to use

Use this skill when:
- You want an independent code review from Codex, Gemini / Antigravity (`agy`), or a fresh Claude session (`claude -p`).
- You say `"use codex reviewer"`, `"use gemini reviewer"`, `"use claude reviewer"`, or `"reconfigure"`.
- You want automatic fallback when an engine hits its quota ceiling, without falling back merely for slow runs.

`scripts/` below refers to this skill's directory (for example `~/.claude/skills/cross-model-code-review-codex-gemini-claude/scripts/`). Always invoke scripts as `node <skill-dir>/scripts/<name>.cjs`.

## First-run setup

On first use or when the user asks to reconfigure, run the setup interview before running a review. Full questions, defaults, and schema are in `references/setup.md`.

1. Run `node scripts/detect.cjs` (read-only). Show detected CLIs (`claude`, `codex`, `gemini`, `agy`, and optional `gh`), versions, and sign-in state in plain words for confirmation. Give official install/sign-in links for missing tools; never ask for keys or tokens.
2. Ask Round 1 and Round 2 questions: available engines, default reviewer (`codex` recommended) and new-chat mode, ordered chain (recommend Codex first, Gemini second, Claude Sonnet last), ceiling thresholds and mid-run watchdog, max concurrent reviews per engine (default `3`), shared-account share %, and guard-hook settings if used.
3. Write `~/.engine-switch/config.json`, validate with `node scripts/config.cjs --validate ~/.engine-switch/config.json`, print a one-screen summary, and check the guard hook if Claude Code subagent enforcement is enabled.

Optional Codex account rotation uses `codex.accounts` in the user config. Sign in to each separate Codex home yourself using the commands in `references/setup.md`. The skill never signs in or handles credentials.

Use only accounts you are allowed to use, and follow your provider's terms of use. Rotation spreads work across your own seats; it is not a way around a provider's limits on a single account.

## Per-chat reviewer switch

When the user says:
- `"use codex reviewer"` -> `node scripts/engine-switch.cjs --chat <session-id> reviewer codex "user request"`
- `"use gemini reviewer"` -> `node scripts/engine-switch.cjs --chat <session-id> reviewer gemini "user request"`
- `"use claude reviewer"` -> `node scripts/engine-switch.cjs --chat <session-id> reviewer claude "user request"`

Reply in one line with what the script printed. Inspect the current key with:

```bash
node scripts/engine-switch.cjs --chat <session-id>
```

Without a chat key file, `review.cjs` uses `defaults.reviewer` from `~/.engine-switch/config.json` (default `codex`).

## Running a review

```bash
# Review a GitHub PR in its worktree (reads chat key, runs fallback chain)
node scripts/review.cjs --pr 42 --dir ../my-app-wt/feat --chat <session-id>

# Review a local branch diff against origin/main
node scripts/review.cjs --base origin/main --dir ../my-app-wt/feat --chat <session-id>

# Force a single engine (skips fallback chain)
node scripts/review.cjs --pr 42 --dir ../my-app-wt/feat --engine gemini

# Continue after separating the blocking part
node scripts/review.cjs --pr 42 --dir ../my-app-wt/feat --separated "Moved the scheduled job to its own PR"
```

Exit codes:
- `0`: Verdict file written (and fixes/verdict committed unless `--no-commit`). Read line 1 (`VERDICT: APPROVE` or `VERDICT: BLOCK`).
- `3`: No engine available — every engine in the chain is missing, logged out, or proven at its quota ceiling.
- `6`: Two distinct reviewed heads received BLOCK. Separate the blocking part into another PR or behind a flag that defaults to off, then pass `--separated "<what left the change>"`.
- `1`: Error — invalid arguments, git/`gh` failure, timeout, engine error unrelated to quota/auth, secret detected in diff, or malformed verdict.

## Review rounds

1. **First review.** Check for duplicate effects, interruption before and after saves or sends, concurrent runs, tenant isolation, and optional or scheduled behavior that should default to off. List all findings with IDs, severity and evidence.
2. **Follow-ups.** Mark each prior finding `RESOLVED`, `PARTIAL`, or `OPEN` with evidence. Review the diff from the last reviewed head. A fix regression or new P0/P1 in the diff can block. A new issue outside that diff can block only if it is a P0/P1 reproduced with a test or concrete steps and observed results. Record other new issues outside the diff as `P2-NEW`, which cannot block on its own.
3. **After two BLOCKs.** The runner checks committed reports before calling an engine. Use `--separated` to describe the separation, which the reviewer verifies in the new diff. Keep the reports in branch history.

## Fallback and Claude reviewer rules

- **Engine order:** Starts with the chat's `reviewer` preference (or `defaults.reviewer`), then continues through `review.order` (`["codex", "gemini", "claude"]` by default). Choosing `claude` goes straight to Claude.
- **When fallback triggers:** Only on `missing` binary, `logged-out` state, or proven `ceiling` (`quota-<engine>.json` over threshold, watchdog mid-run stop, or CLI rate-limit/quota error matching `/rate.?limit|quota|429|usage limit/i`). **Never** fall back on timeout or non-quota failure.
- **Codex account rotation:** Retries quota failures on the next eligible account while the review worktree is clean. The engine-level ceiling marker is written only when every configured account is at ceiling.
- **Claude reviewer:** Runs a fresh `claude -p --model sonnet --effort medium` session — never the chat that wrote the change.
- **Guard hook compatibility:** When the `engine-guard.cjs` `PreToolUse` hook from `codex-gemini-subagents-for-claude-code` is installed, `review.cjs` leaves verified ceiling markers in `~/.engine-switch/ceilings/<engine>.json` whenever an engine hits ceiling. A Claude reviewer subagent spawned via the `Agent` tool only passes with `CLAUDE-ONLY: ceiling` after the preceding engines in the chain are proven at ceiling.

## Non-negotiable rules

- Never review in the conversation that authored the code.
- Read the actual code, diff, and callers — never trust the PR description alone.
- Reviewer fixes must be committed safely (never `--no-verify`, never `git add -A`, never `git push`, never touch `.git`, `.github`, `.githooks`, `.claude`, or `.codex`).
- Never print, log, or commit secrets, tokens, passwords, or `.env` contents.
- A verdict is valid for one head commit (`REVIEWED-HEAD`). Any later code commit invalidates it.

## References

- `references/engines.md`: Engine CLI invocations, sandboxes, Windows worktrees, quota contract, and concurrency slots.
- `references/verdict.md`: Verdict file format, head-commit validity, fix commits, and secret checks.
- `references/setup.md`: First-run setup interview, detection, config schema, and hook check.

Files in this skill

  • SKILL.md6.7 KB
  • examples/engine-switch.config.json992 B
  • references/engines.md5.3 KB
  • references/setup.md8.4 KB
  • references/verdict.md2.6 KB
  • scripts/ceiling.cjs4.9 KB
  • scripts/cli-process.cjs2.1 KB
  • scripts/config.cjs10.1 KB
  • scripts/detect.cjs4.2 KB
  • scripts/engine-switch.cjs4.9 KB
  • scripts/review.cjs37 KB
  • scripts/test/ceiling.test.cjs3.2 KB
  • scripts/test/config.test.cjs6.1 KB
  • scripts/test/engine-switch.test.cjs2.3 KB
  • scripts/test/index.js413 B
  • scripts/test/review.test.cjs20.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.