Been using Claude Code heavily for some of our projects and the token costs add up fast. Found rtk (Rust Token Killer) this week — it sits as a hook between your IDE and the shell, filtering noise out of command output before it hits the model context.
What it does:
Intercepts
git status,grep,lsand strips irrelevant output before the AI sees itTracks savings so you can actually measure the difference
Zero impact on results — the AI still gets what it needs, just less noise
Setup in 2 minutes:
bash# Install
curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/master/install.sh | sh
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc
# Configure
rtk config --create
Wire it up:
Claude Code — add to ~/.claude/settings.json:
json"hooks": { "PreToolUse": [{ "matcher": "Bash",
"hooks": [{ "type": "command", "command": "rtk hook claude" }]
}]}
Cursor / Codex — run once:
bashrtk init -g
Then check your savings:
bashrtk gain
Small tool, real impact. Worth the 2 minutes if you're running AI agents on any serious codebase.
Reference : https://www.rtk-ai.app/docs/getting-started/configuration/