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/DukeDeSouth/tokendiet-mcpWrote 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/dukedesouth/tokendiet-mcp/tokendiet)<a href="https://agentmods.dev/rules/dukedesouth/tokendiet-mcp/tokendiet"><img src="https://agentmods.dev/badge/rules/dukedesouth/tokendiet-mcp/tokendiet/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/dukedesouth/tokendiet-mcp/tokendiet"><img src="https://agentmods.dev/badge/rules/dukedesouth/tokendiet-mcp/tokendiet.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.00609 | $0.00609 |
| Opus 5 | $0.00304 | $0.00304 |
| Sonnet 5 | $0.00122 | $0.00122 |
| Haiku 4.5 | $0.00061 | $0.00061 |
Grade A, and why
tokendiet 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 11d 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.
How it starts
The opening of the file, as written. The whole thing — 43 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TokenDiet (turn-neutral compression)
Use TokenDiet when it replaces a heavy payload in one round-trip. Each extra MCP call costs ~8K input-equivalent tokens in cached agent loops — only use when savings exceed that.
When to use TokenDiet
| Situation | Tool | Notes |
|---|---|---|
| Test/build logs, long command output | run |
1:1 Bash replacement; 68–99% saved |
| Web pages (http/https) | fetch |
1:1 fetch replacement; large HTML compresses strongly |
| Single file > ~3000 tokens (code) | read with mode=auto |
Server returns outline+ when net-positive |
| Multiple files in one task | read with targets[] (up to 16) |
1 MCP turn — never 12 sequential reads |
| Single file < ~3000 tokens | Built-in Read or batch via targets[] |
MCP adds a turn per call if not batched |
| Repo-wide regex search | search |
When results are large; small sets passthrough automatically |
| Need full file for editing | read mode=full |
One call — do not outline→symbol→expand ladder |
| Emergency full from prior ref | expand(refs[]) |
Batch rare recovery — not normal exploration |
| End of session economics | stats |
Terminal only — never mid-task |
Reading code
- Batch exploration: pass
targets: [{path}, ...]— one call for many files. Do not loop single-pathread. - Do not drill down by default. No outline → symbol → expand ladder. One
read(mode=auto)orread(mode=full)per file. compression.net_estimate— if negative, the call was economically unprofitable; prefer built-in Read next time.passthrough_reason— server returned full content because compression would not pay for the MCP turn.- For security review, use
mode=fullormode=symbolon specific functions — checkwarningsbefore editing. verified: truemeans structure verified, not that you saw the entire file.
Commands
- Prefer
runover Bash for tests, builds, and logs (compressed stdout/stderr, full output inref).
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.
- 11d ago First seen · 43 lines · 609 tokens per session scan A e68eb6b16730
tokendiet is a cursor rule published in the GitHub repository DukeDeSouth/tokendiet-mcp (9 stars, last pushed 1mo ago), licensed MIT. It adds 609 tokens to every session, about $0.0030 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-31.
Other cursor rules, from other repositories
mempalace-recall-always
Always-on MemPalace recall — search the palace before answering about past work, people, projects, or prior decisions.
dreamd-recall
Recall lessons, decisions, and prior context from the .agent/ memory daemon. Use when starting work in a project that has a .agent/ folder, when the user references a past decision, or when you are about to make a choice that has a documented prior.
session-memory
Use at conversation wrap-up or when the user explicitly indicates end-of-session — capture residual lessons not captured in-flight.
common_memory_bank
I am Cursor, an expert software engineer with a unique characteristic: my memory resets completely between sessions. This isn't a limitation - it's what drives me to maintain perfect documentation. After each reset, I rely ENTIRELY on my Memory Bank to understand the project and continue work effectively. I MUST read…
context-recorder-system
A modular system for recording project context, decisions, requirements, and lessons in structured files. It divides the recorder into core, template, advanced, and edge-case modules.
self-improving-obsidian-llm-wiki
LLM Wiki OS operating rules.