/ask-grok
Get Grok (xAI) second opinion on a question or current work. Single-shot, advisory, no contamination.
$ npx -y skills add antonbabenko/deliberation --agent claude-codeShips with deliberation. Installing the plugin gets this command.
How it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/ask-grok
Context 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.
Command definition
ask-grok.mdname: 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
Ask Grok
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-gpt` and `/ask-gemini`, which can). Model defaults to `GROK_DEFAULT_MODEL` (or `grok-4.5`).
Input
User question or topic: $ARGUMENTS
Workflow
1. **Identify expert** - match `$ARGUMENTS` against trigger patterns in `~/.claude/rules/deliberation/triggers.md`:
- Architecture / design / tradeoffs → Architect
- Plan validation → Plan Reviewer
- Requirements / scope → Scope Analyst
- Code review / find bugs → Code Reviewer
- Security / vulnerabilities → Security Analyst
- Default if unclear → Architect
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:
- Verbatim user question from `$ARGUMENTS`
- Relevant code snippets / file paths from current conversation context (attach local files Grok should read via `files` in step 4; inline small snippets directly)
- Any specific constraints user has mentioned this session
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 a single `cwd`. 3. Stay under 48 MB per file. `{ dir }` enforces its own `maxFiles` / `maxBytes` caps - raise them on the entry if the default is too tight, or narrow `include`. 4. State the attached set in the prompt so Grok knows what evidence it has ("Attached: CLAUDE.md, main.tf, ap
Read more
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
Ask Grok
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-gpt` and `/ask-gemini`, which can). Model defaults to `GROK_DEFAULT_MODEL` (or `grok-4.5`).
Input
User question or topic: $ARGUMENTS
Workflow
1. **Identify expert** - match `$ARGUMENTS` against trigger patterns in `~/.claude/rules/deliberation/triggers.md`:
- Architecture / design / tradeoffs → Architect
- Plan validation → Plan Reviewer
- Requirements / scope → Scope Analyst
- Code review / find bugs → Code Reviewer
- Security / vulnerabilities → Security Analyst
- Default if unclear → Architect
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:
- Verbatim user question from `$ARGUMENTS`
- Relevant code snippets / file paths from current conversation context (attach local files Grok should read via `files` in step 4; inline small snippets directly)
- Any specific constraints user has mentioned this session
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 a single `cwd`. 3. Stay under 48 MB per file. `{ dir }` enforces its own `maxFiles` / `maxBytes` caps - raise them on the entry if the default is too tight, or narrow `include`. 4. State the attached set in the prompt so Grok knows what evidence it has ("Attached: CLAUDE.md, main.tf, ap
Showing the first part of this file.
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
Other commands on deliberation.
- /analyze
Analyze recent runs - per-model latency, tokens, and verdict agreement - and suggest model/reasoning/fanout tuning. Advisory, read-only.
Open command - /ask-all
Ask GPT, Gemini, Grok, and any configured OpenRouter models in parallel for independent second opinions, then synthesize and compare. Zero cross-contamination.
Open command - /ask-gemini
Get Gemini second opinion on a question or current work. Single-shot, advisory, no contamination. Model pinned per call.
Open command - /ask-gpt
Get GPT (Codex) second opinion on a question or current work. Single-shot, advisory, no contamination.
Open command - /ask-openrouter
Ask a single configured OpenRouter model for a second opinion. Advisory only. Single-shot or multi-turn.
Open command - /consensus
Arbiter-mediated consensus - GPT + Gemini + Grok (plus any configured OpenRouter delegates) review while Claude commits a blind verdict, adjudicates, and synthesizes. Converges only with cross-model agreement. Driven by the consensus-step engine.
Open command

