From grok
Internal helper contract for calling the grok-companion runtime from Claude Code. Reference when invoking the Grok companion script directly.
How this skill is triggered — by the user, by Claude, or both
Slash command
/grok:grok-runtimeThe summary Claude sees in its skill listing — used to decide when to auto-load this 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.
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]
| 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 | read_file, grep, list_dir, web_search, web_fetch |
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 | web_search, web_fetch, read_file, grep, list_dir |
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 |
--json to any command for machine-readable output.grok -p is { text, stopReason, sessionId, requestId, thought }.-s <id> creates-or-resumes, -r <id> resumes (errors if missing), -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).npx claudepluginhub vasihemanth/grok-build-plugin --plugin grokDelegates implementation tasks to xAI's Grok Build CLI headlessly while the orchestrating agent plans, writes specs, reviews diffs, and owns results.
Internal forwarder-contract skill for delegating tasks to the pi-companion runtime. Used by the pi:pi-companion-forwarder subagent to invoke exactly one `task` call per rescue handoff.
Launches git worktrees with tmux background sessions running Claude Code agents for non-blocking execution of large multi-step coding tasks like major refactors or new services.