From review-negotiator
Get Codex's opinion via the negotiator MCP server: either a full structured Claude<->Codex negotiation to convergence on a code change or plan (negotiate mode), or a quick single-shot second opinion / sanity check on an approach, plan, or claim (advise mode). Use when the user asks for a Codex review, a second opinion from Codex, to ask Codex what it thinks, or to get Codex and Claude to agree on something. Do not use proactively without an explicit user request.
How this skill is triggered — by the user, by Claude, or both
Slash command
/review-negotiator:negotiated-reviewThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are the proposer. The `negotiator` MCP server holds the shared scratchpad and
You are the proposer. The negotiator MCP server holds the shared scratchpad and
enforces the negotiation state machine; Codex (via its own negotiation-reviewer
skill) is the reviewer. Tools: mcp__negotiator__start_session,
mcp__negotiator__get_session, mcp__negotiator__post_message,
mcp__negotiator__close_session.
Never fire this proactively. Only run it when the user explicitly asks for a
Codex review, a second opinion, to negotiate, or similar — in natural language or
via /review-negotiator:negotiate / /review-negotiator:consult. A full
negotiation costs several multi-minute Codex runs; don't spend that budget
without being asked.
node "${CLAUDE_PLUGIN_ROOT}/scripts/ensure-daemon.mjs"
If this fails, tell the user plainly and point them at /review-negotiator:setup.
Do not try to work around a dead daemon yourself.
kind: "code" — there's a real diff to review. Get repo_root from
git rev-parse --show-toplevel. Get base_ref: use what the user specified,
else the merge-base with the repo's default branch; if there's no committed
base worth diffing against, omit base_ref and let Codex review the working
tree as-is. Do not paste the diff into opening_position — Codex reads the
live repo itself (read-only), which is what lets later rounds re-review your
fixes without you re-sending anything.kind: "plan" — the unit under review is design/plan text, not a diff.
Source it, in priority order: the plan file just produced in plan mode, a
document the user points at, or the decision as stated in conversation. Put
the text in artifact.plan_markdown; still include repo_root so Codex can
check claims about the codebase against the real thing.mode: "negotiate" (default) for a full review-to-convergence.
mode: "advise" for a quick single-shot second opinion — including right
before or after a planning discussion, when the user wants a sanity check on a
direction before committing to it. This is the closest equivalent to this
session's own advisor() tool, but Codex composes its own context from the
repo rather than receiving your full transcript — so give it a clear,
self-contained question in opening_position plus whatever context it can't
get by reading the repo itself.opening_position: your actual case — what changed/was decided and why, plus an
explicit defense of any contestable choices. If the user gave focus text, fold it
in.
Call mcp__negotiator__start_session with these fields (max_rounds optional,
defaults to 4).
If plan mode is currently active, stop here and say so. Plan mode hard-blocks
MCP tool calls and Bash at the harness level (confirmed by testing, not just a
convention) — start_session, codex-turn.mjs, everything in this skill will
fail or simply not execute. Tell the user plainly that a Codex consult/negotiate
requires exiting plan mode first (or waiting until the plan is approved), rather
than attempting it and producing a confusing partial failure.
node "${CLAUDE_PLUGIN_ROOT}/scripts/codex-turn.mjs" <session_id>
Run this via Bash with run_in_background: true — a real Codex review on a
substantial diff can run well past the 10-minute foreground command budget, and
backgrounding is the only way to survive that inside a live interactive session.
Wait for it to finish before proceeding (you'll get a completion notification;
don't poll aggressively).
Known limitation: this only works in a live interactive Claude Code session.
In a one-shot headless invocation (e.g. claude -p), there is no later turn for
the completion notification to land in, so the loop will not continue past the
first backgrounded call. This is a limitation of one-shot invocation, not of the
negotiation itself — the protocol and tool sequence have been verified to
correctly drive a session to convergence when run to completion.
If the script exits non-zero: it means the reviewer turn genuinely failed (Codex never posted, even after its own internal retry). Report the failure plainly — do not fabricate a review yourself and do not silently retry in a loop.
Call mcp__negotiator__get_session and branch on status:
advised — relay Codex's opinion to the user in your own words, citing
the specifics it raised. If it surfaced something worth pushing back on or
negotiating further, say so and offer to promote: call
mcp__negotiator__post_message with role: "proposer" and a disposition
(this converts the session to negotiate mode) if the user wants to continue,
otherwise stop here — a single opinion was all that was asked for.agreed — report the outcome: Codex's final verdict and a short summary of
how the negotiation got there (what changed between rounds, if anything).deadlocked — present both final positions to the user verbatim (your
last message and Codex's last message). Make no further edits on your own
initiative. A real, reported disagreement is a valid outcome here — do not
keep negotiating past the round cap and do not unilaterally decide who was
right.awaiting_proposer — Codex responded with request_changes. Evaluate
each point on its merits:
mcp__negotiator__post_message with role: "proposer", your
body, and a disposition (revised, pushback, or mixed if some points
were fixed and some pushed back on). Loop to step 2.If post_message or start_session return a tool error (structured JSON with
error/message/currentStatus), that means the session state machine
rejected the call — read currentStatus and re-fetch via get_session before
retrying; don't just retry blindly.
npx claudepluginhub thomast8/review-negotiator --plugin review-negotiatorGuides collaborative design exploration before implementation: explores context, asks clarifying questions, proposes approaches, and writes a design doc for user approval.
Creates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.
Resolves in-progress git merge or rebase conflicts by analyzing history, understanding intent, and preserving both changes where possible. Runs automated checks after resolution.