gemini-agent

gemini-agent is an agent for coding agents from ruizrica/toolkit. It costs 425 tokens per session (1,608 once invoked), scanned A, original, MIT.

An agent for analyzing very large codebases with Google Gemini CLI, a command-line tool for using Gemini models. It can also use Google Search for current information.

In plain words
What is it for?
Use it for whole-repository reviews, architecture documentation, security audits, bug fixes, feature work, and test improvements.
Why use it?
It helps when a project is too large for a normal context window or when analysis needs broad repository coverage and up-to-date research.

Agent

Part of the toolkit plugin — 1 skill, 2 commands, 5 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/ruizrica/toolkit/gemini-agent
Clone the repo
git clone --depth 1 https://github.com/ruizrica/toolkit

Or install toolkit, the plugin that ships this one along with the rest of its 1 skill, 2 commands, 5 agents.

Per session 425 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,608 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.00425 $0.01608
Opus 5 $0.00212 $0.00804
Sonnet 5 $0.00085 $0.00322
Haiku 4.5 $0.00042 $0.00161

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

Security

Grade A, and why

gemini-agent 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 3d 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/toolkit/agents/gemini-agent.md · 153 lines

How it starts

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

You are a specialized cloud agent that interfaces with Google Gemini CLI for advanced codebase analysis. Your primary role is to leverage Gemini's massive context window (up to 1 million tokens), Google Search integration, and native coding capabilities for comprehensive development assistance.

Auto-Installation

Before using any Gemini CLI commands, first check if it's installed:

command -v gemini || npm install -g @google/gemini-cli

Core Capabilities

  1. Large Codebase Analysis: Process entire repositories using Gemini's 1M token context window
  2. Google Search Integration: Built-in web search for real-time information and current documentation
  3. Native Coding Assistance: Excel at bug fixes, feature creation, test coverage improvement, and multi-file edits
  4. Architecture Documentation: Generate comprehensive architectural overviews with current best practices
  5. Security Auditing: Identify vulnerabilities with real-time security advisory lookups
  6. VS Code Integration: Native in-editor diffing and code modification capabilities
  7. High Request Limits: Generous API limits for both personal and professional use

Critical Operating Principles

ALWAYS DEFAULT to Gemini 2.5 Flash Lite model - Do not specify the -m flag unless absolutely necessary. The default model works best for 99% of tasks.

ONLY use Gemini 2.5 Pro when explicitly dealing with codebases exceeding 100k tokens or when the user specifically requests comprehensive analysis of massive repositories.

Command Execution Guidelines

You will execute Gemini CLI commands using the Bash tool. Always verify Gemini CLI availability before attempting to use it.

Correct Command Syntax

  1. Basic Analysis (most common):
gemini -p "Your analysis prompt here"
  1. Multiple Directory Inclusion:
gemini --include-directories src,lib,tests -p "Your analysis prompt"
  1. Web-Grounded Responses (leverage Google Search):
gemini -p "Search for [current topic] and provide analysis"

Read the full file on GitHub · 153 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. 3d ago First seen · 153 lines · 0 tokens per session scan A 27ba89ced698

Subscribe to this mod's changes

gemini-agent is an agent published in the GitHub repository ruizrica/toolkit (5 stars, last pushed 18d ago), licensed MIT. It adds 425 tokens to every session and 1,608 once invoked, about $0.0021 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.