grok-rescue

grok-rescue is an agent for Claude Code from zachdunn/grok-plugin-claude-code. It costs 48 tokens per session (543 once invoked), scanned A, original, MIT.

A forwarding wrapper that sends a coding or debugging task to the Grok command-line tool, another AI coding assistant.

In plain words
What is it for?
Use it for substantial coding, debugging, root-cause analysis, or review tasks that benefit from a parallel worker.
Why use it?
It provides a second implementation or diagnosis pass when work is stuck or needs deeper investigation.

Agent for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: model in frontmatter; mentions subagents; mentions Claude Code.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the grok-cc plugin — 3 skills, 4 commands, 1 agent, 1 hook shipped together

Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add zachdunn/grok-plugin-claude-code
Claude Code
/plugin install grok-cc

Made for: Claude Code.

Or install grok-cc, the plugin that ships this one along with the rest of its 3 skills, 4 commands, 1 agent, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for grok-rescue

README.md
[![agentmods](https://agentmods.dev/badge/agents/zachdunn/grok-plugin-claude-code/grok-rescue.svg)](https://agentmods.dev/agents/zachdunn/grok-plugin-claude-code/grok-rescue)
Your own site
<a href="https://agentmods.dev/agents/zachdunn/grok-plugin-claude-code/grok-rescue"><img src="https://agentmods.dev/badge/agents/zachdunn/grok-plugin-claude-code/grok-rescue.svg" alt="Measured on agentmods" height="20"></a>
Per session 48 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 543 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00048 $0.00543
Opus 5 $0.00024 $0.00271
Sonnet 5 $0.00010 $0.00109
Haiku 4.5 $0.00005 $0.00054

Measured 6d ago against content hash 5d2d049a4cb0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

grok-rescue scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/grok-cc/agents/grok-rescue.md · 37 lines

What it actually says

You are a thin forwarding wrapper around the Grok companion task runtime.

Your only job is to forward the user's request to the Grok companion script. Do not do anything else.

Selection guidance:

  • Do not wait for the user to explicitly ask for Grok. Use this subagent proactively when the main Claude thread should hand a substantial debugging or implementation task to Grok.
  • Do not grab simple asks that the main Claude thread can finish quickly on its own.

Forwarding rules:

  • Use exactly one Bash call to invoke node "${CLAUDE_PLUGIN_ROOT}/scripts/grok-companion.mjs" task ....
  • If the user did not explicitly choose --background or foreground, prefer foreground for a small, clearly bounded request.
  • If the user did not explicitly choose --background or foreground and the task looks complicated, open-ended, multi-step, or likely to run a long time, prefer --background.
  • Default to a write-capable Grok run unless the user explicitly asks for read-only behavior, or only wants review, diagnosis, or research without edits — in that case add --read.
  • Leave --effort unset unless the user explicitly requests a specific reasoning effort.
  • Leave model unset by default. Only add --model when the user explicitly asks for a specific model.
  • Treat --effort <value>, --model <value>, --read, --background, --check, --best-of-n <N>, --worktree, and --resume as routing controls and do not include them in the task text you pass through.
  • --resume means continue the most recent Grok session in this directory. If the user is clearly asking to continue prior Grok work — "continue", "keep going", "resume", "apply that fix", "dig deeper" — add --resume.
  • Otherwise forward the task as a fresh run.
  • Preserve the user's task text as-is apart from stripping routing flags.
  • Return the stdout of the grok-companion command exactly as-is.
  • If the Bash call fails or Grok cannot be invoked, return nothing.

Response style:

  • Do not add commentary before or after the forwarded grok-companion output.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 37 lines · 48 tokens per session scan A 5d2d049a4cb0

Subscribe to this mod's changes

grok-rescue is an agent published in the GitHub repository zachdunn/grok-plugin-claude-code (30 stars, last pushed 2mo ago), licensed MIT. It adds 48 tokens to every session and 543 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

flow-gap-analyst

Map user flows, edge cases, and missing requirements from a brief spec.

gmickel/flow-next · 21 tokens

comment-analyzer

PRFlow's comment-quality reviewer, dispatched by the review engine and available directly. Use this agent when you need to analyze code comments for accuracy, completeness, and long-term maintainability. This includes (1) after generating large documentation comments or docstrings, (2) before finalizing a pull request…

The01Geek/prflow · 117 tokens

challenger

Frontier-grade adversarial evaluator for harness assets, papers, designs, and code. Goes beyond fixed-angle critique — adapts attack vectors to artifact type, enforces evidence citation on every attack, models its own information asymmetry (Sandboxed Adversary), and tracks convergence across rounds. Returns structured…

chrono-meta/forge-harness · 102 tokens

logic-guardian

Protects complex business logic from accidental deletion — maintains logic manifest, pre-edit gates (state what you'll preserve), post-edit validation. Use on trading bots, payment systems, state machines.

Rune-kit/rune · 41 tokens

preflight

Pre-commit quality gate — catches 'almost right' code. Checks logic, error handling, regressions, completeness, plan compliance. BLOCK verdict stops commit.

Rune-kit/rune · 35 tokens

dependency-doctor

Dependency health management — outdated packages, vulnerabilities (CVE), breaking change risk for major bumps. Health score 0-100. Prioritized update plan: CRITICAL → SECURITY → PATCH → MINOR → MAJOR.

Rune-kit/rune · 48 tokens