Skip to content
second brain

One Liner

2026-06-05 10:20

RTK cuts token waste from Bash tool calls. Caveman cuts token waste from assistant prose.

RTK = Rust Token Killer.

It acts as CLI proxy for Claude Code shell calls and rewrites commands into token-optimized versions, especially noisy dev commands like git status and git diff.

  • brew install rtk
  • rtk --version

  • add PreToolUse hook for Bash in ~/.claude/settings.json
  • command: rtk hook claude

  • create ~/.claude/RTK.md
  • reference it from CLAUDE.md with @RTK.md

  • rtk gain
  • rtk gain --history
  • rtk discover
  • rtk proxy <cmd>

  • name collision possible with another rtk binary
  • if rtk gain fails, check which binary gets called

Caveman compresses assistant communication.

Goal: drop filler, articles, and pleasantries while keeping technical accuracy.

  • claude mcp add-from-marketplace caveman@caveman

  • SessionStartcaveman-activate.js
  • UserPromptSubmitcaveman-mode-tracker.js

  • caveman-config.js
  • caveman-stats.js
  • statusline scripts

  • lite = mild compression
  • full = default, terse but readable
  • ultra = maximum compression

  • /caveman lite|full|ultra
  • /caveman-commit
  • /caveman-review
  • /caveman-compress
  • /caveman-help

  • stop caveman
  • normal mode

  • hook scripts may hardcode Node path
  • better use plain node from $PATH

Two productivity plugins for Claude Code: RTK (token savings on CLI tool calls) and Caveman (compressed communication mode).
1. RTK (Rust Token Killer)
RTK is a CLI proxy that intercepts shell commands from Claude Code and rewrites them into token-optimized versions — cutting 60-90% of token usage on dev operations like `git status`, `git diff`, etc.
Install
brew install rtk
rtk --version # verify install
Hook setup
RTK integrates with Claude Code via a PreToolUse hook on the Bash matcher. Add to ~/.claude/settings.json:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"command": "rtk hook claude"
}
]
}
}
This intercepts every Bash tool call and transparently rewrites commands to rtk proxies (e.g. git status → rtk git status).
Documentation reference
Create ~/.claude/RTK.md with usage reference, then reference it from your CLAUDE.md:
@RTK.md
RTK.md should document:
- Meta commands (run directly, not proxied):
- rtk gain — show token savings analytics
- rtk gain --history — command usage history with savings
- rtk discover — analyze Claude Code history for missed optimization opportunities
- rtk proxy <cmd> — execute raw command without filtering (debugging)
- Hook-based usage — all other commands are automatically rewritten by the hook. No manual intervention needed.
Verify it works
rtk gain # should show savings stats, not "command not found"
Warning: Name collision exists with reachingforthejack/rtk (Rust Type Kit). If rtk gain fails, check which rtk points to the correct binary.
2. Caveman
Caveman is a Claude Code plugin that compresses assistant communication — cutting ~75% of filler tokens while keeping full technical accuracy. Think: smart caveman who drops articles, filler words, and pleasantries but keeps every technical detail.
Install
Install from the Claude Code marketplace:
claude mcp add-from-marketplace caveman@caveman
This registers it in ~/.claude/settings.json automatically.
How it works
Caveman uses two hooks (user-level, stored in ~/.claude/hooks/):
Hook | Script | Purpose
SessionStart | caveman-activate.js | Injects "CAVEMAN MODE ACTIVE" instructions at session start
UserPromptSubmit | caveman-mode-tracker.js | Re-injects reminder per prompt, tracks intensity level
Supporting files installed alongside:
- caveman-config.js — configuration
- caveman-stats.js — token savings tracking (via /caveman-stats)
- Statusline scripts for mode display
Intensity levels
Switch with /caveman lite|full|ultra:
Level | Effect
lite | Drop filler, keep grammar mostly intact
full (default) | Drop articles, fragments OK, short synonyms
ultra | Maximum compression, telegraphic style
Skills provided
- /caveman lite|full|ultra — switch intensity
- /caveman-commit — ultra-compressed commit messages
- /caveman-review — ultra-compressed code review comments
- /caveman-compress — compress memory/doc files into caveman format
- /caveman-help — quick reference card
Disable
Say stop caveman or normal mode in conversation to revert to standard English.
Important caveat
Node path hardcoding: The hook commands may hardcode the node binary path (e.g. /opt/homebrew/Cellar/node/XX.Y.Z/bin/node). This breaks when Homebrew bumps the node version. Fix: edit the hook scripts to use plain node instead of the absolute path, so it resolves from $PATH.
Verify both are active
Start a new Claude Code session. You should see:
- SessionStart:startup hook success: CAVEMAN MODE ACTIVE — Caveman is injecting
- Bash commands getting rewritten transparently — RTK is proxying
Run rtk gain to confirm token savings are being tracked
Summary
Plugin | Install method | Integration | What it saves
RTK | Homebrew | PreToolUse hook on Bash | 60-90% tokens on CLI output
Caveman | Claude Code marketplace | SessionStart + UserPromptSubmit hooks | ~75% tokens on assistant prose

https://github.com/ilyas-muhammad/useful-prompt-collection/blob/main/claude-code-rtk-caveman-setup.md