Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use the token-optimizer MCP tools to reduce context/token usage when reading, searching, or editing files, or when the context window is filling up. Trigger when reading large files, re-reading files already seen, searching a big/unknown tree, making edits to large files, or when you need to store bulky output out-of-context.
.claude/skills/hashgraph-online-token-optimization/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-17 | ✗→✓ | ▲ Improved | 116% | 0% |
| case-05 | ✓→✓ | = Same ✓ | 125% | 0% |
| case-19 | ✓→✓ | = Same ✓ | 34% | 0% |
| case-20 | ✓→✓ | = Same ✓ | 129% | 0% |
| case-01 | ✗→✗ | = Same ✗ | 135% | 0% |
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.
smart_read instead 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. Pass path; optionally enableCache, diffMode, maxSize, includeMetadata.
smart_glob instead of a content grep for finding files in a big orunfamiliar tree. It returns paths only (no content) with filtering, sorting, and pagination — a fraction of the tokens of listing with content. Pass pattern (e.g. src//.ts) and optionally cwd, extensions, limit.
smart_edit instead of a raw edit for large files: it applies theedit 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_stats when the context window isfilling up or after a burst of file operations. optimize_session batch-compresses prior file operations and stores them out-of-context; get_session_stats reports tokens saved so far.
get_optimization_report when 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-rendered formatted text summary you can display as-is.
count_tokens to measure how expensive a chunk of text is before youdecide how to handle it.
wiki_write is visible, call it when you establish a durable,non-obvious conclusion: a failed approach and why, a decision and its rejected alternative, or a command that finally worked. Anchor it to a real file or path#symbol, and include its concrete evidence, applicability, calibrated confidenceLabel, scope, and invalidators.
Do not delegate it to another model, and do not invent a finding merely to populate the graph.
wiki_write is absent, do not claim semantic harvesting succeeded.touched. Use wiki_read for an explicit lookup.
optimize_text — compress a large text blob under a key and keep it inthe external cache instead of your context; retrieve it later by key. Reports tokensSaved. Good for logs, large outputs, or reference material you don't need inline right now.
compress_text — Brotli+base64 compression. Byte reduction only:the base64 output usually has more LLM tokens than the input, so use it for at-rest storage/caching, not for putting back into context. The tool returns increasesTokens + a warning when that's the case.
smart_read.smart_glob (paths first, read only whatyou need).
smart_edit.optimize_session, then continue.optimize_text (by key), not compress_textinto context.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 15,553 | 20,486 | +32% | 1 | 1 | 0% | 1,768 | 4,156 | +135% | 0 | 0 | — |
case-02 | fail→fail | 7,445 | 23,423 | +215% | 1 | 1 | 0% | 1,294 | 2,335 | +80% | 0 | 0 | — |
case-03 | fail→fail | 10,871 | 43,949 | +304% | 1 | 1 | 0% | 2,301 | 2,227 | -3% | 0 | 0 | — |
case-04 | fail→fail | 21,423 | 13,772 | -36% | 1 | 1 | 0% | 4,801 | 1,814 | -62% | 0 | 0 | — |
case-05 | pass→pass | 3,451 | 7,219 | +109% | 1 | 1 | 0% | 651 | 1,464 | +125% | 0 | 0 | — |
case-06 | fail→fail | 20,780 | 11,625 | -44% | 1 | 1 | 0% | 535 | 1,783 | +233% | 0 | 0 | — |
case-07 | fail→fail | 11,509 | 17,501 | +52% | 1 | 1 | 0% | 1,205 | 3,370 | +180% | 0 | 0 | — |
case-08 | fail→fail | 7,053 | 9,897 | +40% | 1 | 1 | 0% | 1,304 | 2,851 | +119% | 0 | 0 | — |
case-09 | fail→fail | 13,570 | 14,929 | +10% | 1 | 1 | 0% | 1,575 | 2,879 | +83% | 0 | 0 | — |
case-10 | fail→fail | 12,214 | 5,132 | -58% | 1 | 1 | 0% | 990 | 1,901 | +92% | 0 | 0 | — |
case-11 | fail→fail | 6,172 | 8,903 | +44% | 1 | 1 | 0% | 915 | 1,305 | +43% | 0 | 0 | — |
case-12 | fail→fail | 13,030 | 18,015 | +38% | 1 | 1 | 0% | 1,312 | 2,543 | +94% | 0 | 0 | — |
case-13 | fail→fail | 7,937 | 5,258 | -34% | 1 | 1 | 0% | 482 | 1,910 | +296% | 0 | 0 | — |
case-14 | fail→fail | 4,270 | 7,665 | +80% | 1 | 1 | 0% | 683 | 2,411 | +253% | 0 | 0 | — |
case-15 | fail→fail | 15,155 | 13,705 | -10% | 1 | 1 | 0% | 2,885 | 2,696 | -7% | 0 | 0 | — |
case-16 | fail→fail | 12,550 | 22,834 | +82% | 1 | 1 | 0% | 1,269 | 1,853 | +46% | 0 | 0 | — |
case-17 | fail→pass | 14,934 | 13,987 | -6% | 1 | 1 | 0% | 1,256 | 2,710 | +116% | 0 | 0 | — |
case-18 | fail→fail | 9,181 | 12,318 | +34% | 1 | 1 | 0% | 683 | 1,545 | +126% | 0 | 0 | — |
case-19 | pass→pass | 32,408 | 6,771 | -79% | 1 | 1 | 0% | 1,663 | 2,231 | +34% | 0 | 0 | — |
case-20 | pass→pass | 6,480 | 6,983 | +8% | 1 | 1 | 0% | 1,019 | 2,334 | +129% | 0 | 0 | — |
case-21 | fail→fail | 26,147 | 15,336 | -41% | 1 | 1 | 0% | 3,078 | 2,523 | -18% | 0 | 0 | — |
case-22 | fail→fail | 7,731 | 5,396 | -30% | 1 | 1 | 0% | 362 | 1,942 | +436% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 14 counted toward the lift figure. The other 8 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +5 percentage points is the difference between those two pass rates over the 14 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.