/token-saviour:token-saviourfrom token-saviour
Routes coding tasks to the most token-efficient tool (serena, rtk, caveman, Ponytail) instead of reading whole files or dumping raw output. Use before exploring code, tracing call paths, or running verbose commands.
Ships in token-saviour. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Reading whole files to answer a narrow question is the single most wasteful thing an agent does. On a benchmark over a ~30-file Python app, swapping whole-file reads for semantic retrieval cut total tokens ~66%; the other tools each own a narrower slice. This skill helps you reach for the right one before you blow the context budget — then get back to the actual task.
The mental model: token cost has four independent layers, and a different tool owns each.
Match the tool to the layer the task actually stresses. These winners were re-validated in a
9-tool benchmark (2026-07) against newer entrants (archex, Pare, lazy-cat) — every incumbent
held its layer; the runner-ups and the niches where they flip are in
references/tool_links.md.
| Layer | What it is | Tool | Don't bother with |
|---|---|---|---|
| Code-read input | Understanding code: symbols, callers, call paths, architecture | serena | rtk, caveman, Ponytail |
| Command-output input | Verbose stdout: tests, builds, git, grep, listings | rtk | the code-read tool |
| Generated prose output | Your own long, chatty replies / write-ups | caveman | the input tools, Ponytail |
| Generated code output | Implementations you write/edit | Ponytail | the input tools, caveman |
| — | Tiny/one-off work | plain Read/Grep/Bash | everything (overhead > benefit) |
First, check availability. These are optional third-party tools. Run the relevant
--help/--versiononce; if a tool isn't installed, seereferences/tool_links.mdfor install + verify commands, or fall back to the next-best option in its row (ultimately plain Read/Grep/Bash). Never pretend a tool ran — degrade gracefully.
Announce what you used. Whenever this skill drives a task, print a one-line tag naming the token-saving tools actually used, joined with
+— e.g.🪙 token-saviour: serena + rtk + caveman, or🪙 token-saviour: serena + ponytail. If you fell back to plain Read/Grep/Bash because nothing was installed or the task was trivial, say so:🪙 token-saviour: plain tools (fallback). List only tools you genuinely invoked, in layer order (serena → rtk → caveman / ponytail).
Work top-down. The moment a row matches, use that tool and stop.
"Where is X / what calls X / how does A reach B / what breaks if I change X / explain this module / list its methods?" → serena (semantic code retrieval). This is the dominant cost — code-reading was ~88% of the baseline bill — so this is the highest-value switch. Measured: tracing a 4-layer call path cost 65 tokens vs 1,633 reading the files (−89%); explaining the whole architecture 243 vs 3,250 (−85%); listing one class's methods 55 vs 458 (−71%); finding all callers 49 vs 525 (−78%).
Running something noisy — test suite, build, linter, git, grep, a big directory
listing → rtk (compresses command output). Measured: the test run −65%, the
structure listing −38%. Its win scales with verbosity, so it's biggest on failing test
dumps and long build logs (this clean repo is a lower bound). Niche exception: if your
loop is dominated by test runs and Pare's MCP servers are already wired in, Pare's
structured pytest posted the single best command result we measured (−72%: pytest: 13 passed, 5 tokens) — but it adds tokens on listings/greps, so rtk keeps the layer.
About to write a long, prose-heavy answer (explanations, write-ups, status) → consider caveman (terse "caveman" reply style). It trims filler/hedging/pleasantries. Small on already-concise text and it can grow terse list/structured output by adding markdown — so use it for genuinely chatty output, not for short factual answers or anything where exact wording/order matters (warnings, irreversible steps, ordered procedures).
About to generate or edit a chunk of code (implement a feature, scaffold, refactor) → Ponytail (a "lazy senior dev" rules plugin that biases you toward minimal code). It applies YAGNI: skip unrequested abstractions/helpers, prefer stdlib + one-liners, delete over add. In our benchmark it trimmed a verbose due-date implementation by ~40% (illustrative — the size depends on how much scope the baseline over-built) by dropping helpers and a derived property nobody asked for. It does ~nothing on prose — it's the mirror image of caveman. (lazy-cat performed equivalently under the identical framing; Ponytail keeps the slot for its intensity levels and explicit don't-simplify guardrails.)
None of the above / a one-file, one-line lookup → just use plain Read/Grep/Bash. The tools have setup and call overhead; on tiny tasks that overhead can cost more than it saves. Don't tool-ify trivial work.
serena cuts the dominant cost — code-read input — by returning just the relevant structure instead of whole files. It's comprehension- and edit-heavy: broad multi-file understanding plus semantic edits/renames. Best measured on listing a class's members (−71%) and whole-architecture explanation (−85%), with strong caller and call-path lookups too. It needs a language server and indexes once at session start.
If you reach for only one tool, make it serena — it's the only lever that moves the dominant
(code-reading) cost. (Runner-ups if serena is unavailable: graphify for call-path navigation,
CodeGraph as a zero-config single binary — see references/tool_links.md. Skip retrieval-bundle
tools like archex on small/medium repos: their fixed per-query overhead measured worse than
just reading the files, +15% on our suite.)
The four layers are independent, so combining one-per-layer is additive:
When a chosen tool is absent, read references/tool_links.md and install the smallest useful
set:
rtk only for noisy command loops.caveman only when prose-output brevity is the bottleneck.ponytail only when code-generation work is the bottleneck.For network installers or shell profile changes, request approval if the environment requires it.
Use these in place of the reflexive Read/Grep/Bash/"write it all out" equivalents.
Install/verify details for any missing tool: references/tool_links.md.
Connect to the serena MCP server for the project, then call tools rather than reading files:
get_symbols_overview(relative_path) — top-level symbols in a file (add depth: 1 for methods).find_symbol(name_path_pattern, relative_path, include_body=true) — a symbol's body.find_referencing_symbols(name_path, relative_path) — every caller, with context.replace_symbol_body, insert_after_symbol, rename_symbol.rtk test <test cmd> # e.g. rtk test pytest → only failures + summary
rtk read <files...> # cat with filtering
rtk grep <pattern> <p> # compact grep (groups, truncates); -t py to scope by type
rtk find <find args> # compact file listing
rtk ls / rtk tree / rtk git / rtk diff / rtk log ...
Activate terse mode (say "caveman mode" / /caveman, levels lite|full|ultra) when you're
about to emit a verbose explanation. Keep code blocks, commands, API names, error strings, and
ordered/irreversible steps verbatim — caveman compresses prose, not substance.
Enable the plugin (/ponytail lite|full|ultra) before generating an implementation — prefer those
modes so the code stays complete and readable. Its rules: don't build what wasn't requested (YAGNI),
prefer stdlib/native + one-liners, no speculative abstractions/helpers, delete over add, leave one
runnable check. It stays out of your way on input validation at real trust boundaries, error handling,
and security.
Input dominates the bill when an agent works in a codebase (it was ~88% in the benchmark), and most of that input is over-reading — pulling entire files to answer something a symbol lookup answers in a fraction of the tokens. Semantic retrieval wins because it returns just the relevant structure. rtk, caveman, and Ponytail look small in aggregate only because they target narrow slices — but they're cheap, so stack them. The one trap is treating these as interchangeable: each is excellent in its lane and ~useless outside it. When in doubt, ask "which layer is this task spending tokens on — reading code, reading command output, writing prose, or writing code?" and pick that row.
Full evidence (per-task tables, the 9-tool comparison, limitations):
references/benchmark_results.md.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub vagkaratzas/token-saviour --plugin token-saviourOther plugins' skills for the same job