gemini-subagent

gemini-subagent is a skill for Claude Code from dwgx/claude-gemini-subagent. It costs 171 tokens per session (3,686 once invoked), scanned C, original, MIT.

A method for delegating expensive tasks to the local Gemini command-line tool, which runs another AI worker with its own context and tools.

In plain words
What is it for?
Use it to delegate research, documentation scans, code analysis, file generation, package checks, and test or script execution.
Why use it?
It can keep the main agent's context smaller when tasks involve web access, large files, bulk analysis, long writing, or scripts and tests.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions subagents; mentions Gemini CLI.

Part of the claude-gemini-subagent plugin — 1 skill shipped together

Good fit Use it to delegate research, documentation scans, code analysis, file generation, package checks, and test or script execution.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dwgx/claude-gemini-subagent/gemini-subagent
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.

Any agent
npx skills add dwgx/claude-gemini-subagent --skill gemini-subagent
Clone the repo
git clone --depth 1 https://github.com/dwgx/claude-gemini-subagent

Made for: Claude Code.

Or install claude-gemini-subagent, the plugin that ships this one along with the rest of its 1 skill.

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-subagent

README.md
[![agentmods](https://agentmods.dev/badge/skills/dwgx/claude-gemini-subagent/gemini-subagent/github.svg)](https://agentmods.dev/skills/dwgx/claude-gemini-subagent/gemini-subagent)
Your own site
<a href="https://agentmods.dev/skills/dwgx/claude-gemini-subagent/gemini-subagent"><img src="https://agentmods.dev/badge/skills/dwgx/claude-gemini-subagent/gemini-subagent/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gemini-subagent

Your own site · 80×15
<a href="https://agentmods.dev/skills/dwgx/claude-gemini-subagent/gemini-subagent"><img src="https://agentmods.dev/badge/skills/dwgx/claude-gemini-subagent/gemini-subagent.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 171 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,686 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 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.00171 $0.03686
Opus 5 $0.00086 $0.01843
Sonnet 5 $0.00034 $0.00737
Haiku 4.5 $0.00017 $0.00369

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

Security

Grade C, and why

gemini-subagent scanned grade C 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 9d 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.

Recursive force deletehighDestructive command

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

**Truly destructive ops** (`rm -rf` outside workspace, dropping a

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

| **Anything needing network** (web search, fetch, `pip install`, `npm view`, `curl`, `gh api`, remote access) | yolo mode | `--yolo` |
skills/gemini-subagent/SKILL.md · 376 lines

How it starts

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

Gemini as Worker Subagent

Claude is the orchestrator. Gemini is a worker subagent with its own fresh context window, its own network access, and its own code execution environment. You hand Gemini a well-scoped task and take back a short answer. Gemini's thinking, tool calls, and file reads happen in Gemini's context, not yours — that is where the token savings come from.

Thin-forwarder contract

Treat each Gemini call like a function call:

  • You write the prompt (the "arguments")
  • Gemini runs its own full agent loop inside its own context
  • You take Gemini's stdout as the authoritative return value
  • No Claude-side freelancing — don't "edit" what Gemini said in your head and then act on a phantom version. If Gemini's answer is wrong or under- specified, resume the session with a follow-up or dispatch a fresh call with a better prompt. Do not pretend you know what it meant.

When to delegate

Delegate when any of these apply:

  • Network needed. Web search, fetching docs, scraping an API, checking a package version, gh api, npm view, pip install. You (Claude) pay steep token cost for WebFetch/WebSearch; Gemini's network calls happen in its own context.
  • Large reads. Scanning a repo, digesting a long file/log, cross- referencing many sources.
  • Long output that just needs a conclusion. E.g. "find all TODOs and tell me which are stale" — Gemini emits the list internally and returns only the verdict.
  • Writing long files. Gemini writes in its isolated context; you only see "wrote foo.py (240 lines)".
  • Running tools you'd rather not stream. Tests, builds, linters, data-processing scripts.
  • You're stuck. If your own attempt has stalled or you want a fresh second pass with no prior context, dispatch Gemini with a clean problem statement. That's explicitly the best-case use — "rescue" mode.

When NOT to delegate

  • Quick decisions you can make from existing context.
  • Tasks that depend tightly on conversation state that would be painful to re-explain.
  • One-line edits you could Edit directly with less overhead than composing a Gemini prompt.
  • The user is clearly expecting you to do it interactively ("let's walk through this together").

Read the full file on GitHub · 376 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. 9d ago First seen · 376 lines · 171 tokens per session scan C c74f14e40a5b

Subscribe to this mod's changes

gemini-subagent is a skill published in the GitHub repository dwgx/claude-gemini-subagent (1 stars, last pushed 2mo ago), licensed MIT. It adds 171 tokens to every session and 3,686 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it C with 2 findings (recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.