GEMINI.md: the file Gemini CLI pays for every session

GEMINI.md costs a median 512 tokens every Gemini CLI session. See what the scan found, which files are heaviest, and five worth studying first.

When you open Gemini CLI to fix a typo, a long GEMINI.md makes every session pay for advice you may not need. A token is the unit your AI plan bills by, about three quarters of a word. We measured 759 such files, and every one loads at the start of every session. The context is everything the model can see while it answers you.

What Gemini must know before the work begins

Gemini CLI reads GEMINI.md in full at the start of every session. It cannot wait for a matching file or task, so trimming it changes what Gemini sees before every answer.

The original is the first copy of a file we saw; everything matching it afterwards is a copy. Here, 710 of 759 are originals. The label shows lineage, not whether the instructions should remain.

Keep the project structure, build commands, testing rules, and conventions Gemini needs before any task. Move narrower advice elsewhere when it applies to one file type or job.

What Gemini pays before it starts

Across 759 files, the median costs 512 tokens per session. The p90 is 1,823 tokens, putting only the largest tenth above it. The heaviest is nimbus-agent/Nimbus, at 21,360 tokens across 282 lines.

At 20 sessions a day, the 512-token median becomes 10,240 tokens. The 21,360-token Nimbus file becomes 427,200 tokens over the same day. Repeated project background is the first place to trim.

What the GEMINI.md scan flagged

725 files received grade A, 16 received B, and 18 received C or D. The grade summarises what the scan treated as risky. It is not a reading of whether the instructions are any good.

The findings included 27 network calls, 7 downloads and executions of remote code, 6 uses of recursive force deletion, and 5 hidden instructions.

peon-ping and deja-vu both show grade C with remote-code and network findings. jiwuchat shows grade C for recursive force deletion.

GEMINI.md is plain text. These findings describe requests the model can read, not proof that the file ran those actions. The catalogue prints the line that triggered each finding. Inspect that line before deciding.

GEMINI.md files worth studying first

These five originals use different ways to give Gemini project context. The figures after each name show tokens read every session, lines, and known copies.

  • gemini-cli GEMINI.md: Project context for Gemini CLI, including its structure, tools, testing, and conventions; 1,140 tokens every session, 97 lines, 1 copy.
  • OmniRoute GEMINI.md: Directs Gemini to shared project rules while adding Gemini-specific guidance; 151 tokens every session, 14 lines, 0 copies.
  • mcp-toolbox GEMINI.md: Explains the Go project’s structure, database integrations, documentation, containers, and workflow; 3,611 tokens every session, 248 lines, 0 copies.
  • career-ops GEMINI.md: Prevents duplicate instruction loading and points Gemini to the project’s main guidance; 68 tokens every session, 8 lines, 0 copies.
  • gsd-core GEMINI.md: Organises software goals into planned, tested, and shippable work; 611 tokens every session, 56 lines, 0 copies.

Choose a rule, skill or hook for narrower work

A glob is a filename pattern, like *.tsx. Choose a rule with a glob when guidance belongs only with matching files. GEMINI.md cannot wait for that match.

A skill is a folder of instructions the model opens when it decides it needs them. Use a skill for guidance that is only sometimes wanted, since it stays out of the session until the model reaches for it.

A hook is a shell command your agent runs for you when something happens. Choose a hook for tests or checks that must run. GEMINI.md cannot execute commands.

Questions people ask

How much text should I keep in GEMINI.md? Keep only facts Gemini needs before every task. 99 files changed in the last 7 days, so revisit the file when project assumptions move, not only when the bill looks high.

Can I copy a GEMINI.md from another repository? Check the instructions and the scan first. All 759 of these files changed in the last 30 days, so the one you copy today is not the one that was written.

Can I split GEMINI.md into smaller files? Only if another file type can load pieces on demand. This set has 0 on-demand GEMINI.md files, so splitting text while every piece still loads changes nothing.

Do it now

Run npx agentmods cost to see what the mods in your project cost per session, then browse all instruction files.


Every figure here comes from the catalogue at agentmods.dev, which re-crawls itself nightly. More writing · how the data is licensed.