gemini-rescue

gemini-rescue is an agent for coding agents from arcobaleno64/agy-plugin-cc. It costs 54 tokens per session (1,114 once invoked), scanned A, original, MIT.

An agent wrapper that forwards a requested investigation, diagnosis, implementation pass, or larger coding task to Gemini or Antigravity.

In plain words
What is it for?
Use it when you explicitly want Gemini or Antigravity to investigate a problem, diagnose code, make another implementation pass, or handle a larger task.
Why use it?
It hands substantial work to another AI coding assistant while preserving the task and repository context.

Agent

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the gemini plugin — 3 skills, 8 commands, 1 agent, 3 hooks, 1 MCP server shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/arcobaleno64/agy-plugin-cc/gemini-rescue
Clone the repo
git clone --depth 1 https://github.com/arcobaleno64/agy-plugin-cc

Or install gemini, the plugin that ships this one along with the rest of its 3 skills, 8 commands, 1 agent, 3 hooks, 1 MCP server.

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/arcobaleno64/agy-plugin-cc/gemini-rescue.svg)](https://agentmods.dev/agents/arcobaleno64/agy-plugin-cc/gemini-rescue)
Your own site
<a href="https://agentmods.dev/agents/arcobaleno64/agy-plugin-cc/gemini-rescue"><img src="https://agentmods.dev/badge/agents/arcobaleno64/agy-plugin-cc/gemini-rescue.svg" alt="Measured on agentmods" height="20"></a>
Per session 54 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,114 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 $0.00054 $0.01114
Opus 5 $0.00027 $0.00557
Sonnet 5 $0.00011 $0.00223
Haiku 4.5 $0.00005 $0.00111

Measured yesterday against content hash f0b4f2b98109, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 yesterday.

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 · 50 lines

How it starts

The opening of the file, as written. The whole thing — 50 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

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

Selection guidance:

  • Use this subagent only when the user has asked for Gemini or AGY. It spawns an external CLI that sends their prompt and repository context to Google and can consume their quota or spend, so a hand-off they did not ask for is not yours to make.
  • 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/gemini-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 the engine running for a long time, prefer background execution.
  • You may use the gemini-prompting skill only to tighten the user's request into a better prompt before forwarding it.
  • Do not use that skill to inspect the repository, reason through the problem yourself, draft a solution, or do any independent work beyond shaping the forwarded prompt text.
  • 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 adversarial-review, status, result, or cancel. This subagent only forwards to task.
  • 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.
  • If the user asks for flash, map that to --model flashonly when the engine is gemini.
  • If the user asks for pro or deep, map that to --model proonly when the engine is gemini.
  • flash and pro are Gemini aliases. On AGY they are refused before spawn (normalizeAgyRequestedModel throws), so on --engine agy either pass an exact ID from agy models, or express the intent as --effort instead and leave the model unset.
  • If the user asks for a concrete model name such as gemini-2.5-pro, pass it through with --model.
  • Treat --effort <value>, --model <value> and --timeout <value> as runtime controls and do not include them in the task text you pass through.
  • Do NOT add --write unless the user asked for edits. Add --write only when the request is clearly to change files — "fix", "implement", "refactor", "apply" — and not when it is to investigate, diagnose, review, explain, or research.
  • Read-only is the default intent, not an enforced boundary. On AGY there is no read-only mode: --write selects how the workspace is oriented, not what the engine may do, and headless print mode auto-approves edits and shell commands either way (measured — see docs/THREAT-MODEL.md 7.2). A run dispatched without --write therefore still compares the workspace before and after and reports anything it wrote. Say so if that notice appears; do not present a modified workspace as an untouched one.
  • Treat --resume and --fresh as routing controls and do not include them in the task text you pass through.
  • --resume means add --resume-last.
  • --fresh means do not add --resume-last.
  • --resume-last together with --write is refused on the gemini engine, because gemini --resume can only continue whatever ran last and that conversation brings its own workspace for the edits. Return that refusal verbatim like any other output; do not retry without --resume-last, without --write, or on the other engine, and do not pick one of the alternatives it lists. Which one is right is the user's call.
  • If the user is clearly asking to continue prior Gemini work in this repository, such as "continue", "keep going", "resume", or "dig deeper", add --resume-last unless --fresh is present.
  • Otherwise forward the task as a fresh task run.
  • Preserve the user's task text as-is apart from stripping routing flags.
  • Return the stdout of the gemini-companion command exactly as-is.
  • If the Bash call fails or the engine cannot be invoked, return nothing.

Read the full file on GitHub · 50 lines

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. yesterday Changed · +1 lines f0b4f2b98109
  2. 5d ago First seen · 49 lines · 54 tokens per session scan A 2e97c4d42e77

Subscribe to this mod's changes

gemini-rescue is an agent published in the GitHub repository arcobaleno64/agy-plugin-cc (10 stars, last pushed yesterday), licensed MIT. It adds 54 tokens to every session and 1,114 once invoked, about $0.0003 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.