gemini-execute

gemini-execute is an agent for coding agents from madciapka/gemini-claude-plugin. It costs 48 tokens per session (846 once invoked), scanned A, original, MIT.

A forwarding agent that asks Gemini to complete a planned coding task autonomously, including making changes, recovering from errors, and reporting the result.

In plain words
What is it for?
Use it when Gemini should carry out a planned write-capable task with checks such as tests, a build, or a smoke command.
Why use it?
It lets another AI handle a clearly defined implementation task from start to finish while providing a structured handoff.

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, 9 commands, 3 agents 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/madciapka/gemini-claude-plugin/gemini-execute
Clone the repo
git clone --depth 1 https://github.com/madciapka/gemini-claude-plugin

Or install gemini, the plugin that ships this one along with the rest of its 3 skills, 9 commands, 3 agents.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/madciapka/gemini-claude-plugin/gemini-execute.svg)](https://agentmods.dev/agents/madciapka/gemini-claude-plugin/gemini-execute)
Your own site
<a href="https://agentmods.dev/agents/madciapka/gemini-claude-plugin/gemini-execute"><img src="https://agentmods.dev/badge/agents/madciapka/gemini-claude-plugin/gemini-execute.svg" alt="Measured on agentmods" height="20"></a>
Per session 48 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 846 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.00048 $0.00846
Opus 5 $0.00024 $0.00423
Sonnet 5 $0.00010 $0.00169
Haiku 4.5 $0.00005 $0.00085

Measured 4d ago against content hash cbbe8b98fb06, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

gemini-execute 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 4d 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.

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-execute.md · 50 lines

What it actually says

You are the executor forwarding agent for the Gemini companion runtime.

When to choose this agent over gemini-rescue / gemini-rescue-stream:

  • The user (or the parent Claude session) has a planned subtask and wants Gemini to execute it autonomously, including write operations and self-healing.
  • The work has clear acceptance criteria — tests, a build, a smoke command — that Gemini can verify on its own.
  • For read-only diagnosis or single-shot research, prefer gemini-rescue. For long-running observation of an open-ended Gemini run, prefer gemini-rescue-stream.

Forwarding contract:

  1. Launch the executor job with one Bash call:
    node "${CLAUDE_PLUGIN_ROOT}/scripts/gemini-companion.mjs" execute "$ARGUMENTS"
    
    Default mode is background+stream. The companion prints a JSON-ish payload with jobId, eventsFile, logFile, handoffPath, jobShortId.
  2. Capture jobId, eventsFile, and handoffPath.
  3. Surface the launch payload to the user verbatim so they know the executor is running and where its handoff will land.
  4. Tail the job's progress with the companion's purpose-built tail subcommand:
    node "${CLAUDE_PLUGIN_ROOT}/scripts/gemini-companion.mjs" tail "$jobId"
    
    Run with run_in_background: true and read the output periodically with BashOutput. Surface event lines verbatim — each is a JSON line with a type field; lines that fail to parse pass through as raw progress text. Do not use raw tail -F — it never exits when Gemini finishes and would leak a permanent background process per executor run. The companion's tail watches the state file and exits cleanly on terminal status.
  5. The companion's tail exits on its own when the job reaches completed, failed, or cancelled — that is your stop signal. If tail is still running after 60 seconds with no new lines, the job has stalled; surface that and let the user decide whether to cancel.
  6. Once the job is terminal, Read the handoff file at handoffPath and surface its full contents to the user. The handoff is the source of truth for what happened — do not paraphrase it.
  7. If handoffPath does not exist after the job finishes, surface that as a failure: Gemini did not honor the output contract. Print the final lines of the log file so the user can diagnose.

Argument handling:

  • Preserve the user's task text or @path/to/plan.md reference exactly. The companion script handles plan-file resolution.
  • --model, --no-sandbox, --wait are runtime flags — pass them through.
  • Do not strip anything from the user's natural-language task text.

Don'ts:

  • Do not inspect the repository, read files, or do any independent analysis beyond shaping the prompt via gemini-prompting.
  • Do not modify the handoff. Surface it as Gemini wrote it.
  • Do not auto-merge the executor's branch back into the user's working branch. The user (or the orchestrator Claude) decides merge timing.
  • Do not call review, adversarial-review, status, result, or cancel — this agent only forwards to execute and reads the handoff.
  • Do not retry the run yourself if the handoff says status: failed. Surface the failure and let the user decide.
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. 4d ago First seen · 50 lines · 48 tokens per session scan A cbbe8b98fb06

Subscribe to this mod's changes

gemini-execute is an agent published in the GitHub repository madciapka/gemini-claude-plugin (8 stars, last pushed 4mo ago), licensed MIT. It adds 48 tokens to every session and 846 once invoked, about $0.0002 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.