M

I made Claude Code almost 90% cheaper. Here’s how.

11 min readView source ↗

Cover image

The free tool that cuts your AI coding bill by up to 90% - without changing a single line of your code.

Your AI agent is quietly burning tokens on garbage. Every ls, every git status, every test run dumps a wall of noise straight into its context - and you pay for all of it. RTK sits in the middle and filters that noise out before it ever reaches the model. Free, open-source, one tiny binary. I dug into whether it actually works - here's the honest breakdown.

First - the honest fact-check

No hype. This one is real, it's genuinely clever, and it has clear limits you need to know before you install it.

What's real:

RTK (Rust Token Killer) is a free, open-source tool (Apache 2.0 license) that reduces how many tokens your AI coding agent burns on everyday terminal commands - the project measures 60–90% savings on common ones.

It's not a toy. ~71,000 stars and 4,400+ forks on GitHub, 240+ releases, actively developed. Written in Rust as a single binary with zero dependencies and under 10ms of overhead.

It supports 100+ commands and plugs into 15 AI coding tools - Claude Code, Copilot, Cursor, Codex, Gemini CLI, and more.

The savings are concrete. In the project's own 30-minute Claude Code benchmark, a typical session drops from ~118,000 tokens to ~23,900 - about 80% less, just from filtering command output.

What's NOT true (so you're not disappointed):

It doesn't make your model smarter. It makes it cheaper to feed.

It only intercepts shell/Bash commands. In Claude Code, the built-in Read, Grep, and Glob tools bypass it - so reading a giant file through the built-in reader still costs full price unless you route it through RTK.

There's a name clash: another unrelated "rtk" exists on crates.io. Install from the right source (below).

Every number here comes from the project's own README and docs. Sources at the end.

What it actually is, in plain English

Think about what your AI agent actually does all day. It runs ls, reads files, greps for patterns, checks git status, runs your tests. Each of those spits out a pile of text - and every line lands in the model's context window, which you pay for in tokens and which fills up until the agent starts forgetting things.

Most of that text is noise. Timestamps, permission bits, "Enumerating objects... Counting objects...", 200 lines of a passing test suite when all you needed was "2 of 15 failed."

RTK sits between your agent and the shell like a filter. The command still runs for real - but before the output reaches the model, RTK strips the junk using four tricks: it removes noise, groups similar items, truncates redundancy, and collapses repeated lines into counts.

git push goes from 15 noisy lines to a single ok main. A failed test run goes from 200+ lines to the two tests that actually broke. Same information the model needs - a fraction of the tokens.

And when a command fails, RTK saves the full raw output to a file, so the agent can read every detail if it needs to, without re-running anything.

Who this is for

This is for you if you:

Use Claude Code, Cursor, Copilot, Codex, or any agentic coding tool and keep hitting your usage limits faster than you'd like

Watch your agent's context fill up and "forget" earlier instructions on long sessions

Pay per token via API and want the bill to drop without changing how you work

Run lots of tests, git operations, and file reads in your loop (basically everyone)

It's not for you if you don't use a terminal-based AI agent, or if your workflow is almost entirely the built-in Read/Greptools rather than shell commands — RTK's biggest wins come through the Bash path.

What it costs

Nothing. Apache 2.0, fully free and open-source. No account, no subscription, no telemetry unless you explicitly opt in (it's off by default, and it never collects your source code, file paths, arguments, or secrets).

The only thing it costs you is about two minutes to install. What it saves you is tokens - which is either real money (API) or real headroom (your Claude/subscription limits).

Setup, step by step

The whole thing is a couple of commands. Full docs are in the repo: https://github.com/rtk-ai/rtk

Step 1 — Install (about 1 minute). On macOS or Linux, the cleanest way is Homebrew:

Or the install script:

Windows works too (native or WSL) — grab the binary from releases and add it to your PATH.

Step 2 - Verify it installed:

If rtk gain errors, you installed the wrong "rtk" (the name clash). Use cargo install --git https://github.com/rtk-ai/rtk instead. ⚠️

Step 3 - Hook it into your agent (the important part). One command wires up the auto-rewrite hook:

💰 This is where the savings come from: after this, when your agent runs git status, the hook silently rewrites it to rtk git status before it executes. The agent gets compact output automatically - you don't change your prompts, and you don't have to remember to type rtk.

Step 4 - Restart your agent. Then just work normally. Run a few commands and check your savings:

How much you actually save

From the project's own 30-minute Claude Code benchmark, per operation:

git add / commit / push → −92%

cargo test / npm test / pytest / go test → −90%

ls / tree, grep, git status, git log → −80%

git diff → −75%

cat / read → −70%

Total for that session: ~118,000 tokens → ~23,900. Roughly 80% cut, on the exact same work. (Their note, and mine: real numbers vary with your project size and how command-heavy your loop is.)

So what does that save you in actual money on Claude?

Here's the honest answer — and it depends entirely on how you pay for Claude, because the two paths behave completely differently.

If you're on a subscription (Pro $20 / Max 5x $100 / Max 20x $200):

RTK does not put cash back in your pocket here — you pay the same flat fee no matter what. What it saves is your usage window: you burn through your limits far slower, so you hit "you've reached your limit" walls much less often.

That still turns into real money in one specific way — it can save you an upgrade:

Staying comfortably on Pro ($20) instead of jumping to Max 5x ($100) → ~$80/month = ~$960/year you don't spend. 💰

Staying on Max 5x ($100) instead of Max 20x ($200) → ~$100/month = ~$1,200/year. 💰

It also stretches the separate API-rate credit pool that Agent SDK / headless claude -p runs draw from ($20 on Pro, $100/$200 on Max), so those credits last longer too.

⚠️ So on a subscription, the "savings" is deferred upgrades and fewer walls, not a smaller invoice. Be clear-eyed about that.

If you pay per token (API / Agent SDK):

Here it's direct cash off your bill. RTK cuts the input tokens your agent reads from command output by 60–90%. Using the project's own benchmark (~94k tokens saved per 30-minute session) for a developer doing ~4 focused hours a day, ~22 days a month (~16.5M input tokens saved/month):

Model (input rate)Saved / monthSaved / yearSonnet 5 ($3/M)$50$600Opus 4.8 ($5/M)$83$990Fable 5 ($10/M)$165$1,980

⚠️ The big honest caveat: those figures assume the saved tokens are fresh input. In real Claude Code sessions, a large share of input is cache reads billed at just 10% of the input price — so if the command output you're trimming would've been cached anyway, your real savings can be 5–10x lower (single digits to low tens of dollars a month). RTK's dollar wins are biggest on fresh, uncached output — the first time a test fails, a fresh git diff, a new file read. Treat the table as an optimistic ceiling, then check your own real number with rtk gain --all --format json, which even estimates your USD savings for you.

Bottom line: on API you save cash (tens to low hundreds a month for heavy users); on a subscription you save headroom— which is worth an upgrade tier if you're the kind of user who keeps hitting the ceiling.

What changes for you

Before, half your context window was filled with terminal exhaust — and your usage limits drained on output nobody actually reads. Your agent hit walls mid-task and started forgetting what you told it 20 minutes ago.

After, that same work produces a fraction of the tokens. Your limits stretch further, your sessions run longer before compacting, and the model's context stays focused on what matters instead of 200 lines of a passing test suite. You didn't change your workflow, your prompts, or your code. You just stopped paying to feed the model garbage.

The bottleneck in agentic coding right now usually isn't intelligence — it's context and token burn. This attacks exactly that.

Your next step (today)

Ten minutes, start to finish:

Install it: brew install rtk (or the curl script for Linux/Windows).

Verify: run rtk --version and rtk gain. If gain errors, you grabbed the wrong "rtk" — install via cargo install --git instead.

Hook it in: rtk init -g for Claude Code (or --codex / --gemini / --agent cursor for your tool), then restart your agent.

Work like normal for a day. Don't change anything else.

Check your receipts: run rtk gain --graph and rtk gain --all --format json to see exactly how many tokens — and dollars — you saved.

If you're on the API, that number is money off your bill. If you're on a subscription, it's how much longer you'll go before the next wall. Either way, you'll know in one session whether it's worth keeping — and since it's free and uninstalls with one command (rtk init -g --uninstall), the downside is basically zero.

One last thing

RTK won't write better code for you, and it won't fix a bad prompt. It does one narrow job - shrinking command output before it hits your model — and it does that job extremely well, for free. Just remember its one real blind spot: it works on shell commands, not your agent's built-in file-reading tools, so route heavy reads through rtk read / cat if you want the savings there too. Match it to how you actually work, and it quietly pays for itself from the first session. Expect it to make your agent smarter, and you'll have the wrong idea of what it is.

Tools & context: RTK (Rust Token Killer), Apache 2.0, free · works with Claude Code, Cursor, Copilot, Codex, Gemini CLI and 10+ others · macOS / Linux / Windows. Details current as of mid-2026 - versions and numbers change, so check the repo.

Sources

rtk-ai/rtk — GitHub repository (README, benchmark table, install guide, supported tools)

rtk-ai.app — official project site and user guide

Note: The basis for this article is the open-source rtk repository: https://github.com/rtk-ai/rtk

Please bookmark, RT and follow @thegreatest_sv for more alpha, AI tools and quality research.

DISCLAIMER

This article reflects my own research, experience, and opinion. Any earnings, prices, savings, statistics, tools, or results are illustrative examples only - not guarantees - and outcomes vary based on your effort, skill, timing, and factors outside anyone's control. Prices, tools, and third-party services change and may differ by the time you read this, so verify current details yourself; any brands mentioned are for information only, with no endorsement or affiliation implied. Nothing here is financial, tax, legal, medical, security, or other professional advice - do your own research, consult a qualified professional before acting, and you alone are responsible for how you use this information and for following all applicable laws and platform terms.

Article image

Article image

Prompts

rtk gain            # summary of tokens saved
rtk gain --graph    # 30-day ASCII graph
rtk discover        # find commands you're not yet saving on
rtk --version
rtk gain
rtk init -g                 # Claude Code / Copilot (default)
rtk init -g --codex         # Codex
rtk init -g --gemini        # Gemini CLI
rtk init -g --agent cursor  # Cursor
brew install rtk
 
 
curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/refs/heads/master/install.sh | sh

Related articles