{"id":"3ee0ed1c-decf-462c-bf81-9fe80a5ce01e","slug":"token-saviour","kind":"skill","name":"token-saviour","summary":"Agent skill that routes each coding task to the most token-efficient tool per layer: serena for code reads, rtk for command output, caveman for prose, Ponytail for generated code — −70% tokens measure","owner":"vagkaratzas","repoUrl":"https://github.com/vagkaratzas/token-saviour","license":"MIT","licenseTier":"permissive","trust":"community","stars":11,"match":null,"fewStars":false,"format":"skill","createdAt":"2026-07-08T06:57:14.000Z","addedAt":"2026-10-14T06:09:28.978Z","logoUrl":"https://avatars.githubusercontent.com/u/32259775?u=e3e5551bb03bf6a5617b5bdd7e073ac483300e43&v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["developer-tools","productivity","memory-knowledge"],"tags":["claude-code","codex","context-window","llm-cost","token-efficiency"],"runtime":"binary","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-26T04:35:13.385Z","sample":false,"url":"https://conduits.dev/tools/token-saviour","language":"","transports":["stdio"],"install":{},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"<p align=\"center\">\n  <picture>\n    <img src=\"assets/logo.png\" width=\"220\" alt=\"Protect thy tokens\">\n  </picture>\n</p>\n\n# token-saviour\n\n**Spend tokens where they matter.** An agent skill that routes every coding task to the most\ntoken-efficient tool for the layer it stresses — instead of reflexively reading whole files,\ndumping raw command output into context, or writing more code than asked.\n\nToken cost has **four independent layers**, and a different tool owns each. token-saviour picks\none winner per layer — the best measured combination from a\n[9-tool benchmark](https://github.com/vagkaratzas/token-consumption-benchmark) on a realistic\nPython codebase:\n\n| Layer | Tool | Measured |\n|-------|------|----------|\n| Code-read **input** (symbols, callers, call paths, architecture) | [serena](https://github.com/oraios/serena) | **−66%** alone — the dominant cost |\n| Command-output **input** (tests, builds, git, grep, listings) | [rtk](https://github.com/rtk-ai/rtk) | −65% on a test run, −36% on command tasks |\n| Generated **prose output** (chatty replies, write-ups) | [caveman](https://github.com/juliusbrussee/caveman) | −6% on prose answers (grows with chattiness) |\n| Generated **code output** (implementations you write) | [Ponytail](https://github.com/DietrichGebert/ponytail) | ~−40% on a verbose implementation (illustrative) |\n\nStacked (serena + rtk + caveman): **−69.6% total tokens** on the comprehension suite. For\ncode-generation work, swap caveman → Ponytail (≈ −64%).\n\nThe picks were re-validated (2026-07) against newer entrants — archex, Pare, lazy-cat — and every\nincumbent held its layer. The runner-ups, the niches where they flip (e.g. Pare's structured\n`pytest` for test-dominated loops), and the full evidence live in\n[`skills/token-saviour/references/`](skills/token-saviour/references/).\n\n## Install\n\n### Claude Code (plugin)\n\n```\n/plugin marketplace add vagkaratzas/token-saviour\n/plugin install token-saviour@token-saviour\n```\n\nOr as a plain personal skill, no plugin system involved:\n\n```bash\ngit clone https://github.com/vagkaratzas/token-saviour\nmkdir -p ~/.claude/skills\ncp -r token-saviour/skills/token-saviour ~/.claude/skills/\n```\n\n### Codex\n\n```bash\ncodex plugin marketplace add vagkaratzas/token-saviour\ncodex plugin add token-saviour@token-saviour\n```\n\nIn Codex the skill is invoked with `@token-saviour`. The VS Code Codex extension and the Codex\napp read `AGENTS.md`, which this repo ships — so it also works from the repo root with no\nsetup, and `cp AGENTS.md ~/.codex/AGENTS.md` makes the always-on rules global.\n\n### Any other agent\n\nCopy `AGENTS.md` (compact, always-on ruleset) or `skills/token-saviour/SKILL.md` (full\nplaybook) into whatever instruction file your agent reads.\n\n## What the skill does\n\n1. **Classifies the task** by the layer it stresses: reading code, reading command output,\n   writing prose, or writing code.\n2. **Routes to that layer's tool** with concrete commands (serena MCP calls, `rtk` proxies,\n   caveman terse mode, Ponytail rules) — and degrades gracefully to plain Read/Grep/Bash when a\n   tool isn't installed (install/verify commands in\n   [`references/tool_links.md`](skills/token-saviour/references/tool_links.md)).\n3. **Refuses anti-patterns**: two code-read tools at once, rtk for comprehension, caveman on\n   code, Ponytail on prose, tooling-up trivial one-line lookups.\n4. **Announces what it used**: `🪙 token-saviour: serena + rtk + caveman`.\n\n## The tools it routes to (install the smallest set you need)\n\n- **serena** — `uv tool install -p 3.13 serena-agent` — the one code-read tool (LSP symbols;\n  also does semantic edits/renames).\n- **rtk** — `brew install rtk` or `cargo install --git https://github.com/rtk-ai/rtk` — add\n  only for noisy command loops.\n- **caveman** — see [repo](https://github.com/juliusbrussee/caveman) — add only when prose\n  brevity is the bottleneck.\n- **Ponytail** — `/plugin marketplace add DietrichGebert/ponytail` — add only when\n  code-generation work is the bottleneck.\n\n## Evidence\n\nAll numbers come from [token-consumption-benchmark](https://github.com/vagkaratzas/token-consumption-benchmark):\nreal tools, real artifacts, one tokenizer (`tiktoken o200k_base`), per-task tables, and honest\nlimitations (modeled-not-metered, small clean codebase, single run). Summary:\n[`references/benchmark_results.md`](skills/token-saviour/references/benchmark_results.md).\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n"}