davdittrich/delegate-agy
6 stars · Last commit 2026-07-25
Claude Code plugin that bridges to agy (Google Antigravity CLI) — adds Gemini, GPT-OSS, and grounded web search to Claude sessions
README preview
A Claude Code plugin that routes tasks to [agy](https://github.com/google/agy) (Google Antigravity CLI), giving your Claude sessions access to Gemini and grounded web search with source citations. For general web search prefer your `WebSearch` tool; reach for agy when you need cited sources or a second model. ## Why **Independent review.** A model reviewing its own output anchors on the reasoning it used to produce it. Gemini — a different company, different training — catches different things. Not because Claude can't review code, but because it tends to miss what it already decided was right. **Current information with sources.** Claude's training has a cutoff. When you need today's release notes, a pricing page, or a changelog with actual URLs, you need live web search — not a model's best guess. **A migration path off the Gemini CLI.** On June 18, 2026, [Google stops serving Gemini CLI requests](https://developers.googleblog.com/an-important-update-transitioning-gemini-cli-to-antigravity-cli/) for consumer tiers (AI Pro, Ultra, free Code Assist) and names the Antigravity CLI as the replacement. Frameworks like Claude Octopus and Metaswarm that shell out to a `gemini` binary break on that date. The included shim answers to the `gemini` name and routes the call through agy, so those tools keep working with no config changes. ## How it works The plugin has two parts. **`agy-bridge`** is a shell script that wraps `agy` with type routing, per-type tool restrictions, prompt sanitization, and consistent exit codes. Each `--type` gets its own `GEMINI.md` written to a temporary working directory; agy reads it via `--add-dir`; the GEMINI.md tool restrictions are prompt-advisory, while `--sandbox` is the API-level filesystem floor that confines agy to the granted directories. A `search` call can only use web tools. A `review` call can only read files. An `implement` call can read and write files but can't run shell commands. The prompt itself is embedded in the per-run 0600 `GEMINI.md` (the same file that carries the tool restrictions, auto-loaded via `--add-dir`); only a short static pointer is passed as the `--print` value, so the prompt still doesn't appear in `ps` or `/proc/cmdline`. **`agy-delegate`** is a Claude Code skill that tells Claude when to reach for the bridge. It triggers on phrases like "search for", "latest", "ask Gemini", "second opinion". Claude picks the right `--type`, constructs the prompt, and pipes it through. **A `SubagentStart` delegation hook** (opt-in, default off) injects a one-line advisory into allowlisted Task subagents so they know they can hand bulk, fan-out, or web-search work to `agy-bridge`. It is advisory-only and never changes routing; see [Configuration](#configuration) for the toggle, allowlist, and preconditions.