gemini-as-tool — use Gemini as a tool from Claude Code (no API key)
gemini-as-tool is a Claude Code plugin that lets Claude call Google Gemini
(3.x Pro and Flash) as a headless second-opinion agent, builder, or judge — authenticated
through a Google AI Pro OAuth subscription, with no API key and no per-token billing.

Last verified: June 2026. Gemini CLI / agy backends verified 2026-06-04.
It packages the gemini-as-tool skill plus a small, tested Python harness (gemini_tool.py)
that drives the Gemini CLI / Antigravity (agy) backends for you — so Claude Code can get a
second model's opinion, run a builder→judge pipeline, or fan out prompts to Gemini in parallel,
all without you wiring up an API key.
Install
/plugin marketplace add MarioMagdy/gemini-as-tool
/plugin install gemini-as-tool@gemini-as-tool
Then just ask Claude things like "use Gemini to review this" — the skill auto-invokes.
Prefer not to use the plugin system? Clone the repo and run
python skills/gemini-as-tool/gemini_tool.py ask "..." directly.
When to use this
Install this if you want Claude Code to:
- Get a second opinion from Gemini on any output or decision
- Use Gemini as a builder or judge in a multi-model pipeline (Pro builds, Flash judges)
- Cross-check Claude's reasoning with another frontier model
- Run Gemini headlessly and in parallel, using a Google AI Pro subscription (no API key)
Trigger phrases the skill responds to: "use Gemini", "ask Gemini", "second opinion from
Gemini", "have Gemini judge/review this", "cross-check with Gemini", "orchestrate Gemini".
Quick start
# one answer from Gemini 3.5 Flash
python gemini_tool.py ask "Explain this stack trace"
# one answer from Gemini 3.1 Pro
python gemini_tool.py ask "Design a rate limiter" --model pro
# builder -> judge: Pro builds, Flash reviews and returns a JSON verdict
python gemini_tool.py pipeline "Write a thread-safe LRU cache in Python"
# fan out N prompts concurrently
python gemini_tool.py parallel "prompt 1" "prompt 2" "prompt 3"
Python API: from gemini_tool import ask → ask(prompt, model="pro"|"flash", backend="agy"|"gemini-cli").
How it works
gemini_tool.py wraps two subscription-backed backends and normalizes their quirks:
agy (Antigravity CLI) — the primary backend and the only one with Gemini 3.5 Flash. It
works around the known Windows bug where agy -p prints nothing to stdout by reading the
response from agy's own transcript store, and runs each call in its own job workspace so
parallel calls never collide.
gemini CLI — a secondary backend that returns a clean JSON envelope.
Prompts are delivered per backend:
- The
gemini CLI backend receives the prompt over stdin (so untrusted prompt text can't reach
a shell).
- The
agy backend passes the prompt as a direct process argument (no shell is involved, so it is
not injectable), which means very long prompts are bounded by the OS command-line length limit.
Requirements
- Python 3.8+
- A Google AI Pro account, and at least one of:
- the Antigravity CLI (
agy) installed and signed in (recommended — required for 3.5 Flash), or
- the Gemini CLI (
@google/gemini-cli) installed and signed in.
- Auth is OAuth (browser sign-in, stored in your OS keyring). No API key is used or stored.
FAQ
What is gemini-as-tool?
A Claude Code plugin that lets Claude call Google Gemini (3.x Pro and Flash) as a headless second-opinion agent, builder, or judge — authenticated through a Google AI Pro OAuth subscription, with no API key and no per-token billing.
Does this require a Gemini / Google AI Studio API key?
No. It authenticates with OAuth via your existing Google AI Pro subscription. No API key is read,
set, or stored.
Which Gemini models does it support?
--model flash → Gemini 3.5 Flash (via agy), --model pro → Gemini 3.1 Pro. The model aliases
are resolved per backend.
How is this different from a Gemini MCP server?
This is a Claude Code skill/plugin, not an MCP server. It auto-invokes from context (no per-
session MCP config), supports the builder→judge and parallel patterns out of the box, and needs no
API key — it rides your Pro subscription.
Can it run prompts in parallel?
Yes — parallel fans out N prompts concurrently (each agy call uses an isolated workspace).