/agents-bridge:pair-planning <task / idea to plan together>from agents-bridge
Starts a pair-planning session where Claude and Codex independently draft implementation plans, then cross-review through an open-point ledger until consensus. Produces one agreed plan without writing code.
Ships in agents-bridge. 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 frontier models plan the same task independently, then converge. You (Claude) hold the session context and orchestrate; Codex is the fresh pair of eyes. The deliverable is a single agreed plan — read-only, no implementation.
All Codex round-trips go through codex-run.ts, never codex directly:
"${CLAUDE_PLUGIN_ROOT}/scripts/codex-run.ts" start <dir> --prompt-file <dir>/prompt-r0.md --role audit --wait 0 # start the session
"${CLAUDE_PLUGIN_ROOT}/scripts/codex-run.ts" wait <dir> # collect a running round
"${CLAUDE_PLUGIN_ROOT}/scripts/codex-run.ts" resume <dir> --prompt-file <dir>/prompt-r<n>.md # continue the thread
Run each codex-run.ts command alone, as written: a ;, && or echo $? added to it asks for permission, and the envelope's status already gives the exit code.
It runs Codex read-only on one thread, replays the first round's model and
effort on every resume, prints Codex's reply after a --- final message ---
line, and keeps each round under <dir>/turn-<n>/ (round r0 is turn-1). Role
audit runs at xhigh; pass --effort high to a resume when a round is
light, or --effort max for a genuinely hard one. Planning is
reasoning-heavy — don't downgrade the model tier.
Exit codes: 0 reply ready, 10 Codex still working (run wait <dir> again),
1 failed (report the envelope's error), 2 usage error.
Action 0, the moment you're invoked — get Codex planning before you do, so the two plans are written in parallel and neither side anchors on the other.
"${CLAUDE_PLUGIN_ROOT}/scripts/codex-run.ts" new pair-planning
Use the printed path literally wherever <dir> appears below — shell
variables do not survive between Bash calls.AskUserQuestion only when a genuine blocker would make
the two sides plan different tasks — ambiguous objective/scope, or an
irreversible high-stakes direction. Never run an upfront questionnaire.
(Judgment, not a rigid gate.)<dir>/task.md: the user's task verbatim, needed
repo context, and a short Assumptions block (scope, constraints, out of
scope). Both sides plan from this identical brief, so interpretation gaps
cannot resurface later as phantom OPEN-points.<dir>/prompt-r0.md: tell it to read
<dir>/task.md, inspect the repo read-only, and produce its own
independent implementation plan (files to touch, approach, risks).
Anti-anchoring: round 0 points at task.md only — never reference your plan
here; it does not exist for Codex yet.--wait 0 returns at once
while Codex plans:
"${CLAUDE_PLUGIN_ROOT}/scripts/codex-run.ts" start <dir> --prompt-file <dir>/prompt-r0.md --role audit --wait 0
While Codex plans, write your own plan — and do not read its output until yours is on disk, so neither side anchors on the other:
<dir>/claude-plan-r0.md — concrete,
grounded in the actual repo (files, patterns, reuse). Your real plan, not a
placeholder.wait <dir>, repeated while it exits 10. Its
plan is the text after --- final message --- (also in
<dir>/turn-1/final.md). Exit 1 means the round failed: surface the
envelope's error. Never fabricate Codex's side.Compare the two r0 plans. Write <dir>/ledger.md capturing only the
divergences as stable IDs — this ledger, not prose, is the source of truth for
consensus:
OPEN-1 | <topic> | claude: <position> | codex: <position> | status: OPEN
OPEN-2 | ...
Seed a running unified draft <dir>/consensus-plan.md with the points both sides
already agree on. If the two plans agree on everything, the ledger is empty → skip
to step 6.
Codex keeps session memory across resumes and can read <dir> read-only —
point it at the files instead of pasting copies (pasted text goes stale the
moment you edit). Never resend transcripts.
Each round n, write <dir>/prompt-r<n>.md with only:
<dir>/ledger.md (open points), <dir>/consensus-plan.md
(current unified draft), and — from round 1 onward —
<dir>/claude-plan-r0.md (your original plan). Tell Codex to re-read each
before responding.For each OPEN-id:
AGREEorCOUNTER: <reason>. Raise any new blocker asNEW: <issue>. End with exactly one line:VERDICT: CONVERGEDorVERDICT: OPEN: <comma-separated remaining IDs>.
Resume the thread and read Codex's reply from the output:
"${CLAUDE_PLUGIN_ROOT}/scripts/codex-run.ts" resume <dir> --prompt-file <dir>/prompt-r<n>.md
Then you adjudicate each item (accept good points, push back on weak ones
with reasons — treat Codex's claims as hypotheses, not commands). Update
ledger.md (resolve / add IDs) and consensus-plan.md in place; Codex reads the
fresh versions next round.
VERDICT: CONVERGED
and you concur. Stop and go to step 6.VERDICT: line counts as OPEN, never as converged — carry the unresolved
IDs forward.For each remaining disagreement, use AskUserQuestion — one decision per open ID, stating your position, Codex's position, and the crux. Apply the user's rulings to the plan and close those IDs.
Finalise <dir>/consensus-plan.md in an implementation-ready shape — ordered
steps, the exact files each step touches, and how to validate each — then present it
inline and announce its path.
Stop here. This skill plans; it does not implement — not even an obvious
step. Offer the handoff explicitly and wait for the user's choice: implement now,
hand to writing-plans for a task-by-task plan, or cross-check with the
critique skill.
xhigh; lean on session
memory and file refs, never resend transcripts.wait <dir> collects it.error; do not silently retry or
fabricate Codex's side.rm -rf session dirs.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
6 skills in this plugin
/adversarial-reviewAdversarial review by Codex (OpenAI) of local git changes, either the uncommitted work or the current branch against a base ref, with optional focus text. Codex runs read-only; each finding names a file, a line range and a concrete fix, and the review ends with a SHIP or NO-SHIP verdict. Use when the user asks Codex to review, challenge or attack their uncommitted changes, their diff or their branch before shipping./codexInvoke the OpenAI Codex CLI for cross-model collaboration, a second opinion, or delegated work. Use when the user asks Codex to review, debug, explain, plan or implement something, or names a Codex model./codex-orchestrateOther plugins' skills for the same job
npx claudepluginhub bengous/claude-code-plugins --plugin agents-bridge