Token-saviour – routing skill for AI agent tool selection (~70% fewer tokens)

vagkaratzas1 pts0 comments

skills/token-saviour/SKILL.md at main · vagkaratzas/skills · GitHub

//blob/show" data-turbo-transient="true" />

Skip to content

Search or jump to...

Search code, repositories, users, issues, pull requests...

-->

Search

Clear

Search syntax tips

Provide feedback

--><br>We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Cancel

Submit feedback

Saved searches

Use saved searches to filter your results more quickly

-->

Name

Query

To see all available qualifiers, see our documentation.

Cancel

Create saved search

Sign in

//blob/show;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up

Appearance settings

Resetting focus

You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

{{ message }}

vagkaratzas

skills

Public

Notifications<br>You must be signed in to change notification settings

Fork

Star

FilesExpand file tree

main

/SKILL.md

Copy path

Blame<br>More file actions

Blame<br>More file actions

Latest commit

History<br>History<br>History

151 lines (118 loc) · 8.13 KB

main

/SKILL.md

Copy path

Top

File metadata and controls<br>Preview

Code

Blame

151 lines (118 loc) · 8.13 KB

Raw<br>Copy raw file<br>Download raw file

OutlineEdit and raw actions

name<br>token-saviour

description<br>Pick the most token-efficient tool for a coding task instead of reflexively reading whole files or dumping raw command output into context. Use this skill BEFORE you explore or explain a codebase, locate a symbol/definition/callers, trace a call path, map an architecture, plan a feature across layers, or run verbose commands (tests, builds, git, grep, directory listings) — and whenever context/token budget, cost, or "make this use fewer tokens" comes up. It routes the scenario to serena, graphify, rtk, caveman, or plain tools, with concrete commands and the combinations to use vs. avoid. Reach for it even when the user doesn't name a tool: if you're about to `cat`/Read several files to answer a question, that's the trigger.

token-saviour: spend tokens where they matter

Reading whole files to answer a narrow question is the single most wasteful thing an agent<br>does. On a benchmark over a ~30-file Python app, swapping whole-file reads for semantic<br>retrieval cut total tokens ~66% ; the other tools each own a narrower slice. This skill<br>helps you reach for the right one before you blow the context budget — then get back to the<br>actual task.

The mental model: token cost has four independent layers , and a different tool owns each.<br>Match the tool to the layer the task actually stresses.

Layer<br>What it is<br>Tool<br>Don't bother with

Code-read input<br>Understanding code: symbols, callers, call paths, architecture<br>serena or graphify<br>rtk, caveman

Command-output input<br>Verbose stdout: tests, builds, git, grep, listings<br>rtk<br>serena, graphify

Generated output<br>Your own long, chatty replies<br>caveman<br>the input tools

Tiny/one-off work<br>plain Read/Grep/Bash<br>everything (overhead > benefit)

First, check availability. These are optional third-party tools. Run the relevant<br>--help/--version once; if a tool isn't installed, fall back to the next-best option in<br>its row (ultimately plain Read/Grep/Bash). Never pretend a tool ran — degrade gracefully.

Decision guide

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?"<br>→ graphify (a queryable code graph). It shines at navigation and impact: callers,<br>call-path tracing, cross-module flow. Measured: tracing a 4-layer call path cost 65<br>tokens vs 1,633 reading the files (−89%).

"Explain this module/class, list its methods, summarize the architecture" — or you're<br>about to edit code by symbol → serena (live LSP symbols + semantic edits). It<br>shines at broad comprehension and editing: symbol overviews across many files, and<br>refactors/renames that graphify can't do. Measured: explaining the whole architecture cost<br>243 tokens vs 3,250 (−85%); one class's methods, 55 vs 458 (−71%).

Running something noisy — test suite, build, linter, git, grep, a big directory<br>listing → rtk (compresses command output). Measured: the test run −65% , the<br>structure listing −38% . Its win scales with verbosity, so it's biggest on failing test<br>dumps and long build logs.

About to write a long, prose-heavy answer (explanations, write-ups, status) → consider<br>caveman (terse "caveman" reply style). It trims filler/hedging/pleasantries. Small on<br>already-concise text and it can grow terse list/structured output by adding markdown — so<br>use it for genuinely chatty output, not for short factual answers or anything where exact<br>wording/order matters (warnings, irreversible steps, ordered procedures).

None of the above / a one-file, one-line lookup → just use plain Read/Grep/Bash. The<br>tools have setup and call...

tool file token skill tokens code

Related Articles