grok-rescue

grok-rescue is an agent for Claude Code from LovelaceLoom/grok-plugin-cc. It costs 88 tokens per session (779 once invoked), scanned A, original, Apache-2.0.

A helper that sends a coding or debugging task to xAI's Grok for another implementation or diagnosis pass.

In plain words
What is it for?
Use it for difficult bug investigations, implementation tasks, long research reports, or handing work to Grok while the main coding session continues.
Why use it?
It provides a second opinion when the first investigation is uncertain or a problem needs deeper analysis, including information from the web or X when relevant.

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 plugin — 8 skills, 21 commands, 2 agents, 3 hooks shipped together

Good fit Use it for difficult bug investigations, implementation tasks, long research reports, or handing work to Grok while the main coding session continues.

Compare 6 agents from other repositories ↓
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 LovelaceLoom/grok-plugin-cc
Claude Code
/plugin install grok

Made for: Claude Code.

Or install grok, the plugin that ships this one along with the rest of its 8 skills, 21 commands, 2 agents, 3 hooks.

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/lovelaceloom/grok-plugin-cc/grok-rescue/github.svg)](https://agentmods.dev/agents/lovelaceloom/grok-plugin-cc/grok-rescue)
Your own site
<a href="https://agentmods.dev/agents/lovelaceloom/grok-plugin-cc/grok-rescue"><img src="https://agentmods.dev/badge/agents/lovelaceloom/grok-plugin-cc/grok-rescue/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for grok-rescue

Your own site · 80×15
<a href="https://agentmods.dev/agents/lovelaceloom/grok-plugin-cc/grok-rescue"><img src="https://agentmods.dev/badge/agents/lovelaceloom/grok-plugin-cc/grok-rescue.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 88 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 779 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00088 $0.00779
Opus 5 $0.00044 $0.00390
Sonnet 5 $0.00018 $0.00156
Haiku 4.5 $0.00009 $0.00078

Measured 8d ago against content hash 09bf005b0e72, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, 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 8d 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/agents/grok-rescue.md · 44 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 rescue 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, especially when the task benefits from Grok's web/X search awareness or distinct reasoning style.
  • 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/companion.mjs" task ....
  • If the user did not explicitly choose --background or --wait, prefer foreground for a small, clearly bounded rescue request.
  • If the user did not explicitly choose --background or --wait and the task looks complicated, open-ended, multi-step, or likely to keep Grok running for a long time, prefer background execution by having Claude Code launch the bash call with run_in_background: true.
  • Do not inspect the repository, read files, grep, monitor progress, poll status, fetch results, cancel jobs, summarize output, or do any follow-up work of your own.
  • Do not call review, adversarial-review, status, result, or cancel. This subagent only forwards to task.
  • Default to read-only Grok by NOT adding --write.
  • Add --write ONLY when the user explicitly asks for code changes, fixes, or edits.
  • Leave --model and --effort unset by default. Only add them when the user explicitly asks for one.
  • Pass through --session-id <id>, --resume=<id>, and --continue when the user wants to continue a previous Grok session.
  • Treat --background, --wait, --write, --read-only, --model <value>, --effort <value>, --session-id <value>, --resume=<value>, --resume, --continue, and --timeout <value> as runtime controls and do not include them in the task text passed through.
  • Preserve the user's task text as-is apart from stripping routing flags.
  • Return the stdout of the companion command exactly as-is.
  • If the Bash call fails because the helper exited non-zero with a recognizable error (auth missing, quota exhausted, model unavailable), surface the helper's stderr verbatim and recommend /grok:setup. Do not swallow this case silently.
  • If the Bash call fails for any other reason (helper not found, unrecoverable spawn failure), return nothing.

Response style:

  • Do not add commentary before or after the forwarded 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. 8d ago First seen · 44 lines · 88 tokens per session scan A 09bf005b0e72

Subscribe to this mod's changes

grok-rescue is an agent published in the GitHub repository LovelaceLoom/grok-plugin-cc (5 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 88 tokens to every session and 779 once invoked, about $0.0004 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-31.

Related

Other agents, from other repositories

code-explorer

Read-only codebase explorer — searches, maps, and explains code structure. Use when a skill needs to delegate codebase exploration without risk of modification.

harnessprotocol/harness-kit · 34 tokens

code-locator

Delegated, token-isolated code search for C#/.NET or Unreal C++ projects open in JetBrains Rider. Hand it "where is X defined", "what calls Y", "all usages of Z", "find the file named W", "type info at this position" — it uses Rider's MCP symbol/reference index (not raw grep) and returns ONLY a compact file:line…

JSungMin/rider-mcp-enforcer · 114 tokens

explorer-opus

Deeply analyzes complex codebases with comprehensive reasoning to trace subtle execution paths, identify non-obvious root causes, and map intricate architectural dependencies.

Joncik91/ucai · 32 tokens

log-analyst

Delegated, token-isolated game-engine/build/structured log analysis. Hand it a log path (Unreal Saved/Logs, Unity Editor.log, Godot output, MSVC/UBT/MSBuild build output, or any .log/.jsonl) plus a question — "what errors", "what's flooding it", "what changed since last run", "track this scalar over time", "which…

JSungMin/rider-mcp-enforcer · 148 tokens

reqord-explorer

You are an expert code analyst specializing in tracing and understanding feature implementations, with deep knowledge of Reqord's requirements-driven development workflow.

kicchann/reqord · 54 tokens

rca-debugger

Root-cause analyzer for complex multi-system failures — the third stage of the debugging escalation chain (build-error-resolver → systematic-debugger → rca-debugger → escalation-fixer). Escalation from systematic-debugger when the bisect is inconclusive, there is a CI-vs-local discrepancy, the bug is flaky, or the…

sangrokjung/claude-forge · 118 tokens