Claude Token Optimizer
Shrinks the notes Claude Code rereads at every session start, so each uses fewer tokens
by Nadim Tuhin

by RTK AI LabsCLI toolWrite code
Shrinks shell command output before your AI coding agent reads it, to save tokens
Your agent reads the full output of a test run or a git diff, and all that extra text fills its context and costs tokens.
For DevelopersClaude Code usersCursor and GitHub Copilot users
RTK is a single Rust program that sits between your AI coding agent and the shell. When the agent runs commands such as git status, ls, grep or a test runner, RTK filters and groups the output so the agent reads less text. A hook added with rtk init rewrites those commands for you, and rtk gain shows how much was saved. It supports 100+ commands and 18 AI coding tools, and it is built for developers who use them.
A one-time hook cuts the command output your agent reads, and a built-in report shows what it saved.
Start with the first one: it is a small task you can check easily.
Example prompts written by Agent Flows Hub.
From the creator's documentation.
| Feature | What it does | Runs |
|---|---|---|
| Output filters | Compact output for git, ls, grep, test runners and 100+ other commands | Your computer |
| Agent hook | rtk init adds a hook so the agent's shell commands are rewritten automatically | Your computer |
| Savings report | rtk gain shows how much command output was cut | Your computer |
| Bypass mode | rtk bypass runs one command without filtering | Your computer |
| Many agents | Init options for Claude Code, Gemini CLI, Codex, Cursor, Cline and more | Your computer |
| Optional telemetry | A daily anonymous usage ping, off unless you consent during init | Network |
Your coding agent runs git, test and search commands all day, and their long output fills its context. Install RTK, run rtk init for your agent, and the agent receives compact versions of that output instead.
Notes by Agent Flows Hub (original project name: RTK - Rust Token Killer), written from the creator's documentation, not from running it ourselves. RTK README: install, quick start and how savings work · rtk-engine licence (BUSL-1.1)
Tell us what happened. We take a look first; if it needs paid work, you get an estimate before anything starts.