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.
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
Standard ls -la (45 lines, ~800 tokens)
Standard ls -la (45 lines, ~800 tokens)
RTK ls (12 lines, ~150 tokens)
RTK ls (12 lines, ~150 tokens)
Git Operations
Standard git push (15 lines, ~200 tokens)
Standard git push (15 lines, ~200 tokens)
RTK git push (1 line, ~10 tokens)
RTK git push (1 line, ~10 tokens)
Test Output
Standard cargo test (200+ lines on failure)
Standard cargo test (200+ lines on failure)
RTK test cargo test (~20 lines)
RTK test cargo test (~20 lines)
Git Status
Standard git status (~50 lines, ~800 tokens)
Standard git status (~50 lines, ~800 tokens)
RTK git status (1 line, ~20 tokens)
RTK git status (1 line, ~20 tokens)
Why Token Reduction Matters
Lower Costs
With Claude Sonnet 4.0 at 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)
| Command | Strategy | Savings | Example |
|---|---|---|---|
rtk ls | Tree compression | 50-70% | Aggregate dirs with counts |
rtk read | Code filtering | 40-90% | Strip comments/bodies |
rtk grep | Grouping by file | 60-80% | Truncate long lines |
rtk find | Tree hierarchy | 50-70% | Compact paths |
Git Operations (75-92% savings)
| Command | Strategy | Savings | Example |
|---|---|---|---|
rtk git status | Stats extraction | 80% | “3 modified, 1 untracked” |
rtk git diff | Stats + compact | 75% | “+142/-89, 3 files” |
rtk git log | One-line summaries | 80% | “5 commits, +142/-89” |
rtk git push | Ultra-compact | 92% | “ok ✓ main” |
Testing (90-99% savings)
| Command | Strategy | Savings | Example |
|---|---|---|---|
rtk test | Failures only | 90% | Hide passing tests |
rtk vitest | ANSI stripping | 99.5% | Show only failures |
rtk pytest | State machine | 90% | Parse test outcomes |
rtk playwright | Failure focus | 94% | Group by suite |
Linting (80-85% savings)
| Command | Strategy | Savings | Example |
|---|---|---|---|
rtk lint | Group by rule | 84% | “no-unused-vars: 23” |
rtk tsc | Group by file | 83% | “errors.ts: 5 errors” |
rtk ruff | JSON parsing | 80% | Rule-based grouping |
rtk golangci-lint | JSON parsing | 85% | Rule-based grouping |
Measuring Your Savings
RTK tracks all token savings automatically in SQLite (~/.local/share/rtk/history.db).
View Summary Stats
Example output
Example output
View Daily Breakdown
Example output
Example output
Export to CSV/JSON
Cost Analysis Example
Scenario: Mid-size TypeScript project, 8 hours/day coding with Claude CodeWithout 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 @ 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 ~800+/month.
Token Estimation Formula
RTK uses a simple heuristic for token estimation: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
Prefer rtk for repetitive commands
Commands you run 10+ times per session (git status, test, lint) benefit most.
Use aggressive filter for code reading
rtk read file.rs -l aggressive strips function bodies, saving 60-90% on large files.Let failures surface naturally
Don’t use
-v flags unless debugging. Compact output is optimized for LLMs.