{"id":"9d753586-448b-4dcd-b126-b31487b8085e","slug":"token-savers","kind":"mcp","name":"token-savers","summary":"Token-saving starter pack for Claude Code, Codex and other coding agents — paste one line, the agent installs the lot.","owner":"qy177","repoUrl":"https://github.com/qy177/token-savers","license":"MIT","licenseTier":"permissive","trust":"community","stars":0,"match":null,"fewStars":true,"format":"mcp","createdAt":"2026-09-04T02:57:30.000Z","addedAt":"2026-10-21T11:33:54.614Z","logoUrl":"https://avatars.githubusercontent.com/u/15625994?v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["developer-tools","memory-knowledge"],"tags":["ai-agents","claude-code","cli","codex","coding-agents","context-window","developer-tools","gemini-cli"],"runtime":"binary","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-23T05:06:10.195Z","sample":false,"url":"https://conduits.dev/tools/token-savers","language":"","transports":["stdio"],"install":{},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"# token-savers\n\n**The token-saving starter pack for coding agents.**\n\n**English** · [简体中文](README.zh-CN.md) · [日本語](README.ja.md) · [한국어](README.ko.md) · [Português](README.pt-BR.md)\n\nYou just installed Claude Code or Codex. Now what? Everyone tells you there are\ntools that cut your token bill in half, but finding them, picking the good ones,\nand wiring them up correctly takes a weekend.\n\nThis repo is that weekend, already done.\n\n## Install\n\nPaste this into a fresh Claude Code / Codex / Gemini CLI session:\n\n```\nRead https://github.com/qy177/token-savers/blob/main/INSTALL.md and install everything in it.\n```\n\nThe agent detects your host, tells you which tools have no path on it, installs\nthe rest, and verifies each one. No script to trust, no Node version to match —\nthe agent already knows how to run commands on your machine. It will stop and\nask you at every choice that actually matters.\n\nIf your agent's web fetch stalls on the GitHub URL — some sandboxed CLIs cannot\nreach it even when your browser can — tell it to clone instead. That path is\nfast and reliable:\n\n```\ngit clone --depth 1 https://github.com/qy177/token-savers.git\n```\n```\nRead token-savers/INSTALL.md and install everything in it.\n```\n\nPrefer to do it yourself? [INSTALL.md](INSTALL.md) is written for humans too.\n\n## What you get\n\nFive tools. Each one attacks a different part of the bill.\n\n| | Tool | Cuts | Reported saving | License |\n|---|---|---|---|---|\n| 1 | [**rtk**](https://github.com/rtk-ai/rtk) | Command output before it reaches context | 60–90% on common commands | Apache-2.0 |\n| 2 | [**context-mode**](https://github.com/mksglu/context-mode) | Tool output — keeps raw data out of context entirely | 315 KB → 5.4 KB on their demo workload | ELv2 ⚠️ |\n| 3 | [**ponytail**](https://github.com/DietrichGebert/ponytail) | The code the agent writes in the first place | LOC −54%, tokens −22%, cost −20% | MIT |\n| 4 | [**caveman**](https://github.com/JuliusBrussee/caveman) | The agent's own prose | Output −65% avg | MIT / BSL-1.1 |\n| 5 | [**TOON**](https://github.com/modu-ai/moai-adk) | Structured data you hand the model | 40–60% vs JSON | Apache-2.0 |\n\nThey stack because they touch different surfaces: what goes **in** (rtk,\ncontext-mode, TOON), what the agent **does** (ponytail), and what comes **out**\n(caveman).\n\n### The one people get wrong\n\nInstalling `rtk` is not enough. The binary only helps if something actually\nrewrites your agent's commands to use it. That is what `rtk init -g` does — it\ninstalls a `PreToolUse` hook that intercepts every Bash call and swaps in the\nrtk equivalent.\n\nSkip that step and you are relying on the model to *remember* to type `rtk git\nstatus`. Most setups fail here, and the usual workaround — pasting the whole rtk\nmanual into `CLAUDE.md` — is worse than doing nothing: that file is re-sent on\nevery single turn, so you pay for the reminder forever.\n\n```bash\nrtk init -g --dry-run   # see exactly what it will change\nrtk init -g             # then do it. it is the whole point.\n```\n\nThe hook rewrites every Bash command your agent runs, in every project, so look\nat the dry run before you commit to it. `rtk init --uninstall` reverses it.\n\n**On Codex this works differently.** `rtk init --codex` writes instruction files\nrather than a hook, because Codex cannot rewrite tool input yet\n([openai/codex#18491](https://github.com/openai/codex/issues/18491)). rtk still\nhelps there, but it depends on the model choosing to use it. Hook-capable hosts\n— Claude Code, Gemini CLI, Copilot — get the enforced version.\n\n## Pick one for your agent\n\nBoth keep large amounts of data out of your context, in different ways.\n\n| Your agent | Use | Prerequisite |\n|---|---|---|\n| Claude Code · Codex · Copilot CLI · OpenClaw | [**headroom**](https://github.com/chopratejas/headroom) — local proxy that compresses traffic on its way to the API | Runs a background daemon; routes traffic through `localhost` |\n| Pi | [**open-codebase-index**](https://github.com/Helweg/open-codebase-index) — semantic code search, so the agent stops reading whole files | Bring your own embedding provider (Ollama, GitHub Copilot, OpenAI, Google, or any OpenAI-compatible endpoint) |\n\n`headroom` has no Pi integration — `headroom init` only supports `claude`,\n`codex`, `copilot`, and `openclaw`. That is the reason for the split.\n\n**Gemini CLI gets neither.** This step simply has no option there. The other\nfive tools still apply; [INSTALL.md](INSTALL.md#host-support-matrix) has the\nfull per-host matrix, including which tools have no path on which agent.\n\n## Bonus: not a token saver, still worth it\n\n[**mattpocock/skills**](https://github.com/mattpocock/skills) — Matt Pocock\nopen-sourced his `.claude` directory. 26 skills covering TDD, debugging, code\nreview, and planning. 247k stars, MIT.\n\nIt will not lower your bill. It will raise the quality of what you get for it.\nTwo of its skills do help indirectly: `handoff` compacts a conversation for\nhandover, and `wait-what` forces the agent to confirm the ask before burning a\nturn in the wrong direction.\n\n## Did it work?\n\nNever take a saving on faith — every tool here ships its own meter.\n\n```bash\nrtk verify                    # rtk: is the hook actually wired?\nrtk gain                      # rtk: tokens saved, by command\nheadroom savings              # headroom: compression over time\nheadroom doctor               # headroom: is it even routed? (see below)\n```\n\n```\n/context-mode:ctx-stats       # context-mode: per-tool breakdown\n```\n\n## Honestly\n\nA repo that claims savings owes you the caveats.\n\n- **Most numbers here are self-reported by each project.** Where a measurement\n  is independent or adversarial, this README says so. Run the meters above on\n  your own workload before believing any of it.\n\n- **caveman's benefit depends on your workload.** caveman measures output −65%.\n  But ponytail's benchmark, which ran caveman as a control arm, measured it at **+7% tokens and +3%\n  cost** on agentic coding tasks. Both can be true: shortening prose helps when\n  the agent is *talking*, and does nothing when it is *working*. If you mostly\n  code, measure before committing.\n\n- **headroom is the one step that can leave you worse off.** `headroom init`\n  re-points your agent's model provider at `localhost:8787`. If the proxy is not\n  actually listening, your agent cannot reach the API at all after a restart —\n  and the proxy logging \"listening\" is not proof that it bound the port. Check\n  `headroom doctor` and `netstat`/`lsof` before you restart anything. On a fresh\n  install it usually says `not routed`, which means you are paying full price\n  with extra steps; that is the harmless failure. The other one is not.\n\n- **This pack asks you to trust five other projects.** Installing it means\n  piping a remote script into a shell (rtk, unless you use Homebrew), running\n  unpinned npm packages via `npx`, granting lifecycle hooks the right to run on\n  every turn, and — if you take headroom — routing your API traffic through a\n  local proxy. None of that is unusual for developer tooling. All of it is still\n  a decision, and it should be yours rather than an agent's.\n\n- **`rtk init -g` is the biggest silent change here.** It installs a hook that\n  rewrites every Bash command your agent runs, in every project, until you\n  remove it. Run `rtk init -g --dry-run` first and read what it plans to touch.\n\n- **context-mode is ELv2, not OSI open source.** Free for you; there are\n  restrictions on offering it as a hosted service. caveman's engine runtime is\n  BSL-1.1 (converts to Apache-2.0 in 2030). Everything else is MIT or Apache-2.0.\n\n- **Nothing here is affiliated with this repo.** These are other people's\n  projects. Star them, not this.\n\n## License\n\nMIT. See [LICENSE](LICENSE).\n"}