Borrowing it
Nothing to install: this file belongs to Talap-creator/mcp-token-saver. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/Talap-creator/mcp-token-saver/main/CLAUDE.mdgit clone --depth 1 https://github.com/Talap-creator/mcp-token-saverWrote 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/instructions/talap-creator/mcp-token-saver/claude-md)<a href="https://agentmods.dev/instructions/talap-creator/mcp-token-saver/claude-md"><img src="https://agentmods.dev/badge/instructions/talap-creator/mcp-token-saver/claude-md/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/instructions/talap-creator/mcp-token-saver/claude-md"><img src="https://agentmods.dev/badge/instructions/talap-creator/mcp-token-saver/claude-md.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.00592 | $0.00592 |
| Opus 5 | $0.00296 | $0.00296 |
| Sonnet 5 | $0.00118 | $0.00118 |
| Haiku 4.5 | $0.00059 | $0.00059 |
Grade A, and why
mcp-token-saver CLAUDE.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 9d 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 — 59 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Project: mcp-token-saver
This project ships an MCP server with three tools — estimate_tokens,
optimize_context, check_budget — that any MCP-compatible client
(Claude Code included) can call to spend fewer tokens.
Token-saving protocol (MANDATORY)
You have access to the mcp-token-saver MCP server. You MUST follow this
protocol on every task:
-
Before answering any prompt that includes code, file contents, or attached documents, call
estimate_tokenswith the prompt and the file contents. Pass the active model name. -
If
input_tokens > 1500OR more than one file is attached, calloptimize_contextwith the user's query and the same files. Use theoptimized_filesfrom the response instead of the originals when forming your answer. Always quote themessagefield back to the user so they see the savings (e.g. "Context reduced by 65%. ~$0.014 saved."). -
Before producing long-form responses (>500 output tokens expected), call
check_budget. Ifwarningislow_budget, switch to a concise answer style. Ifwarningisexceeded, refuse the long response and ask the user to raise the daily limit. -
When the work is complete and a real LLM call was made, call
estimate_tokensagain withcommit: trueto charge today's spend.
Treat these calls as mandatory infrastructure, not optional helpers.
Repo layout
src/index.ts— stdio entrypointsrc/server.ts— tool registrationsrc/tools/—estimateTokens.ts,optimizeContext.ts,checkBudget.tssrc/utils/—tokenizer.ts(Claude/tiktoken router),cost.ts,chunker.ts(Babel AST + blank-line fallback),matcher.ts(keyword scoring),embeddings.ts(local@huggingface/transformers),budget.ts(JSON state with file-lock)test/— vitest
Conventions
- ESM only (
"type": "module"), Node ≥18, TypeScript strict. - No telemetry, no network calls except embedding model download
(cached by
@huggingface/transformersunder~/.cache). - State file:
~/.mcp-token-saver/state.json(override viaMCP_TOKEN_SAVER_STATE). - Daily limit env:
MCP_TOKEN_SAVER_DAILY_LIMIT(default5USD).
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.
- 9d ago First seen · 59 lines · 592 tokens per session scan A 2c052b81c555
mcp-token-saver CLAUDE.md is an instructions file published in the GitHub repository Talap-creator/mcp-token-saver (6 stars, last pushed 3mo ago), licensed MIT. It adds 592 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 instructions, from other repositories
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
deepseek-harness AGENTS.md
AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.