---
name: ask-grok
description: Consult Grok via `grok -p` shell-out for a single-turn second opinion, then synthesize Grok's response into Claude's answer with attribution. Use when the user explicitly asks for Grok's view ("ask grok", "consult grok", "grok 怎么说", "double check with grok", "另一个 AI 怎么看", "second opinion"), or when Claude judges that Grok adds value Claude alone can't or won't provide — current events, X/Twitter data, niche knowledge in Grok's training, areas Claude tends to hedge or refuse, important cross-checks against Claude's blind spots.
---

# ask-grok

Consult Grok inline using `grok -p`. No second terminal, no file shuffle. Grok's response gets integrated into Claude's next message with explicit attribution.

## Mental model

Grok runs as a local CLI (`grok` in `$PATH`, headless mode via `-p / --single`). One call takes a prompt, returns the response on stdout, exits. Cost is a few cents of xAI tokens per call.

Grok and Claude have **complementary** weaknesses:
- Claude hedges, refuses, dresses uncertainty as politeness, has a knowledge cutoff.
- Grok agrees too much, jumps reasoning steps, but knows more recent things and is willing to commit on more topics.

`ask-grok` exploits this asymmetry: Claude shell-outs when the question is in Grok's strong zone or Claude's weak zone.

## When to invoke

**Trigger explicitly when user says**:
- "ask grok", "consult grok", "grok 怎么说"
- "second opinion", "double check", "另一个 AI 怎么看"
- "让 grok 也说一下"

**Trigger proactively (without user asking) when**:
- Question is about recent events, X/Twitter, very current code patterns/libraries/releases
- Claude is about to hedge heavily on a factual question — call Grok for a direct view first
- Important judgment where two-AI cross-check materially reduces risk (e.g. "is this library production-ready", "is this safe to deploy")
- User asks about something in Grok's training but possibly outside Claude's (recent xAI/X-ecosystem stuff, specific real-time data)

**Do NOT invoke for**:
- Anything Claude can clearly answer alone (don't burn tokens for noise)
- Tasks that require Claude-specific tools (file ops in this session, MCP servers, etc.)
- Subjective questions where the user wants Claude's voice
- Questions where Grok would also lack info (other Anthropic internals, etc.)
- Every message — that's a tic, not a strategy

## How to call

```bash
grok -p "<prompt>"
```

Optional useful flags:
- `--output-format json` — structured response (if you'll parse it)
- `--no-subagents` — disable Grok spawning its own agents (default for simple consults)
- `--effort low` — cheaper/faster for trivial cross-checks
- `--disable-web-search` — if you don't want Grok to browse mid-response

## Prompt template

```
[Optional 1-sentence context: what the user asked, what Claude is considering]

请回答：<the actual question>

要求：
- 不要先夸用户或夸 Claude，直接进观点
- 控制在 N 字以内（200–500 typical）
- 每个事实点标注置信度 [高]/[中]/[低]
- 如果你不同意 Claude 的预设，直接说，不要绕
```

Adjust language to match user's. If user wrote English, prompt in English.

## Response integration

After Grok returns, **always** synthesize. Don't just relay.

```
🟦 Claude: <your view, with reasoning>
🟧 Grok 说: <compressed if long, but preserve key claims with confidence markers>
🟩 合议:
  - 收敛: <where you agree, single line each>
  - 分歧: <where you differ — present both fairly, then your call>
  - 给用户的建议: <one or two actionable bullets>
```

If responses are short, you can inline:
```
> Claude+Grok 一致：建议 X 因为 Y。Grok 加了一点你没提的：Z [中]。
```

## Examples

### Example 1 — Explicit ask

```
User: 这个 Bun runtime 现在能上生产了吗？让 grok 也说一下。

Claude action:
  grok -p "Bun runtime 现在（2026 年 5 月）能上生产环境吗？关注：稳定性、生态、与 Node 兼容性。300 字内，带 [高/中/低] 置信度。不要谄媚。"

Claude output to user:
  🟦 Claude: 截至我的训练，Bun 1.x 稳定但 npm 兼容性仍有边角。生产建议
            选择性使用（脚本/工具链 OK，关键服务谨慎）。
  🟧 Grok: <Grok 的最新视角>
  🟩 合议: ...
```

### Example 2 — Proactive cross-check

```
User: 我想用 X 库做支付。

Claude internal: 这是高风险决策，应主动 cross-check Grok 有没有听说近期问题。

Claude action:
  grok -p "X 库近期（最近 3 个月）有没有 critical bug、安全 issue、维护中断的报告？简短回。"

Claude output:
  在动手之前我让 grok 帮我查了下 X 的近期状况：<grok 反馈>。
  结合我对 X 设计的理解，建议 ...
```

### Example 3 — Hedging escape

```
User: GPT-5 什么时候发？

Claude internal: 我会忍不住说 "I'm not sure, you should check OpenAI's blog"。
                 直接问 grok 拿当下的最佳估计。

Claude action:
  grok -p "GPT-5 发布时间最新消息？[高/中/低] 置信度，直接给数字范围。"

Claude output:
  我自己的训练里没有发布信息。grok 当下的读数：<grok 回复>。
  我对这个结论的二次判断：<sanity check + 不确定性>。
```

## Anti-patterns

- **Calling Grok on every message** — wastes tokens, slows replies. Only when Grok adds something.
- **Showing Grok's raw output without synthesis** — the user came to Claude. Relay is laziness.
- **Hiding that you consulted Grok** — always attribute. Trust requires sourcing.
- **Treating Grok's response as authoritative** — Grok hallucinates too. Sanity-check.
- **Long grok prompts** — Grok also context-rots. Keep prompts ≤ ~500 chars typically.
- **Calling grok then ignoring its disagreement** — if Grok pushes back, take it seriously, don't paper over.

## Edge cases

- **`grok` not in PATH**: tell user, fall back to Claude-alone answer with a note.
- **Auth error / quota exceeded**: same. Don't retry silently.
- **Grok returns empty / errors mid-stream**: give Claude's answer alone, note "tried Grok, got no usable response."
- **Grok contradicts a fact Claude is highly confident about**: present both, mark the conflict, lean toward Claude's read with reasoning shown.
- **Grok takes > 30s**: probably stuck. Use Bash timeout flag (e.g. `timeout 30s grok -p "..."` or set Bash tool timeout). Abort and proceed without.
- **Grok output contains `[ERROR] ... Auth(AuthorizationRequired)` in stderr**: usually a telemetry warning, ignore if stdout has real content. Verify by checking the actual response body.

## When to escalate from `ask-grok` to `grok-debate`

If a single consult isn't enough — the user wants to see contention play out, the disagreement is genuinely substantive, or they want an archived trace — suggest switching to `/debate <topic>` (the `grok-debate` skill). Don't try to multi-round inside `ask-grok` — that's what `grok-debate` is for.
