RTK — Rust Token Killer
A CLI proxy that strips the noise out of dev-command output before it ever reaches the model. 60–90% fewer tokens on routine ops — same answer, a fraction of the cost.
What it does
Most of what a coding agent reads is verbose command output: git logs with full diffs, build spew, test runs that scroll for pages. The model pays attention tokens to every line — and most of those lines are noise. RTK intercepts the commands that generate that noise and hands back a compact version instead, so the context window pays for signal, not for whitespace and stack traces you didn't ask for.
The mechanism is a Claude Code hook. When you run
git status, the hook transparently rewrites it to
rtk git status with zero overhead on your end. RTK runs the real command,
filters and compresses the output, then hands the condensed result back to the model. You never
type rtk for ordinary commands — the hook does it for you.
Before vs after
The same command travels two very different paths depending on whether RTK is in the loop.
git status command git status command rtk filter + compress Same command, same answer — a fraction of the tokens.
The commands
Normal dev commands are handled invisibly by the hook. But RTK ships a handful of meta commands you run directly to inspect what it's doing.
# inspect your savings
rtk gain
rtk gain --history # per-command breakdown
# find commands you could be saving on
rtk discover
# bypass filtering for one command (debugging)
rtk proxy <cmd>
# verify install
rtk --version
which rtk - ↑
rtk gain— see your savingsShows aggregate token savings across your session.
--historybreaks it down by command so you can see where the wins come from. - ↗
rtk discover— find missed savingsAnalyzes your Claude Code session history and surfaces commands that ran unfiltered — candidates to add RTK coverage to next.
- ⌁
Transparent hook rewriting
For everyday commands you don't type
rtkat all. The Claude Code hook rewritesgit statustortk git statussilently. Zero change to how you work.
Watch out
RTK shares its name with a completely different tool:
reachingforthejack/rtk ("Rust Type Kit"). If you install the wrong one,
rtk gain will fail or behave unexpectedly. After install, run rtk gain and which rtk to confirm you have the right binary. If rtk gain errors out, you likely have Rust Type Kit instead.
How I actually use it
My take
On a long session, command output is where tokens quietly leak. A few git logs, a failed
test run, a build with warnings — none of it matters after you've acted on it, but it all
stays in context and costs budget you could have spent on actual reasoning. RTK gives that
budget back. I check rtk gain periodically to see how much it's
saved — it's a useful reminder that context hygiene is a real lever, not just a theoretical
one.