analyze
CommandAnalyze recent runs - per-model latency, tokens, and verdict agreement - and suggest model/reasoning/fanout tuning. Advisory,…
Get GPT (Codex) second opinion on a question or current work. Single-shot, advisory, no contamination.
> /plugin marketplace add antonbabenko/deliberation> /plugin install deliberation@antonbabenko-deliberation
name: ask-gpt description: Get GPT (Codex) second opinion on a question or current work. Single-shot, advisory, no contamination. allowed-tools: mcp__deliberation__panel, mcp__deliberation__codex-login, AskUserQuestion, mcp__deliberation__ask-gpt, Read, Bash timeout: 660000
Single-shot delegation to GPT for an independent second opinion, through the unified `deliberation` MCP server (it spawns `codex exec` itself - codex-cli ships no MCP server of its own). Fresh call, no shared context with prior calls. Advisory: the run is pinned to Codex's read-only sandbox.
User question or topic: $ARGUMENTS
1. **Identify expert** - match `$ARGUMENTS` against trigger patterns in `~/.claude/rules/deliberation/triggers.md`:
2. **Read expert prompt** via this resolution sequence: 1. Glob `~/.claude/plugins/cache/*/deliberation/*/prompts/[expert].md`. Pick the match with the highest semver version segment (the segment immediately after `deliberation/`, parsed as semver - not lexical string compare). 2. If no match, look up the inlined fallback under the heading `## Inlined fallback - [Expert]` in this command file (see end of this file). 3. If neither found, abort with: `Error: deliberation plugin cache missing for expert "[Expert]". Run /plugin install deliberation or /reload-plugins.`
3. **Build 7-section delegation prompt** per `~/.claude/rules/deliberation/delegation-format.md`. Include:
4. **Log GPT in first.** Call `mcp__deliberation__panel({ cwd: "[cwd]" })` and read only its `needsLogin`. If it contains `codex`, GPT has no ChatGPT login on this machine yet: 1. Call `mcp__deliberation__codex-login({})` and print its `message` as-is EVERY time you call it (the link and the code each stay on their own line). Then act on `status`:
Three `starting` results in a row count as `failed`.
2. Ask the user with `AskUserQuestion` ("Approve the GPT login in the browser with the code above, then pick one"), options `Done - include GPT` and `Skip GPT this run`. A host without `AskUserQuestion` asks the same in one plain line and ends the turn; treat the user's reply as that choice. 3. `Skip`: stop and show the user why GPT cannot answer (no call is made). `Done`: call `codex-login` again, print its `message`, and act on `status` as in step 1, except `pending`: ask step 2 once more; if after that second `Done` it is still `pending`, stop and show the user why GPT cannot answer (no call is made) and say GPT answers from the next run once the login lands. Caps for the whole gate: at most 3 `starting` results in a row and at most 2 questions; past either, stop and show the user why GPT cannot answer (no call is made). `panel` only reads a flag; the login starts here, after the user asked for GPT, so the 15-minute code is spent on this run. Never drop codex silently because it looks logged out.
5. **Call GPT** - single-shot, advisory:
mcp__deliberation__ask-gpt({
prompt: "[7-section delegation prompt]",
developerInstructions: "[contents of expert prompt file]",
cwd: "[current working directory]"
})6. **Never pre-empt the call.** Do not skip step 5 because GPT looks logged out (no `auth.json`, `codex doctor` says so, a session-start hook said so): step 4 is the only credential check, and the call itself starts the device login when needed. Do not read credential files yourself. (`/deliberation:codex-login` does only the login, when the user wants it without a question.)
7. **Login link (fallback).** If the result is `errorKind: "auth"` and its `message` carries a link and a one-time code, GPT has no ChatGPT login on this machine yet and deliberation has started `codex login --device-auth`. Show that message to the user as-is (it is the user's action, not an expert answer), say GPT answers after they approve, and stop. Re-run the command once they confirm. A host that supports MCP elicitation shows the same link and code in a dialog during the call instead.
8. **Synthesize response** - never paste raw output. Extract:
Get a second opinion from GPT, Gemini, and Grok in Claude Code, Codex, Cursor, Kiro, Antigravity, OpenCode, or any other MCP host - plus local models (Ollama, LM Studio) and 400+ more models through OpenRouter, including Qwen, Kimi, and DeepSeek.
Analyze recent runs - per-model latency, tokens, and verdict agreement - and suggest model/reasoning/fanout tuning. Advisory,…
Ask GPT, Gemini, Grok, and any configured OpenRouter models in parallel for independent second opinions, then synthesize and…
Get Gemini second opinion on a question or current work. Single-shot, advisory, no contamination. Model pinned per call.
Get Grok (xAI) second opinion on a question or current work. Single-shot, advisory, no contamination.
Ask a single configured OpenRouter model for a second opinion. Advisory only. Single-shot or multi-turn.
Log GPT (Codex) in on this machine with a ChatGPT device login - shows a link and a one-time code. For remote or headless…
Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.