Skip to main content
RTK saves 60-90% of tokens on common development operations by filtering command output before it reaches your LLM. This translates to lower costs, faster responses, and fewer context limit issues.

30-Minute Claude Code Session Breakdown

Real-world savings: A typical 30-minute coding session uses ~150,000 tokens without RTK. With RTK, this drops to ~45,000 tokens—a 70% reduction.
| Operation | Frequency | Standard | rtk | Savings | |-----------|-----------|----------|-----|---------|| | ls / tree | 10× | 2,000 | 400 | -80% | | cat / read | 20× | 40,000 | 12,000 | -70% | | grep / rg | 8× | 16,000 | 3,200 | -80% | | git status | 10× | 3,000 | 600 | -80% | | git diff | 5× | 10,000 | 2,500 | -75% | | git log | 5× | 2,500 | 500 | -80% | | git add/commit/push | 8× | 1,600 | 120 | -92% | | npm test / cargo test | 5× | 25,000 | 2,500 | -90% | | ruff check | 3× | 3,000 | 600 | -80% | | pytest | 4× | 8,000 | 800 | -90% | | go test | 3× | 6,000 | 600 | -90% | | docker ps | 3× | 900 | 180 | -80% | | Total | | ~118,000 | ~23,900 | -80% |
Estimates based on medium-sized TypeScript/Rust projects. Actual savings vary by project size and command usage patterns.

Real Examples: Before & After

Directory Listing

Token savings: 81% (650 tokens saved)

Git Operations

Token savings: 95% (190 tokens saved)

Test Output

Token savings: 90% (180+ lines hidden)

Git Status

Token savings: 97% (780 tokens saved)

Why Token Reduction Matters

Lower Costs

With Claude Sonnet 4.0 at 3/MTokinput,saving100Ktokensperday=∗∗3/MTok input, saving 100K tokens per day = **300/month savings**.

Faster Responses

Smaller context = faster LLM processing. RTK reduces latency by 20-40% on large commands.

Context Limits

Claude has a 200K token context window. RTK helps you stay under the limit on complex projects.

Better Focus

LLMs perform better with concise, relevant context. RTK removes noise and highlights failures.

Token Savings by Command Type

File Operations (50-80% savings)

Git Operations (75-92% savings)

Testing (90-99% savings)

Linting (80-85% savings)

Measuring Your Savings

RTK tracks all token savings automatically in SQLite (~/.local/share/rtk/history.db).

View Summary Stats

View Daily Breakdown

Export to CSV/JSON

Cost Analysis Example

Scenario: Mid-size TypeScript project, 8 hours/day coding with Claude Code

Without RTK

  • Commands per day: ~500
  • Avg tokens per command: ~300
  • Daily token usage: 150K tokens
  • Monthly usage: 3.3M tokens
  • Monthly cost (Claude Sonnet 4.0 @ 3/MTok):∗∗3/MTok): **9.90**

With RTK

  • Commands per day: ~500
  • Avg tokens per command: ~60 (80% reduction)
  • Daily token usage: 30K tokens
  • Monthly usage: 660K tokens
  • Monthly cost: $1.98
  • Monthly savings: $7.92 (80%)
Scales with usage: Teams with 10 developers save ~80/month∗∗.Enterpriseteams(100+devs)cansave∗∗80/month**. Enterprise teams (100+ devs) can save **800+/month.

Token Estimation Formula

RTK uses a simple heuristic for token estimation:
Approximation: ~4 characters per token (GPT-style tokenization) This is a rough estimate but accurate enough for tracking purposes. Real tokenization varies by model (Claude uses a different tokenizer than GPT), but the 4:1 ratio is a good average.

Filter Effectiveness

Not all filters save the same percentage. Here’s how effectiveness varies:

High Effectiveness

90-99% savings
  • Test output (failures only)
  • Git operations (push/pull)
  • Package managers (install)

Medium Effectiveness

70-85% savings
  • Linting (grouped errors)
  • Git diffs (stats mode)
  • Directory listings

Low Effectiveness

40-60% savings
  • Code reading (minimal filter)
  • Log files (deduplication)
  • JSON inspection

Best Practices for Maximum Savings

1

Use the hook

Install rtk init -g for 100% adoption. Manual prefixing leads to ~60-70% adoption.
2

Prefer rtk for repetitive commands

Commands you run 10+ times per session (git status, test, lint) benefit most.
3

Use aggressive filter for code reading

rtk read file.rs -l aggressive strips function bodies, saving 60-90% on large files.
4

Let failures surface naturally

Don’t use -v flags unless debugging. Compact output is optimized for LLMs.
5

Review savings monthly

Run rtk gain --monthly to track trends and identify optimization opportunities.