/crosscheck:dual-reviewfrom Model Crosscheck
Runs two independent code reviews (Claude + OpenAI Codex CLI) on the same diff, then merges findings into a consolidated report. Use before merging for a second opinion.
Ships in Model Crosscheck. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Two independent reviews of the same diff, merged into one report. The value is in the merge: agreement between two different models is a strong signal; disagreement tells the user where to look manually.
Sibling skills.
/dual-review,/tri-reviewand the rest name the other skills in this set. Installed as the plugin, invoke them as/crosscheck:<name>; as plain copies, as/<name>. Either way their files sit next to this one, so "see /tri-review's Notes" means../tri-review/SKILL.mdrelative to this skill's base directory.
Sibling rule. This skill shares its plumbing and prompts with /tri-review but keeps its own steps. Where the two, or this skill and a shared file, still differ: follow the stricter rule, report the difference to the user, and never edit a skill during a run.
Claude Code loads only this SKILL.md. Resolve <shared dir>: the absolute
path of <this skill's base directory>/../../crosscheck-shared (Claude Code states a
skill's base directory when it loads it). Write that absolute path in every
command: commands run from the target repo, where a relative path would
resolve against the repo. If the folder is missing, stop and say the
install is incomplete (README, "Install").
Before step 0, Read each of these files in full; their rules are part of this skill:
<this skill's base directory>/../../crosscheck-shared/gate.md<this skill's base directory>/../../crosscheck-shared/run.md<this skill's base directory>/../../crosscheck-shared/codex.md<this skill's base directory>/../../crosscheck-shared/egress.md<this skill's base directory>/../../crosscheck-shared/tiers.mdPrompt templates, in <shared dir>/prompts/
(filled per egress.md, "Prompt templates"): probe.md,
review-walkthrough.md, review-operations.md, review-plan-trace.md,
review-rebuttal.md, standing-risks-head.md.
Legs. Claude: blind findings, verification, merge. Codex: the built-in review, plus the prompted passes 4a, 4b and 4d when step 2 selects them. This run sends work to OpenAI only.
Gate, run folder, mode. Run the gate check (gate.md). Create the
run folder (run.md, skill name dual-review). Then decide the mode before
any repository command: documents the user names outside any git repo
→ no-repo mode (step 1, last bullet), which runs no repository git
command; otherwise repo mode: record <repo root> from the
session's working directory (git rev-parse --show-toplevel; if it
fails, there is no repo: ask whether this is a no-repo document review).
Determine diff scope.
Find the trunk first; never assume a name. If the repo's
CLAUDE.md or AGENTS.md names one, use it; if the two name different
trunks, stop and ask. Only when neither names one, ask the server:
cd "<repo root>" && git ls-remote --symref origin HEAD, taking the
branch from its ref: refs/heads/<name> line, never the cached
origin/HEAD (it can be years stale on an old clone).
Check the name with git check-ref-format --branch "<name>" and quote
it. Then
cd "<repo root>" && git fetch origin "<trunk>" && git rev-parse --verify "origin/<trunk>".
No source, or fetch or validation fails: stop and ask. Name the trunk
in the report.
Branch has commits vs the trunk: scope = origin/<trunk>...HEAD;
Codex uses --base "origin/<trunk>", the SAME ref as the patch (a
stale local trunk silently gives Codex a different diff).
Only uncommitted changes: Codex uses --uncommitted (includes
untracked files). Write the patch with this command instead of step
2's. It marks untracked files in a THROWAWAY index copy, so the real
staging area is never touched:
cd "<repo root>" && umask 077 && cp "$(git rev-parse --git-path index)" "<run folder>/idx" && GIT_INDEX_FILE="<run folder>/idx" git add --intent-to-add --all && GIT_INDEX_FILE="<run folder>/idx" git diff HEAD > "<run folder>/review.patch"; rc=$?; rm -f "<run folder>/idx"; [ $rc -eq 0 ] && git ls-files --others --exclude-standard && grep -c '^diff --git' "<run folder>/review.patch"
PowerShell (untested; git diff --output writes the patch byte for
byte, and finally removes the temporary index on any outcome):
Set-Location '<repo root>'; $idx = '<run folder>\idx'; $ok = $false; try { Copy-Item (git rev-parse --git-path index) $idx -ErrorAction Stop; $env:GIT_INDEX_FILE = $idx; git add --intent-to-add --all; if ($LASTEXITCODE -ne 0) { throw 'git add failed' }; git diff HEAD --output='<run folder>\review.patch'; if ($LASTEXITCODE -ne 0) { throw 'git diff failed' }; $ok = $true } catch { "FAILED: $_" } finally { Remove-Item Env:GIT_INDEX_FILE -ErrorAction SilentlyContinue; Remove-Item $idx -Force -ErrorAction SilentlyContinue }; if ($ok) { git ls-files --others --exclude-standard; (Select-String -Path '<run folder>\review.patch' -Pattern '^diff --git' -CaseSensitive).Count }
The temporary index is removed whether or not the chain succeeded,
and nothing after it runs on a failure: no file list and no count
means stop and report the error. The final number is step 2's
empty-patch check (0 = nothing to review: stop before any leg);
then continue at step 2's pin and scan. Show the user the untracked list in the run's status line before
any leg starts (those files go out in the patch); stop and ask only if
a name looks secret (.env*, keys, credentials, dumps) or the list
has more than 20 files. /code-review reads
git diff HEAD, which omits untracked files: review those from the
patch.
Both committed AND uncommitted changes: --base and
--uncommitted are mutually exclusive, so don't pick silently. Ask
the user to commit first, or review the committed scope and say in the
report that the uncommitted edits are excluded.
Documents with no repo (no trunk, no git): stage only the
documents and their source of truth in the run folder (run.md) and
build the patch with
cd "<run folder>" && { diff -u /dev/null "<file>" >> review.patch || [ $? -eq 1 ]; }
per file (diff exits 1 when the files differ, which is success
here; exit 2 is a failure).
Then check the assembled patch is not empty: grep -c '^+++ ' review.patch
must be at least 1, else there is nothing to review: stop. Skip the built-in review (it needs --base or --uncommitted).
The Codex leg is then the walkthrough pass 4a, run from the run folder
with --skip-git-repo-check, plus 4b if the document gets executed;
the pin check uses the patch sha256 alone. Say in the report that the
built-in review did not run.
Write the patch, pin it, scan it, choose the passes.
cd "<repo root>" && umask 077 && git diff "origin/<trunk>...HEAD" > "<run folder>/review.patch" && grep -c '^diff --git' "<run folder>/review.patch"
0 (no diff --git line) = nothing to review: stop.
Pin (run.md, "Pin what is sent"): record
git -C "<repo root>" rev-parse HEAD and the patch's sha256. Nobody
pushes to, rebases or edits the tree while the legs run.
Secret-scan the patch (run.md) before any leg starts.
Choose the pass set now, so every pass launches together in step 3:
Write the prompt files. Build sr-codex.md (egress.md: only a list
the user has named, minus entries that concern only Gemini's CLI;
with no list it is an empty file), then, each as
cd "<run folder>" && umask 077 && <join>:
cat "<shared dir>/prompts/review-walkthrough.md" sr-codex.md review.patch > walk.prompt.md;cat "<shared dir>/prompts/review-operations.md" sr-codex.md review.patch > ops.prompt.md;cp "<approved plan path>" plan-approved.md && cat "<shared dir>/prompts/review-plan-trace.md" plan-approved.md sr-codex.md review.patch > trace.prompt.md.Secret-scan the joined files.
Start every Codex pass in the background, in parallel. First, if
not run yet this run, the Codex probe (codex.md). Then one Bash call per
pass with run_in_background: true, noting each task id (run.md):
--uncommitted form);<dir> = <repo root>
and <name> = walk, ops or trace.Always keep -s read-only: a reviewer never touches the tree, and the
diff under review is untrusted input. Do not open any output until step
4's Claude file is written.
Claude leg: write my own findings to <run folder>/claude.out
before opening any Codex output. Same question (correctness,
security, data loss), same grading. A Claude leg written after reading
Codex can only echo it, and agreement tags are the strongest evidence
in the report. The findings are written by the main loop, which the gate pins to
the newest top-tier model, or by subagents explicitly pinned to that
same model: this is mandatory. /code-review at high effort may run as an
extra finder on the same scope, but its workers may run on a tier it
chooses, so its output is input only: the main loop checks each of its
findings against the code before it enters claude.out, and it is
never the sole Claude leg. When 4d runs, also check myself that the
diff does what the approved plan says, nothing more and nothing
missing.
Grading, both legs: BLOCKER = a demonstrated failure caused or
exposed by this change (may cite unchanged lines it newly exercises);
SHOULD = a real gap shippable at a stated risk; NIT = never matters.
Codex's built-in review grades P0 to P3 and takes no prompt: P0 and
P1 → BLOCKER, P2 → SHOULD, P3 → NIT. Severity is the raising leg's; I
may rebut a grade with evidence (step 6), never quietly lower it. Legs
grading one finding differently: file it under the higher grade, show
both grades.
OWNER-DECISION. A finding only the user or a named resource owner can
settle (a policy, whether a credential may be used, a retention term, a
product choice) is marked OWNER-DECISION in addition to its grade,
saying exactly what must be decided. Every prompted pass is told it may
use the label; only the leg that raised the finding applies it. I still
verify it in step 5: CONFIRMED → it goes to the user as a decision in the
report, keeping its grade, instead of to the rebuttal; REJECTED → step
6 like any other finding.
The passes:
review-walkthrough.md): an agent executing
each changed section literally, reading the whole touched file: where
it runs a command that fails or hangs, meets contradicting
instructions, hits an undecidable step, or leaks data. It runs
alongside the built-in review, never instead of it (it is the one
pass whose question I did not write, and the built-in review takes no
prompt). Findings on lines the change neither touches nor newly
exercises are PRE-EXISTING: listed separately, never
merge-blocking. A whole-repo walkthrough is a separate periodic
audit, not this gate.review-operations.md): privileges, shared
state, untrusted input and egress, secrets and retention, failure and
cleanup, partial runs. Reviewing an executed diff for bugs alone
reliably misses this class, because nobody was asked.tsc --noEmit) and report the result as evidence. Guard: running the diff's code is running
untrusted code. Only when the user owns the change; only in a disposable
directory or worktree with no credentials in the environment and no
outside network; extract the state machine into a test harness rather
than running the whole script; if that is not possible, ask first. A
type check or linter that does not execute the diff's code may run in
the repo. Codex stays read-only.review-plan-trace.md), only with an approved
plan: what the plan says that the diff does not do, and what the diff
does that the plan does not say.Check validity, then merge.
diff -u for documents), writing
review-recheck.patch in place of review.patch; compare its sha256
with the recorded one, and read git -C "<repo root>" rev-parse HEAD
again (repo mode). Either changed → the legs saw different code; the
review is void. Say so and start again on the new state.standing-risks.example.md next to /tri-review is never in force by
itself). The prompted passes carried the block; a match I propose for any finding (including the built-in
review's) goes through step 6 as a grade dispute.Rebuttal round: a refuted finding gets one defense. For Codex
findings REJECTED in step 5, send Codex ONE follow-up, filled from
review-rebuttal.md into rebut-codex.head.md, then joined with the
standing-risks block (egress.md):
cd "<run folder>" && umask 077 && cat rebut-codex.head.md sr-codex.md > rebut-codex.prompt.md.
It carries each finding's
ID and file:line, the finding as Codex wrote it, my refutation
evidence, and the request CONCEDE or DEFEND (a Claude-only finding that
verification rejects is dropped, reason noted). Grade disputes ride the
same round: a finding I confirm but would grade lower goes back as
CONCEDE-GRADE or DEFEND-GRADE; the finding is kept either way, and an
unresolved grade is [disputed] with both grades, filed under the
higher. The follow-up carries only the findings, the evidence and the
requests; for a grade dispute it may state the grade I propose and asks
for Codex's final grade. It never tells Codex what to conclude or how to
label the point ("concede this", "mark it OWNER-DECISION").
Launch it in the background per codex.md, "Prompted pass" (<name> =
rebut-codex), under the rebuttal contract in codex.md, "Rebuttals":
the REBUTTAL: receipt, each finding answered under its own quoted file:line, else re-send once,
then [disputed] with "rebuttal failed". Concede → drop. Defend →
re-examine once; if I still disagree, [disputed] with both positions
and my recommendation; the user rules. One round only; skip it when
nothing was rejected.
Report one consolidated list, grouped BLOCKER, SHOULD, NIT, then
PRE-EXISTING and matched standing risks, each tagged by source:
[both], [claude], [codex] or [disputed], naming the pass when it
was not the baseline review (walkthrough, operations, plan trace).
Never omit a disputed finding. Open BLOCKERs = the review recommends
against merging; the user decides. The report also lists: every
OWNER-DECISION with what must be decided; every pass missing or
retried, and why; the trunk; the 4c results; any sibling-rule
difference found; and the gate check, run once more just before
reporting (gate.md).
End with a block ready to paste into the PR or MR description (many repos ask to fix the findings or list them as waived), one line per open BLOCKER or SHOULD that will not be fixed before merge:
Waived review findings (/dual-review, <date>):
- <grade> <file:line>: <one line>. Waived because: <reason or the user's ruling>.
With none: Waived review findings: none. Then cleanup, and the run-log
line only if the user named a run-log file (run.md): findings per leg and pass by grade, confirmed vs
rejected, rebuttals conceded, calls and wall-clock minutes per pass.
Defects surfacing later are logged then, as MISSED-BY-ALL or credited
to the leg that raised them.
--skip-git-repo-check only when run outside a git work
tree (documents with no repo).What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub sameerkhan/model-crosscheck --plugin crosscheck7 skills in this plugin
/dual-planPlan and build a feature with Claude AND OpenAI Codex together: Claude drafts the implementation plan, Codex critiques it against the codebase, Claude merges and implements after user approval, then /dual-review gates the merge. Use when the user says "dual plan", "plan with both", "plan this with ChatGPT/Codex", or wants both models on a feature./tri-decideDecide an architecture or technology question with Claude, OpenAI Codex, and Google Gemini proposing independently and blind, then cross-examining each other's approaches. Produces a decision record: options, cruxes, what each bets on, a recommendation, and a revisit trigger, not a winner. Use when the user says "tri decide", "triple decide", "decide with all three", or faces a hard-to-reverse technical decision (datastore, framework, protocol, architecture, build-vs-buy)./tri-planPlan a feature with Claude, OpenAI Codex, AND Google Gemini together: Claude drafts the implementation plan, Codex and Gemini independently critique it against the codebase in parallel, Claude adjudicates and implements after user approval, then /tri-review gates the merge. Use when the user says "tri plan", "triple plan", "plan with all three", or wants maximum independent scrutiny on a plan before code is written./tri-researchResearch a factual question with Claude, OpenAI Codex, and Google Gemini: Claude gathers and writes a claim ledger (every number dated and sourced), the other two re-fetch the sources and try to break it, then Claude re-verifies every disputed row against the page. Produces one ledger where every claim carries a status, confirmed by N auditors, corrected, disputed, unverified, unsourced, or single-source, rather than three merged reports. Use when the user says "tri research", "triple research", "verify these numbers", or before external facts (competitor pricing, platform capability, market claims) become load-bearing in a memo or a hard-to-reverse decision./tri-reviewTriple code review: Claude writes its own blind findings on the gated top-tier model (main loop or pinned subagents; /code-review only as an extra finder) while OpenAI Codex CLI AND Google Gemini (Antigravity CLI) review the same pinned diff, then all three are verified and merged into one consolidated report. Use when the user says "tri review", "triple review", "review with all three", "Claude + Codex + Gemini review", or before a merge when they want maximum independent coverage./tri-strategyDecide a business or strategy question with Claude, OpenAI Codex, and Google Gemini arguing from three deliberately different lenses: unit economics, competitive positioning, and execution capacity, over the same evidence pack. Produces a strategy memo with what each option bets on, cruxes resolved against real data, and a revisit trigger. Use when the user says "tri strategy", "strategy decision", "strategy with all three", or faces a hard-to-reverse business decision (pricing, packaging, market focus, build-vs-buy, hiring shape, GTM motion).Other plugins' skills for the same job