gemini-cli

gemini-cli is a cursor rule for Cursor from pridiuksson/orchestration-patterns-for-llms. It costs 0 tokens per session (852 once invoked), scanned A, original, MIT.

A usage guide for Gemini CLI, a command-line program for working with Google's Gemini AI, when analysing large codebases. It explains how to include files or directories in prompts for analysis and implementation checks.

In plain words
What is it for?
Use it to analyse one file, several files, or a whole directory with Gemini CLI. It can support code explanation, architecture review, and checking an implementation.
Why use it?
It gives agents a consistent way to provide large amounts of project context when ordinary prompt space may be insufficient.

Cursor rule for Cursor

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 rules/pridiuksson/orchestration-patterns-for-llms/gemini-cli
Clone the repo
git clone --depth 1 https://github.com/pridiuksson/orchestration-patterns-for-llms

Made for: Cursor.

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

README.md
[![agentmods](https://agentmods.dev/badge/rules/pridiuksson/orchestration-patterns-for-llms/gemini-cli.svg)](https://agentmods.dev/rules/pridiuksson/orchestration-patterns-for-llms/gemini-cli)
Your own site
<a href="https://agentmods.dev/rules/pridiuksson/orchestration-patterns-for-llms/gemini-cli"><img src="https://agentmods.dev/badge/rules/pridiuksson/orchestration-patterns-for-llms/gemini-cli.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 852 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.00852
Opus 5 $0.00000 $0.00426
Sonnet 5 $0.00000 $0.00170
Haiku 4.5 $0.00000 $0.00085

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

Security

Grade A, and why

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

examples/playable-character-cards-rules/.cursor/rules/gemini-cli.mdc · 93 lines

How it starts

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

Persona: Gemini CLI Usage Guide

Description

This document provides instructions on how to use the Gemini CLI for large codebase analysis, leveraging its massive context window. This is a reference guide for all AI agents.

Core Directive

Use the gemini -p command with the @ syntax to include large files, multiple files, or entire directories in your prompts for deep analysis, implementation verification, and architectural understanding.


How to use Gemini CLI

Using Gemini CLI for Large Codebase Analysis

When analyzing large codebases or multiple files that might exceed context limits, use the Gemini CLI with its massive context window. Use gemini -p to leverage Google Gemini's large context capacity.

File and Directory Inclusion Syntax

Use the @ syntax to include files and directories in your Gemini prompts. The paths should be relative to WHERE you run the gemini command.

Examples:
  • Single file analysis: gemini -p "@src/main.py Explain this file's purpose and structure"

  • Multiple files: gemini -p "@package.json @src/index.js Analyze the dependencies used in the code"

  • Entire directory: gemini -p "@src/ Summarize the architecture of this codebase"

  • Multiple directories: gemini -p "@src/ @tests/ Analyze test coverage for the source code"

  • Current directory and subdirectories: gemini -p "@./ Give me an overview of this entire project"

  • Or use --all_files flag: gemini --all_files -p "Analyze the project structure and dependencies"

Implementation Verification Examples

  • Check if a feature is implemented: gemini -p "@src/ @lib/ Has dark mode been implemented in this codebase? Show me the relevant files and functions"

  • Verify authentication implementation: gemini -p "@src/ @middleware/ Is JWT authentication implemented? List all auth-related endpoints and middleware"

  • Check for specific patterns: gemini -p "@src/ Are there any React hooks that handle WebSocket connections? List them with file paths"

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

Subscribe to this mod's changes

gemini-cli is a cursor rule published in the GitHub repository pridiuksson/orchestration-patterns-for-llms (2 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 852 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.