| title | description | tags | |||
|---|---|---|---|---|---|
RTK Token Optimization Template |
CLAUDE.md configuration for minimizing token consumption with RTK CLI proxy |
|
Context: Using RTK (Rust Token Killer) to minimize token consumption from command outputs.
Always use RTK wrapper for these high-verbosity commands:
rtk git loginstead ofgit logrtk git statusinstead ofgit statusrtk git diffinstead ofgit diff
rtk find "*.md" .instead offind . -name "*.md"rtk read <file>instead ofcat <file>(for large files >10K lines)rtk ls .instead ofls -lartk grep "pattern"instead ofgrep -r "pattern"
rtk vitest runinstead ofpnpm testrtk pnpm listinstead ofpnpm listrtk pnpm outdatedinstead ofpnpm outdatedrtk prisma migrate statusinstead ofpnpm prisma migrate status
rtk cargo testinstead ofcargo testrtk cargo buildinstead ofcargo buildrtk cargo clippyinstead ofcargo clippy
rtk python pytestinstead ofpytest
rtk go testinstead ofgo test
rtk gh pr view <num>instead ofgh pr view <num>rtk gh pr checks <num>instead ofgh pr checks <num>
Baseline: ~150K tokens per 30-min session With RTK: ~45K tokens (70% reduction)
# Homebrew (macOS/Linux)
brew install rtk-ai/tap/rtk
# Cargo (all platforms)
cargo install rtk
# Hook-first install
rtk initCheck RTK availability:
rtk --version # Should show: rtk 0.16.0+- Quick exploration (1-2 commands): overhead not worth it
- Already using tools like Grep/Read (Claude native tools are optimized)
- Small outputs (<100 chars): minimal gain
Use RTK automatically via hook (see .claude/hooks/bash/rtk-wrapper.sh) or rtk init for hook-first setup.