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.
git clone --depth 1 https://github.com/arxdsilva/vaultWrote 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.
[](https://agentmods.dev/rules/arxdsilva/vault/token-optimization)<a href="https://agentmods.dev/rules/arxdsilva/vault/token-optimization"><img src="https://agentmods.dev/badge/rules/arxdsilva/vault/token-optimization/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/arxdsilva/vault/token-optimization"><img src="https://agentmods.dev/badge/rules/arxdsilva/vault/token-optimization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00845 | $0.00845 |
| Opus 5.5 | $0.00338 | $0.00338 |
| Sonnet 5.5 | $0.00169 | $0.00169 |
| Haiku 4.5 | $0.00085 | $0.00085 |
Grade A, and why
token-optimization 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 3mo 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.
This is a copy
100% identical to token-optimization — 4 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 91 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Agent Efficiency Rules
In agent mode, response tokens are usually NOT the dominant cost. The dominant costs are:
- Tool-call results piped back into context (a single
read_fileof a 2,000-line file can cost more than the entire response). - Re-running expensive tools (semantic search, repo-wide grep, full builds).
- Multi-turn ping-pong when one well-formed turn would have sufficed.
These rules attack all three.
1. Plan Before Acting
Before issuing tool calls, state internally (or briefly to user, max 1 line):
- What file or symbol you're targeting
- Which tool is the cheapest way to find it
Skip planning chatter for trivial tasks (one-line edits, single-file reads).
2. Cheapest Tool Wins
| You need to… | Use… | Don't use… |
|---|---|---|
| Find an exact symbol or string | grep / ripgrep |
Semantic search, full file reads |
| Locate a file by name pattern | glob |
find recursive shell, listing all |
| Understand "how does X work" | Semantic search, then targeted read | Reading 10 files speculatively |
| Read a known function in a known file | Targeted read (offset/limit) |
Full-file read on a 1k-line file |
| Check a single command's output | Run it once | Run it, then --help, then again |
3. Batch Independent Calls
If two reads/searches don't depend on each other, fire them in the same message. Serial chains of independent calls double latency and inflate context-handoff tokens.
4. Don't Re-Read
- A file read in this session stays read. Refer back to it from memory.
- A directory listed once stays listed.
- If you genuinely think the file changed (e.g., you just edited it and need to verify), re-read only the changed range.
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.
- 3mo ago First seen · 91 lines · 845 tokens per session scan A 9fc0fc3dd8ed
token-optimization is a cursor rule published in the GitHub repository arxdsilva/vault (3 stars, last pushed 1mo ago), licensed MIT. It adds 845 tokens to every session, about $0.0034 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to token-optimization, differing in 4 lines, and is treated as a copy.
token-optimization compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| token-optimizationarxdsilva/vault | Cursor rule | 3 | 1mo ago | MIT | A | 845 | Cursor |
| gonavi-goSyngnat/GoNavi | Cursor rule | 2.1k | yesterday | Apache-2.0 | A | 0 | Cursor |
| backend0xJacky/nginx-ui | Cursor rule | 12k | yesterday | AGPL-3.0 | A | 441 | Cursor |
| go-rulesbeel-collab/presets.dev | Cursor rule | 3 | 10d ago | MIT | A | 0 | Cursor |
| go-project-structuredstotijn/go-mcp | Cursor rule | 18 | 1y ago | Apache-2.0 | A | 0 | Cursor |
| go-testing-practicesdstotijn/go-mcp | Cursor rule | 18 | 1y ago | Apache-2.0 | A | 0 | Cursor |
| go-patternsTrevorEdris/fellowship-of-the-workflows | Cursor rule | 2 | 5mo ago | none | A | 0 | Cursor |