analyze
Analyze recent runs - per-model latency, tokens, and verdict agreement - and suggest model/reasoning/fanout tuning. Advisory, read-only.
Get Grok (xAI) second opinion on a question or current work. Single-shot, advisory, no contamination.
> /plugin marketplace add antonbabenko/deliberation > /plugin install deliberation@antonbabenko-deliberation
How it fires
How this command gets triggered: by you, by Claude, or both.
/ask-grokContext preview
What this command does when you run it.
Get Grok (xAI) second opinion on a question or current work. Single-shot, advisory, no contamination.
name: ask-grok description: Get Grok (xAI) second opinion on a question or current work. Single-shot, advisory, no contamination. allowed-tools: mcp__deliberation-grok__grok, Read, Bash timeout: 660000
Single-shot delegation to Grok (xAI) via MCP for an independent second opinion. Fresh thread, no shared context with prior calls. Advisory only - the Grok bridge talks to the xAI HTTP API and has no filesystem access, so it cannot implement changes (unlike `/ask-gemini`, which can - `/ask-gpt` is advisory-only too). Model defaults to `GROK_DEFAULT_MODEL` (or `grok-4.6`). The bridge tells the model it has no tools and no further turns, and a reply that only announces intent ("I'll verify the cited files...") or is shorter than `GROK_MIN_ANSWER_CHARS` (default 1, so only an empty body) comes back as `errorKind: "empty"` (retryable) instead of a stub answer.
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. **Call Grok** - single-shot, advisory:
mcp__deliberation-grok__grok({
prompt: "[7-section delegation prompt]",
"developer-instructions": "[contents of expert prompt file]",
sandbox: "read-only",
cwd: "[repo root]",
roots: ["[absolute repo root]"], // optional; falls back to [cwd]
files: [{ path: "path/relative/to/root" }] // attach referenced local files by default
})**Files:** attach the local files Grok should read by default in `files`. Each entry is EXACTLY ONE of `{ path }` (local file; delivery controlled by `mode` — default uploads to the xAI Files API), `{ file_id }` (already uploaded), `{ file_url }` (public URL), or `{ dir, include?, exclude?, excludeReset?, maxFiles?, maxBytes? }` (recursive directory expansion via the bundled glob walker; caller `exclude` is APPENDED to safe defaults that skip VCS, `node_modules`, `dist`/`build`/`out`, modern Node build dirs, Yarn Berry caches, lockfiles, Python venv/cache dirs, coverage, `target`/`vendor`, `.terraform`/`.terragrunt-cache`, plus security patterns (`*.tfstate*`, `.env*`, `.ssh/**`, SSH keypairs, `*.pem`/`*.key`). Set `excludeReset: true` to replace defaults entirely. Hard caps `maxFiles=50` / `maxBytes=128MB`). Path/dir entries also accept `mode: "auto" | "inline" | "upload"` (default `"upload"`): **`"inline"` embeds the file as `input_text` so Grok reads it line-by-line** (use this for source code review — `input_file` references are searchable, not always fully read); `"auto"` inlines text ≤ `GROK_INLINE_MAX_BYTES` (default 256 KB) and uploads the rest; `"upload"` always goes through the Files API. Resolution: `path` and `dir` resolve under `roots[]` (first-root-wins) or `cwd` if `roots` is omitted. Uploads are SHA-256 dedup-cached locally, so a second `/ask-grok` with the same files uploads nothing (inline files skip the cache entirely — they cost prompt tokens each call but are always fully read). Uploads auto-expire (default 7 days, `GROK_FILE_TTL_SECONDS`); prune with `/grok-files`. Full reference: `TECHNICAL.md` § "Grok files and cleanup".
**Grok context parity (CRITICAL):** Grok cannot list, glob, or walk the repo - it only sees what is in the `files` array. For any open-ended, repo-wide question ("improve this repo", "audit this code", "what are tradeoffs in our architecture"), Grok will otherwise answer from the prompt text alone and produce abstract, unciteable analysis. Whenever the prompt asks Grok to reason about the repo at all, ALWAYS attach an orientation bundle:
1. Pick 2-6 high-signal files: project `CLAUDE.md` / `AGENTS.md` / `README.md` (if present), top-level entrypoints (`main.tf`, `package.json`, `app.py`, `Cargo.toml`, `pyproject.toml`, etc.), and any module the question is clearly about. For a whole directory, prefer a `{ dir }` entry over enumerating files. 2. Pass them as `files: [{ path: "CLAUDE.md", mode: "auto" }, { path: "main.tf", mode: "auto" }, { dir: "src", include: ["**/*.ts"], mode: "auto" }, ...]` with `cwd` = repo root. `mode: "auto"` is strongly recommended for source-code review — it inlines text files so Grok reads them line-by-line instead of treating them as searchable attachments (the default `"upload"` matches the v2.0 behavior; explicitly say `"inline"` to force inline regardless of size). For cross-repo questions, pass `roots: [repoA, repoB]` and either relative paths (first root holding the file wins) or absolute paths (must resolve under one of the roots). With `roots` you NO LONGER need to put every attachment under
Get a second opinion in Claude Code from GPT, Gemini, and Grok - plus 400+ more models through OpenRouter, including Qwen, Kimi, and DeepSeek.
Repo: antonbabenko/deliberation
Analyze recent runs - per-model latency, tokens, and verdict agreement - and suggest model/reasoning/fanout tuning. Advisory, read-only.
Ask GPT, Gemini, Grok, and any configured OpenRouter models in parallel for independent second opinions, then synthesize and compare. Zero cross-contamination.
Get Gemini second opinion on a question or current work. Single-shot, advisory, no contamination. Model pinned per call.
Get GPT (Codex) 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.
Arbiter-mediated consensus - GPT + Gemini + Grok (plus any configured OpenRouter delegates) review while Claude commits a blind verdict, adjudicates, and…