A lightweight Claude Code plugin that lets you
delegate coding, debugging, and review tasks to the Grok CLI
— spawn a grok-rescue subagent or run /grok-cc:rescue <task> and Grok works the
problem as a parallel agent.
This is essentially a simple, unofficial reimplementation of OpenAI's
codex-plugin-cc— same shape (a thin forwarder subagent + slash commands + a companion runtime), pointed at the Grok CLI instead of Codex. It is intentionally leaner: it wraps Grok's one-shot headless mode rather than a long-running app-server, so there is no tracked-job registry / status / result / cancel surface.
| Component | What it does |
|---|---|
grok-rescue subagent |
Thin forwarder. Hand it a substantial task (via the Agent tool / @grok-rescue) and it delegates to Grok. |
/grok-cc:rescue <task> |
One-shot delegation with optional routing flags. |
/grok-cc:setup |
Verifies the Grok CLI is installed and signed in. |
grok-cli-runtime skill |
Reference for how the companion drives Grok. |
grok-companion.mjs |
The runtime that wraps grok -p --output-format json. |
- Grok CLI access. This plugin drives xAI's Grok CLI ("grok build"), which requires access — see x.ai/cli. Without it the plugin has nothing to delegate to.
- The
grokCLI on yourPATH(or at~/.grok/bin/grok; override with theGROK_BINenv var). - Signed in:
grok login. - Node (used to run the companion script).
Delegation sends your prompt and any code Grok reads to xAI's backend — the same external-service caveat as any cloud coding agent.
From within Claude Code:
/plugin marketplace add zachdunn/grok-plugin-claude-code
/plugin install grok-cc@grok-plugin-claude-code
Or with the CLI:
claude plugin marketplace add zachdunn/grok-plugin-claude-code
claude plugin install grok-cc@grok-plugin-claude-codeThen /grok-cc:setup to confirm Grok is ready.
/grok-cc:rescue fix the failing auth test in apps/api
/grok-cc:rescue --read why is the diorama pan jittery on tilt?
/grok-cc:rescue --background --effort high refactor the camera rig
Routing flags (stripped before the task text reaches Grok):
| Flag | Effect |
|---|---|
| (default) | write-capable run — Grok may edit files |
--read |
read-only (plan mode); reads and reasons, no edits |
--background |
spawn detached; returns a pid + log path |
--effort <level> |
low | medium | high | xhigh | max |
--model <id> |
pin a specific Grok model |
--cwd <path> |
working directory (default: current) |
--best-of-n <N> |
run N ways in parallel, keep the best |
--check |
append a self-verification pass |
--worktree [name] |
run inside a fresh git worktree |
--resume |
continue the most recent Grok session here |
.claude-plugin/marketplace.json # marketplace manifest
plugins/grok-cc/ # the plugin itself
.claude-plugin/plugin.json
agents/grok-rescue.md
commands/{setup,rescue}.md
skills/grok-cli-runtime/SKILL.md
scripts/grok-companion.mjs
MIT. Not affiliated with xAI or OpenAI.