Skip to content

Repository files navigation

Claude plugin for Grok Build

Use Claude Code from inside Grok Build for code reviews or to delegate tasks — the twin of codex-plugin-grok.

Transport: ordinary claude -p (subscription OAuth / Max included usage). Not the Claude Agent SDK, and not claude --bare by default.

What You Get

  • /claude:review — read-only review of local git state
  • /claude:adversarial-review — steerable challenge review
  • /claude:rescue — delegate investigate/fix via thin claude:claude-rescue forwarder
  • /claude:status / /claude:result / /claude:cancel — job control
  • /claude:setup — Claude install/auth check + optional stop review gate

Requirements

  • Grok Build with plugins enabled
  • Node.js 18.18+
  • Claude Code CLI (claude)
  • Claude Pro/Max (or Team/Enterprise) OAuth via claude auth login, or CLAUDE_CODE_OAUTH_TOKEN from claude setup-token

Warning: if ANTHROPIC_API_KEY is set, claude -p bills API pay-as-you-go even when Max login exists. The companion fails closed unless you pass --allow-api-key.

Install / update

From GitHub (recommended)

# 1) Add this repo as a Grok marketplace source (once)
grok plugin marketplace add https://github.com/opendream/claude-plugin-grok.git
# shorthand also works: grok plugin marketplace add opendream/claude-plugin-grok

# 2) Install + enable the plugin
grok plugin install claude --trust
grok plugin enable claude

Reload plugins (r in the Plugins tab) or start a new Grok session, then:

/claude:setup

Sign in to Claude Code if needed (claude auth login). You should then see /claude:* slash commands and the claude:claude-rescue subagent.

Update to latest GitHub main:

grok plugin update claude
# or full reinstall:
# grok plugin uninstall claude
# grok plugin install claude --trust

Editing a local git checkout alone does not refresh ~/.grok/installed-plugins — always update / reinstall after you push.

From a local clone (dev)

git clone https://github.com/opendream/claude-plugin-grok.git ~/Workspaces/claude-plugin-grok
grok plugin marketplace add ~/Workspaces/claude-plugin-grok
grok plugin install claude --trust
grok plugin enable claude

Or install the plugin path directly:

grok plugin install ~/Workspaces/claude-plugin-grok/plugins/claude --trust
grok plugin enable claude

Uninstall / remove marketplace

grok plugin uninstall claude
grok plugin marketplace remove claude-plugin-grok
# if you added via URL, confirm the source name with:
#   grok plugin marketplace list

Smoke check

/claude:setup
/claude:rescue say hi

Usage

/claude:review
/claude:review --base main --background
/claude:review --model fable --effort max
/claude:adversarial-review challenge the caching design
/claude:rescue investigate why tests started failing
/claude:rescue --resume apply the top fix
/claude:status
/claude:result
/claude:cancel task-abc123
# --model / --effort on review and adversarial-review match rescue

Cost / usage

  • Defaults: fable at max when --model / --effort are omitted. User flags still win.
  • Companion result --json may include Claude CLI-reported total_cost_usd and token fields. These are CLI-reported Max telemetry, not verified billed spend.

Known Issues

  • Mid-run status polling was not separately proven in the live smoke.
  • Cancel is best-effort for very-early cancel races.
  • Handoff model / effort may be null even when defaults or flags applied.

Reliability (near-term)

  • SessionEnd only removes/terminates jobs owned by the ending host session; foreign-session workers stay running.
  • /claude:result reconciles dead worker PIDs to a terminal failed/completed status before returning.

Orchestration contract (medium-term)

  • Handoff envelopes validate against plugins/claude/schemas/handoff-envelope.schema.json.
  • Versioned workflow contract: plugins/claude/workflow-contract.json with pinned workflow-contract.sha256.
  • /claude:result --json returns a schema-validated handoff envelope plus the contract SHA.
  • Stop-gate eval corpus: plugins/claude/eval/stop-gate-corpus.json with a false-approve rate metric.

Architecture

Grok Build
  → /claude:* commands + claude-rescue agent
  → claude-companion.mjs (jobs under GROK_PLUGIN_DATA)
  → child process: claude -p --model fable --effort max --output-format json ...

Development

cd ~/Workspaces/claude-plugin-grok
npm test
grok plugin validate ~/Workspaces/claude-plugin-grok/plugins/claude

Live smoke evidence: plugins/claude/eval/live-smoke.md (path coverage on a tiny fixture, not a soak).

License

Apache-2.0. Job-control utilities adapted from the Codex-for-Grok companion patterns; Claude transport is original to this repo. See LICENSE and NOTICE.

About

Grok Build plugin: claude-plugin-grok

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages