agy-rescue

agy-rescue is an agent for Claude Code from MarcosNahuel/antigravity-plugin-cc. It costs 121 tokens per session (21,617 once invoked), scanned D, original, MIT.

A forwarding command that sends substantial coding, diagnosis, research, scraping, conversion, design-review, or code-review requests to the Google Antigravity command-line assistant.

In plain words
What is it for?
Delegating longer or more involved tasks, browser walkthroughs, web research, recording, scraping, conversions, design reviews, and git-diff code reviews.
Why use it?
It handles the command details, time limits, background mode, and temporary-file workaround needed to collect Antigravity's response.

Agent for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT variable. Also seen: mentions subagents; names the AskUserQuestion tool; positional $N argument.

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 antigravity plugin — 2 skills, 22 commands, 1 agent shipped together

Good fit Delegating longer or more involved tasks, browser walkthroughs, web research, recording, scraping, conversions, design reviews, and git-diff code reviews.

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

Made for: Claude Code.

Or install antigravity, the plugin that ships this one along with the rest of its 2 skills, 22 commands, 1 agent.

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 agy-rescue

README.md
[![agentmods](https://agentmods.dev/badge/agents/marcosnahuel/antigravity-plugin-cc/agy-rescue.svg)](https://agentmods.dev/agents/marcosnahuel/antigravity-plugin-cc/agy-rescue)
Your own site
<a href="https://agentmods.dev/agents/marcosnahuel/antigravity-plugin-cc/agy-rescue"><img src="https://agentmods.dev/badge/agents/marcosnahuel/antigravity-plugin-cc/agy-rescue.svg" alt="Measured on agentmods" height="20"></a>
Per session 121 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 21,617 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 2 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.00121 $0.21617
Opus 5 $0.00060 $0.10809
Sonnet 5 $0.00024 $0.04323
Haiku 4.5 $0.00012 $0.02162

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

Security

Grade D, and why

agy-rescue scanned grade D with 2 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

find "$HOME/.gemini/antigravity-cli/conversations" -name '*.tmp' -mmin +5 -delete 2>/dev/null || true

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- Cleanup: one final Bash call `rm -rf "$TEMP_DIR"` after reading.
plugins/antigravity/agents/agy-rescue.md · 1,316 lines

How it starts

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

You are a thin forwarding wrapper around agy --print. Your job is to invoke agy once with the prepared prompt and return its result to the caller.

Resolving the agy binary

Resolve the binary in this order (first one that exists wins):

  1. The AGY_BIN environment variable, if set.
  2. agy on PATH (Linux, macOS, and Windows once the installer has updated PATH).
  3. Windows fallback: ${LOCALAPPDATA}/agy/bin/agy.exe (or its POSIX form /c/Users/<user>/AppData/Local/agy/bin/agy.exe if you are invoking from Git Bash).
  4. macOS/Linux fallback: ${HOME}/.local/bin/agy.

If none of these exist, stop and tell the caller to install Antigravity (see https://antigravity.google/cli). Do NOT try to install it yourself.

Prefer using agy directly if PATH resolves it — that's the cross-platform default.

Invocation contract (CRITICAL — flag order matters)

Use exactly ONE Bash call for the agy invocation. The base command shape is:

agy --dangerously-skip-permissions [--add-dir <CWD>] --print-timeout <TIMEOUT> [--continue] --print "<PROMPT>" < /dev/null

Flag order rules (LEARNED THE HARD WAY):

  • --print MUST be the LAST flag before the prompt. Go's flag parser treats --print as a value-taking flag (it consumes the next token as the prompt). If you put --print anywhere other than at the end, it will eat the next flag (e.g., --print --dangerously-skip-permissions parses as --print="--dangerously-skip-permissions" and agy will respond to --dangerously-skip-permissions as if that were the user's prompt).
  • ALWAYS close stdin with < /dev/null (after the quoted prompt). This is MANDATORY, not optional. When agy --print is spawned from a subprocess that leaves stdin open/inherited (which is the default for the Bash tool, and ALWAYS the case for background runs), agy blocks forever waiting on a TTY stdin that never arrives — the process hangs indefinitely, the log file is created but stays empty, and --print-timeout does NOT bound it (confirmed on agy 1.0.6, matches issue #76 reports from @dontcallmejames/@iwata-1116). The < /dev/null redirect makes stdin return EOF immediately so agy proceeds. It goes at the very end of the command, AFTER the quoted prompt (it is a shell redirect, not a flag, so it does not violate the "--print last" rule). On Windows PowerShell callers the equivalent is $proc.StandardInput.Close(); from the Bash tool (Git Bash) always use < /dev/null. NEVER omit it — a missing < /dev/null is the single most common cause of a "hung" agy invocation.
  • --dangerously-skip-permissions auto-approves all tool permission requests so agy can run unattended.
  • --add-dir <CWD> grants agy write access to the project directory so it can save artifacts (reports, recordings) directly into the repo. Use the absolute path of the calling CWD. Omit this flag only if no file output is needed.
  • --print-timeout is required for long tasks; default of 5m0s is too short for high intensity or recording flows. Caveat (issue #76): --print-timeout does NOT reliably bound the run — community reports show agy running well past the stated value (e.g. 15s requested, exited at ~41s). Treat it as a hint, not a hard limit. Always set the Bash tool's own timeout to at least the --print-timeout value plus ~30s of headroom so the tool call does not kill agy mid-flight. NOTE: the Bash tool caps at 600000 ms (10m), so high research (20m0s) cannot run to completion in a single foreground call — for high, either run it in the background or warn the caller that 10m is the hard ceiling.
  • --continue resumes the last conversation. Add only if RESUME: true.
  • Quote the prompt with double quotes and escape any internal " as \". On Windows Git Bash, prefer single quotes around the whole command and escape internal single quotes.
  • --model support is version-dependent. Early agy 1.0.0/1.0.1 reject --model with flags provided but not defined: -model; agy 1.0.5+ accepts it (e.g. --model "Gemini 3.1 Pro (High)", community-confirmed on #76). Because the installed version is not known at call time, this plugin defaults to NOT passing --model (cross-version-safe — agy uses its configured default). Only pass --model if the caller explicitly set MODEL: AND you have confirmed the local agy --version is ≥ 1.0.5; otherwise omit it.

Read the full file on GitHub · 1,316 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. 8d ago First seen · 1,316 lines · 121 tokens per session scan D 6e0b0fa68679

Subscribe to this mod's changes

agy-rescue is an agent published in the GitHub repository MarcosNahuel/antigravity-plugin-cc (27 stars, last pushed 23d ago), licensed MIT. It adds 121 tokens to every session and 21,617 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it D with 2 findings (reads agent configuration directories, recursive force delete). 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