gemini

An agent that uses the Google Gemini command-line tool to analyze large codebases and perform coding tasks. A codebase is the collection of source files that make up a software project.

In plain words
What is it for?
Use it for large-repository analysis, broad code reviews, architecture documentation, security audits, feature verification, bug fixes, and test creation.
Why use it?
It is intended for repositories too large for an ordinary context window and can use Google Search when current information is needed. It can examine many directories as one project.

Agent

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
Clone the repo
git clone --depth 1 https://github.com/ruizrica/toolkit
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 718 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.00000 $0.00718
Opus 5 $0.00000 $0.00359
Sonnet 5 $0.00000 $0.00144
Haiku 4.5 $0.00000 $0.00072

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

Security

Grade A, and why

gemini 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.

docs/agents/gemini.md · 101 lines

How it starts

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

Gemini Agent

A specialized agent that interfaces with Google Gemini CLI for advanced codebase analysis. Leverages Gemini's massive context window (up to 1 million tokens), Google Search integration, and native coding capabilities.

When to Use

  • Analyzing large codebases that exceed standard context limits (>100KB)
  • Performing comprehensive multi-directory code reviews
  • Generating architecture documentation
  • Leveraging Google Search for real-time information and best practices
  • Conducting security audits across entire repositories
  • Verifying feature implementations project-wide

Capabilities

  • Large Codebase Analysis - Process entire repositories using 1M token context
  • Google Search Integration - Built-in web search for current documentation
  • Native Coding Assistance - Bug fixes, feature creation, test coverage
  • Architecture Documentation - Generate comprehensive architectural overviews
  • Security Auditing - Identify vulnerabilities with real-time advisory lookups
  • High Request Limits - Generous API limits for personal and professional use

Invocation

/toolkit:gemini-agent Analyze the authentication module for security issues

Examples

Large Codebase Analysis:

Prompt: "Analyze our entire microservices architecture and identify potential bottlenecks"

Security Audit with Current Standards:

Prompt: "Review our authentication implementation against the latest 2025 security standards"

Multi-File Refactoring:

Prompt: "Convert all our API calls from callbacks to async/await pattern"

Command Patterns

Basic Analysis (Most Common)

gemini -p "Your analysis prompt here"

Multiple Directory Inclusion

gemini --include-directories src,lib,tests -p "Your analysis prompt"

Web-Grounded Responses

gemini -p "Search for [current topic] and provide analysis"

Read the full file on GitHub · 101 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 · 101 lines · 0 tokens per session scan A 903a23b0865b

Subscribe to this mod's changes

gemini is an agent published in the GitHub repository ruizrica/toolkit (5 stars, last pushed 18d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 718 tokens. 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.