/grok:grok-runtimefrom grok
Wraps the local Grok CLI for live search, code review, and task delegation from Claude Code. Use for real-time X/web search, second-opinion reviews, or offloading complex work to Grok.
Ships in grok. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The Grok plugin wraps the local grok CLI's headless mode (grok -p "<prompt>" --output-format json). Grok manages its own session store under ~/.grok/sessions, so the plugin does not run a separate server or broker.
Always invoke through the companion script so job tracking, prompt shaping, and tool filtering stay consistent:
node "${CLAUDE_PLUGIN_ROOT}/scripts/grok-companion.mjs" <subcommand> [flags] [text]
Or, for live search from any MCP-capable agent, call the grok_search tool (auto-wired when the plugin is installed; otherwise npx -y grok-build-x-search-mcp).
| Need | Prefer |
|---|---|
| Live X sentiment, breaking news, "what are people saying" | grok_search / /grok:search |
| Current package/version/docs facts beyond training cutoff | grok_search / /grok:search |
| Second opinion code review on a diff | /grok:review |
| Substantial implement/debug pass with write access | /grok:rescue or grok:grok-rescue subagent |
| Trivial local edit the host can do in one step | Do not delegate — handle inline |
| Subcommand | Purpose | Tool surface |
|---|---|---|
setup [--json] | Check install + login (no API call) | none |
review [--base <ref>] [--background] [--model <m>] [focus] | Read-only code review of a git diff | denylist of write/shell/MCP/media; --sandbox read-only |
task <text> [--background] [--resume-last|--fresh] [--read-only] [--model <m>] [--effort <low|medium|high>] | Delegate work; write-capable by default | full (or read-only with --read-only) |
search <query> [--background] [--model <m>] | Live X/web search | same safe profile as review (web tools kept) |
status [--job <id>] | List or show jobs | n/a |
result [--job <id>] | Final output + Grok session id | n/a |
cancel [--job <id>] | Cancel a running job | n/a |
On grok-cli 0.2.x, grok -p ... --tools <allowlist> often fails session creation when web tools or shell are involved (Requirements unsatisfied / run_terminal_cmd / auto_background_on_timeout). This plugin never uses --tools for search/review; it uses --disallowed-tools + --sandbox read-only + --no-subagents, and disables vendor MCP imports in the child env to prevent recursive grok_search fork-bombs.
--json to any command for machine-readable output.grok -p is { text, stopReason, sessionId, requestId, thought }.-s <id> creates a new session id, -r <id> resumes, -c continues most recent in cwd. The companion handles this via --resume-last.~/.grok/cc-plugin/jobs/; status/result read from there.grok models. Default is grok-build.GROK_BIN overrides the binary path; GROK_CC_STATE_DIR overrides the job state directory (used in tests).What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub vasihemanth/grok-build-plugin --plugin grokOther plugins' skills for the same job