/crosscheck:dual-planfrom Model Crosscheck
Coordinates feature planning between Claude and OpenAI Codex: Claude drafts the plan, Codex critiques it against the codebase, then Claude merges and implements after user approval. Use for multi-model feature development.
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.
Feature workflow with two models: Claude drives, Codex independently critiques at two gates, the plan and (via /dual-review) the final diff. Codex is prompted to find what the plan gets wrong, not to agree with it.
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.
Aim: converge in at most 3 complete rounds. Extra rounds mostly come
from readings of existing behaviour the claims table never listed (step
1), owner decisions left open (OWNER-DECISION, step 3), and fixes that
break something else (step 3, "check the fix"). History:
<shared dir>/WHY.md.
Sibling rule. This skill shares its plumbing and prompts with /tri-plan 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, plan-round0.md,
plan-preamble-codex.md, plan-lens-a.md, plan-lens-a-close.md,
plan-lens-b.md, plan-lens-b-close.md, plan-ledger-appendix.md,
standing-risks-head.md.
Gate and run folder. Run the gate check (gate.md). Create the run
folder (run.md, skill name dual-plan) and check
the user's paused directory, if they named one, for a run to resume or
an old one to ask about (run.md, "Pausing"). From the session's working directory
record <repo root> (git rev-parse --show-toplevel) and <base>
(git -C "<repo root>" rev-parse HEAD). Documents with no repo: stage the
documents in the run folder, use the run folder as <repo root> and
none as <base>, skip every git command in this skill except the
run-folder check (run.md), run the critics from the run folder with
--skip-git-repo-check on codex exec only, and re-check citations
against the staged files.
Scope the feature. Explore the codebase as usual (the repo's
CLAUDE.md or AGENTS.md rules apply). Write
<run folder>/plan.md in two passes. First: a first line naming the
version (# <title> (v<V>), a plain title with no quotes, backticks
or $), the repo root and base commit, the OWNER QUESTIONS section
(below) and the claims table. Round 0 (step 1b) checks those. Only
then add the plan itself (goal, files to touch, approach, data-shape
changes, risks, test plan).
One plan per risk level. If the work mixes a low-risk part (copy,
styling, docs) with a part that touches data shape, auth, tenancy,
credentials, queues or deploy, propose a split in OWNER QUESTIONS
(default: split). Each resulting plan gets the gate tiers.md gives it.
A plan that ships first must be safe to ship alone, and its Lens B
judges that. Codex may object to the split (or to not splitting) like
any other point.
Cross-repo impact goes in the plan. For every queue, message field,
event or API another repo consumes that the plan touches, run whatever
cross-repo search the project has (a script that searches sibling
repos, a code-search tool, from <repo root>) and record, in
the plan's risks section, each repo, file path and direction
(consumes / produces) plus any repo it could not search.
Never paste its matched code lines, and handle the other repos' names
per egress.md.
The claims table has one row per API, function, CLI flag, config
key or credential the plan relies on, and one row per behaviour of
existing code the approach depends on: which value wins when two
sources disagree (header vs query, channel vs account), what happens on
a missing or failed read (fail open, reject, default), what a library
call returns for the actual type (for example .lean() on a Mongoose
Map), which scope a request resolves to and from where. Each row says
what is assumed and how it was checked (file:line of the definition,
--help output, the vendor's docs). Checks are read-only: read the
source, read docs, and run --help only on installed third-party CLIs,
never on the repo's own scripts. Name a credential by its identifier,
never by opening its store. A behaviour that reading cannot settle, and
anything that would call a live service, touch data, or need a
credential, is marked UNVERIFIED rather than probed, unless the user
approves that specific call (propose it in OWNER QUESTIONS: what it
runs, what it imports, what it can reach). The table is a set of
assertions for Codex to attack, not facts it inherits.
OWNER QUESTIONS. If the plan touches something a specific person
is accountable for (see "A human who owns the resource", below), list
each question for them, with the safe default the plan uses until it is
answered, and mark each LOAD-BEARING (the answer could change scope,
privilege, credentials, retention or behaviour) or not. Give the list to
the user before round 0; they send it, or name the channel Claude may send
it through. Round 1 waits for the LOAD-BEARING answers unless the user
says to proceed on the defaults (a wait is a pause: run.md, "Pausing");
the others run alongside the rounds. None: write
"OWNER QUESTIONS: none".
1b. Round 0: claims pass. Run the Codex probe (codex.md). Freeze
attempt 0 exactly as step 2 says (same snapshot command, secret scan
and checks), fill plan-round0.md with the snapshot's path into
<run folder>/a0-codex-claims.prompt.md, and launch it with codex.md's
prompted form, <dir> = <repo root>, <name> = a0-codex-claims.
Valid per step 2 (receipt PLAN: <snapshot first line>, only verdict
CLAIMS-CHECKED). Fix every WRONG row, add every missing row, then
draft the approach. Round 0 does not count toward the cap and needs no
sign-off.
Critique gate: two passes per round, in parallel, in the background. One critic times two lenses.
Freeze the version. git -C "<repo root>" rev-parse HEAD must
still equal <base>; if not, the code moved: update the plan's base,
re-check the claims it touches, and treat it as a new version.
git -c core.fsmonitor=false -C "<repo root>" status --porcelain must
print nothing, so Codex reads exactly <base>. On a dirty tree, stop
and ask the user to commit the work the plan builds on (or to approve the
exact files Claude may commit), then use that commit as <base>; never
commit or stash it unasked. Nobody edits the repo while a round runs.
Then write the snapshot in one command:
cd "<run folder>" && umask 077 && { printf '# %s (v%s, attempt %s, nonce %s)\n' "<title>" "<V>" "<K>" "$(openssl rand -hex 4)"; tail -n +2 plan.md; } > "plan-v<V>-a<K>.md" && chmod 444 "plan-v<V>-a<K>.md" && head -1 "plan-v<V>-a<K>.md" && shasum -a 256 "plan-v<V>-a<K>.md"
PowerShell (untested):
Set-Location '<run folder>'; $nonce = -join (1..4 | ForEach-Object { '{0:x2}' -f (Get-Random -Maximum 256) }); $out = 'plan-v<V>-a<K>.md'; @("# <title> (v<V>, attempt <K>, nonce $nonce)") + @(Get-Content plan.md | Select-Object -Skip 1) | Set-Content $out; Set-ItemProperty $out -Name IsReadOnly -Value $true; Get-Content $out -TotalCount 1; (Get-FileHash -Algorithm SHA256 $out).Hash
Record the printed first line and sha256. <K> goes up by one at every
freeze and is never reused. The cap counts complete rounds only; "round
2" below means the second complete round. Every prompt names the
snapshot, never the live plan.md. Secret-scan the snapshot (run.md)
before any pass starts.
Assemble each prompt in this order (a<K>-codex-A, a<K>-codex-B):
plan-preamble-codex.md;plan-lens-a.md or plan-lens-b.md;plan-ledger-appendix.md, filled;sr-codex.md (built once per run, egress.md: only a
list the user has named, minus entries that concern only Gemini's
CLI, since this run sends work to OpenAI only; empty with no list);plan-lens-a-close.md or plan-lens-b-close.md,
filled. Nothing comes after it.Write parts 1 to 3 as a<K>-codex-<lens>.head.md and part 5 as
a<K>-<lens>.close.md with the Write tool, then join, for example:
cd "<run folder>" && umask 077 && cat a<K>-codex-B.head.md sr-codex.md a<K>-B.close.md > a<K>-codex-B.prompt.md && { grep -c '<FILL:' a<K>-codex-B.prompt.md || true; }
(Lens A joins head and close only.) It must print 0. Launch both
passes, each as a Bash call with run_in_background: true, noting each
task id:
cd "<repo root>" && umask 077 && codex exec --ephemeral --ignore-user-config -s read-only -c model_reasoning_effort="high" -o "<run folder>/a<K>-codex-<lens>.out" - < "<run folder>/a<K>-codex-<lens>.prompt.md" > "<run folder>/a<K>-codex-<lens>.log" 2>&1
A pass is valid only if its output is non-empty, its first line is
PLAN: <snapshot first line> with this attempt's nonce, it has exactly
one Verdict: <v> line with <v> from its lens's vocabulary, and its
log has no fatal diagnostic (codex.md). Anything else is a failed pass,
whatever the exit code. After both return, recompute the snapshot's
sha256, HEAD and the clean-tree check: if any changed, the round is
void, not retried; freeze a new version and start again. A pass still
running at 30 minutes is stopped per run.md and counts as failed.
Two lenses, not one prompt. Lens A asks whether the plan is right; Lens B asks whether you would let it run. They surface different defect classes, and a plan can pass A completely while failing B in ways that damage production.
From round 2 the ledger appendix carries the compact ledger and this version's change log. The appended text never tells Codex how to label or grade a specific point ("mark it OWNER-DECISION", "do not repeat this argument"): that is a rebuttal, and goes in the ledger as one, with its evidence.
The executable-claim check in Lens A is the highest-value single rule. A plan that says "inject the credentials at call time" against a function whose signature takes no credentials cannot run, and that is invisible to anyone reading only the plan's prose.
Merge and adjudicate. Merge both lenses into one points ledger,
<run folder>/ledger.md (ID, lens, severity, the point, its
disposition), then:
-PENDING-OWNER verdict that rested on it, is written
into the plan and its change log, and goes to Codex, both lenses, as a
normal full-plan round: a new snapshot, the full prompts, the
ledger appendix. That round is the single allowed exception to the
3-round cap. It does not reopen closed points (Codex may still raise a
new point anywhere, including one the ruling's edits cause). Each such
ruling gets exactly one ruling round; what it leaves open goes to
the user as named decision points, as at the cap. This holds even when
the loop had already stopped. Approval never happens with a ruling
Codex has not seen.FIX-UNVERIFIED, so Codex knows where to look.⚠️ One critic means no cross-model agreement to lean on. Agreement across the two lenses is the strongest signal this skill can give. Silence from both lenses on a whole category means nobody asked about it, never "no problems there". When the plan is high-stakes, offer the user /tri-plan instead (tiers.md).
Converge: Codex signs off on the FINAL plan, on BOTH lenses. Every
round sends the full revised plan (a new snapshot) with changes in the
change log and the ledger attached, never just the changes: an
amendment can break something elsewhere. Repeat until Codex returns
SOUND and AUTHORIZE (or the -PENDING-OWNER forms), up to 3
complete rounds, plus any ruling rounds (step 3). Both lenses run
every round.
UNREVIEWED in what
the user sees, and the plan is never described as signed off while any
exists. Whether to spend a further round on it is the user's call.User approval. Present the converged plan with: what Codex changed;
a per-round table of open BLOCKER and SHOULD counts per lens, with the
verdicts, marking incomplete rounds, ruling rounds and round 0; the
total Codex calls and elapsed time; every SHOULD still open, with its
risk; every OWNER-DECISION with its default, Codex's safety judgement
and the user's ruling or "not yet ruled"; every UNREVIEWED change and
FIX-UNVERIFIED entry; every [disputed] point. Run the gate check again
first (gate.md). Approval comes before any code, and not while an
OWNER-DECISION or a resource owner's gate is open, nor while a ruling
that differs from a reviewed default lacks its ruling round (step 3).
Implement. Claude writes the code (Claude holds the MCP tools, memory and the repo's rules). Codex does not edit the working tree; two writers on one tree cause conflicts.
Close with /dual-review, before any PR, MR or merge. Save the approved
plan in full first: cd "<run folder>" && umask 077 && cp plan.md plan-approved.md.
Invoke /dual-review on the finished diff and give it the absolute path
of plan-approved.md, so it adds the plan-trace pass (4d): the closing
review checks the diff does what was approved, nothing more, nothing
missing. If implementation will outlive this session, pause the run
with the approved plan (run.md, "Pausing") and hand that copy's path to
the closing review instead. The PR or MR description gets a summary of the
approved plan, not the claims table or the critiques.
When the run ends for any reason: cleanup per run.md (including any
co-coder worktree), delete any paused copy, and, only if the user named
a run-log file, append its line (run.md): rounds complete and incomplete, Codex calls and wall-clock
minutes per pass, the final verdict per lens, open-point counts per
round. When /dual-review or production later finds a defect the plan
stage should have caught, log it credited to the lens that raised it,
or MISSED-BY-ALL.
If the plan touches something a specific person is accountable for (the
production database, the deploy pipeline, the cloud account), route it past
that person before round 1, through step 1's OWNER QUESTIONS, not
after. They ask a different question, because they are the one who gets
paged, and their review lands the operational blockers (enforced privilege,
egress exposure, retention) that correctness review does not reach.
Treat their sign-off as a gate, not a data point, and give them the same Lens B checklist so the ask is concrete.
If such a reviewer requires a change that contradicts the written spec or brief, do not silently pick a side: revise the plan to the safer, more reversible option, define exactly one behaviour so an unattended run is never ambiguous, and escalate the conflict to whoever owns the brief. Nothing is implemented until the user approves the revised plan (step 5).
A plan is not an implementation. When the deliverable is scripts, a runbook, or config that will run later, say plainly what remains unverifiable until it exists, and gate the real run behind a bounded dry run against the actual scripts rather than another document round.
Execute state-machine logic instead of reasoning about it. For supervisors, retry, cleanup and timeout handling and exit-code contracts, write the truth table and run it in that dry run (or earlier, as a script the user approved under step 1): such bugs have passed several model reviews and surfaced only when the code ran (WHY.md).
For a large feature with a cleanly separable piece, Codex can implement
that piece itself in an ISOLATED git worktree. Write the subtask spec to
<run folder>/cocoder-spec.md with the Write tool first (never inline in
double quotes), secret-scan it (run.md), then, each line its own Bash
call, with literal paths:
cd "<repo root>" && umask 077 && git -C "<repo root>" worktree add "<run folder>/wt" HEAD
cd "<run folder>/wt" && umask 077 && codex exec --ephemeral --ignore-user-config --sandbox workspace-write -c model_reasoning_effort="high" -o "<run folder>/cocoder.out" - < "<run folder>/cocoder-spec.md" > "<run folder>/cocoder.log" 2>&1
Run the second in the background with the same 30-minute stop and
validity rules as any Codex pass (codex.md). Then Claude reviews Codex's
diff (git -C "<run folder>/wt" diff), applies the accepted changes onto
the branch the feature started on (not the trunk), /dual-review still
gates the combined result, and cleanup (run.md) removes the worktree.
Never point a write-enabled Codex at the user's primary working tree.
-s read-only; only the co-coder flow uses
--sandbox workspace-write, and only in a worktree.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
multi-model, codex, feature-planning, code-review, crosscheck
npx claudepluginhub sameerkhan/model-crosscheck --plugin crosscheck7 skills in this plugin
/dual-reviewDual 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 reviews the same pinned diff, then both are verified and merged into one consolidated report. Use when the user says "dual review", "review with both", "Claude + ChatGPT review", or before a merge when they want two independent reviewers./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