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 skills/ooples/token-optimizer-mcp/token-optimizationnpx skills add ooples/token-optimizer-mcp --skill token-optimizationgit 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.00071 | $0.01061 |
| Opus 5 | $0.00036 | $0.00531 |
| Sonnet 5 | $0.00014 | $0.00212 |
| Haiku 4.5 | $0.00007 | $0.00106 |
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 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.
How it starts
The opening of the file, as written. The whole thing — 88 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Token optimization
First inspect the current tool inventory. Use a named token-optimizer MCP tool only when that exact schema is visible; an installed plugin or MCP config is not proof that its server registered successfully. If the tool is absent, keep the native operation available, bound its output, and do not retry an unavailable schema.
When registered, these tools cache, diff, and bound context. The native hook refuses a built-in call only after positive registration evidence and injects applicable graph findings; the active model still makes every MCP tool call.
When to use which tool
-
smart_readinstead of a plain file read when a file is large (roughly >400 lines / >25 KB) or you have read it before this session. It caches file content and, on re-reads, returns only a diff of what changed — often a handful of tokens instead of the whole file. Passpath; optionallyenableCache,diffMode,maxSize,includeMetadata. -
smart_globinstead of a content grep for finding files in a big or unfamiliar tree. It returns paths only (no content) with filtering, sorting, and pagination — a fraction of the tokens of listing with content. Passpattern(e.g.src/**/*.ts) and optionallycwd,extensions,limit. -
smart_editinstead of a raw edit for large files: it applies the edit and returns a compact unified diff rather than echoing the whole file. (For very small files a plain edit is fine — smart_edit's diff overhead is only worth it once the file is sizeable.) -
optimize_session/get_session_statswhen the context window is filling up or after a burst of file operations.optimize_sessionbatch-compresses prior file operations and stores them out-of-context;get_session_statsreports tokens saved so far. -
get_optimization_reportwhen the user asks how much they've saved (or to show it proactively). Returns total tokens saved, overall savings %, approximate cost saved, and a full breakdown by action, by hook phase, and by MCP server, plus a pre-renderedformattedtext summary you can display as-is.
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 · 88 lines · 71 tokens per session scan A ac4b52e7029e
token-optimization is a skill published in the GitHub repository ooples/token-optimizer-mcp (501 stars, last pushed 2d ago), licensed MIT. It adds 71 tokens to every session and 1,061 once invoked, about $0.0004 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 skills, from other repositories
seedance-interview-short
This skill should be used when the user wants a fast Seedance 2.0 creative brief, a short interview, a compressed intake flow, or a quick director-style clarification before prompt writing.
simplemem-skill
Store and retrieve conversation memories across sessions. Use when asked to 'remember this', 'save conversation', 'add to memory', 'what did we discuss about...', 'query memories', or 'import chat history'. Also use proactively to preserve important dialogue context and decisions.
clean-code
Pragmatic coding standards - concise, direct, no over-engineering, no unnecessary comments.
dockerfile-slimming
Reduce container image size and build time with multi-stage builds and ordered layer caching.
hono-middleware
Hono middleware patterns - creation, composition, built-in middleware, and execution order for web applications.
web0-onboard
Set up an agent on web0 in one call. Tell it your payout wallet, the services you want to sell, and (optionally) a .null name — it returns a complete, validated setup your agent can act on immediately.