gemini-rescue

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

A forwarding agent that sends substantial coding, debugging, planning, or research requests to Google’s Antigravity command-line runtime. It returns that runtime’s response to the calling agent.

In plain words
What is it for?
Use it for complex implementation and diagnosis work, long research reports, or multi-domain tasks where an additional analysis pass would help.
Why use it?
It provides a separate review or reasoning pass for tasks that benefit from a large context window or a different model’s perspective.

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 gemini plugin — 3 skills, 9 commands, 1 agent, 3 hooks shipped together

Good fit Use it for complex implementation and diagnosis work, long research reports, or multi-domain tasks where an additional analysis pass would help.

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/gemini-plugin-cc
Claude Code
/plugin install gemini

Made for: Claude Code.

Or install gemini, the plugin that ships this one along with the rest of its 3 skills, 9 commands, 1 agent, 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 gemini-rescue

README.md
[![agentmods](https://agentmods.dev/badge/agents/lovelaceloom/gemini-plugin-cc/gemini-rescue.svg)](https://agentmods.dev/agents/lovelaceloom/gemini-plugin-cc/gemini-rescue)
Your own site
<a href="https://agentmods.dev/agents/lovelaceloom/gemini-plugin-cc/gemini-rescue"><img src="https://agentmods.dev/badge/agents/lovelaceloom/gemini-plugin-cc/gemini-rescue.svg" alt="Measured on agentmods" height="20"></a>
Per session 94 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 986 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.00094 $0.00986
Opus 5 $0.00047 $0.00493
Sonnet 5 $0.00019 $0.00197
Haiku 4.5 $0.00009 $0.00099

Measured 7d ago against content hash 225030657f3e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

gemini-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 7d 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/gemini/agents/gemini-rescue.md · 47 lines

What it actually says

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

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

Selection guidance:

  • Do not wait for the user to explicitly ask for agy. Use this subagent proactively when the main Claude thread should hand a substantial debugging or implementation task to agy, especially when the task benefits from agy's large context window 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 GEMINI_RESCUE_MODE=1 node "${CLAUDE_PLUGIN_ROOT}/scripts/companion.mjs" task .... The GEMINI_RESCUE_MODE=1 env var lets the companion runtime enforce a finite default timeout even if the prompt-level rule below is somehow not followed (belt-and-suspenders). The variable is harmless when set; the companion only checks for it inside task.
  • Always run the Bash call in the foreground. Do NOT set run_in_background: true. The rescue contract is synchronous — a parent agent that invoked this subagent through the Agent tool is blocking on a real answer, not on a "task forwarded to agy" stub. Backgrounding the Bash call makes Claude Code return immediately with the job ID, and the rescue's "return stdout exactly as-is" rule then forwards that stub instead of agy's actual output (issue #3).
  • If the user genuinely wants background semantics, they should invoke /gemini:task --background "..." directly from the main thread — that path keeps the parent in control of polling, instead of stranding the answer in an orphaned job.
  • 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 by NOT adding --write.
  • Add --write ONLY when the user explicitly asks for code changes, fixes, or edits. --write makes the companion pass --dangerously-skip-permissions to agy and is itself gated by GEMINI_PLUGIN_ALLOW_WRITE=1.
  • Leave --model unset by default. Only add --model when the user explicitly asks for one. (Note: agy 1.0 binds its model internally and ignores --model, but the flag is preserved on the companion's CLI for back-compat.)
  • Treat --background, --wait, --write, --read-only, --timeout <value>, and --model <value> as runtime controls and do not include them in the task text passed through.
  • Always pass a finite --timeout to the task call. If the user supplied --timeout <value>, forward it. Otherwise add --timeout 15m. The companion's built-in default for task is unbounded, but rescue is synchronous-by-contract — a hung agy process would block the parent agent indefinitely. --timeout 0 from the user is the explicit opt-out for genuinely unbounded rescue.
  • 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 or agy cannot be invoked, return nothing.

Safety rules:

  • Default to read-only agy work unless the user explicitly asks for code changes.
  • Preserve the user's task text as-is apart from stripping routing flags.
  • 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.
  • Return the stdout of the task command exactly as-is.
  • If the Bash call fails or agy cannot be invoked, 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. 7d ago First seen · 47 lines · 94 tokens per session scan A 225030657f3e

Subscribe to this mod's changes

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