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.
npx agentmods add instructions/ooples/token-optimizer-mcp/gemini-mdgit clone --depth 1 https://github.com/ooples/token-optimizer-mcpWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00293 | $0.00293 |
| Opus 5 | $0.00147 | $0.00147 |
| Sonnet 5 | $0.00059 | $0.00059 |
| Haiku 4.5 | $0.00029 | $0.00029 |
Grade A, and why
token-optimizer-mcp GEMINI.md 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 2d 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.
What it actually says
Token optimization (Gemini CLI)
This extension adds the token-optimizer MCP server. Its tools cut context/token
usage 60–90% via caching, diffing, and compression. Prefer them:
smart_readinstead of reading a file directly when the file is large (>~400 lines / >25 KB) or already read this session — re-reads return a diff.smart_globinstead of a content grep on a big/unknown tree — returns paths only; read only what you need.smart_editon large files — returns a compact diff, not the whole file.optimize_sessionwhen context fills up;get_session_statsfor savings.get_optimization_reportto show the user total tokens saved with a full breakdown by action/hook/server (returns a ready-to-displayformattedsummary).optimize_textto stash bulky text out-of-context under a key.compress_textis at-rest byte compression only — its base64 output usually costs more tokens, so never put it back into context.count_tokensto measure a chunk first.
Small files / one-off reads: built-in reading is fine — don't add overhead.
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.
- 2d ago First seen · 20 lines · 293 tokens per session scan A a01706052cce
token-optimizer-mcp GEMINI.md is an instructions file published in the GitHub repository ooples/token-optimizer-mcp (501 stars, last pushed 2d ago), licensed MIT. It adds 293 tokens to every session, about $0.0015 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-30.
Other instructions, from other repositories
memtomem-stm CLAUDE.md
Instructions for memtomem/memtomem-stm, covering claude code notes — memtomem-stm, commands and invariants when editing.
headroom copilot-instructions.md
Copilot instructions for headroomlabs-ai/headroom: When performing a pull request review in this repository.
OmniGlyph CLAUDE.md
Instructions for diegosouzapw/OmniGlyph, covering claude.md, quick start, project at a glance, key conventions and running benchmarks.
OmniGlyph AGENTS.md
Instructions for diegosouzapw/OmniGlyph, covering omniglyph — agent guidelines, project, stack, build / test commands and architecture.
OmniGlyph GEMINI.md
Instructions for diegosouzapw/OmniGlyph, covering omniglyph — guidelines for gemini-based agents, non-negotiables (mirror of agents.md), file placement and validation before you claim done.
mcp-slim-guard AGENTS.md
Instructions for lennney/mcp-slim-guard, covering slim guard agent contract, scope and source of truth, repository map, product invariants and code style.