| name | rtk-compress |
| version | 1.15.2 |
| published | false |
| description | Save 60-90% of LLM tokens on shell commands, file reads, and test outputs. Wraps rtk CLI for compressed output. |
| tags | rtk, token-saving, compression, cli, shell, devtools |
Save 60-90% of LLM tokens on shell commands, file reads, and test outputs.
This skill wraps rtk (Rust Token Killer) — a CLI proxy that filters and compresses command outputs before they reach your LLM context.
Install
brew install rtk
rtk gain
Then copy this SKILL.md to your agent's skills directory.
Commands Reference
Smart File Operations
rtk ls .
rtk read file.rs
rtk read file.rs -l aggressive
rtk smart file.rs
Search & Diff
rtk find "*.rs" .
rtk grep "pattern" .
rtk diff file1 file2
Git Operations
rtk git status
rtk git log -n 10
rtk git diff
rtk git add
rtk git commit -m "msg"
rtk git push
rtk git pull
GitHub CLI
rtk gh pr list
rtk gh pr view 42
rtk gh issue list
rtk gh run list
Test Runners
rtk test cargo test
rtk err npm run build
rtk vitest run
rtk playwright test
rtk pytest
rtk go test
rtk cargo test
Build & Lint
rtk lint
rtk lint biome
rtk tsc
rtk next build
rtk prettier --check .
rtk cargo build
rtk cargo clippy
rtk ruff check
rtk golangci-lint run
Package Managers
rtk pnpm list
rtk pip list
rtk pip outdated
rtk prisma generate
Containers
rtk docker ps
rtk docker images
rtk docker logs <container>
rtk docker compose ps
rtk kubectl pods
rtk kubectl logs <pod>
rtk kubectl services
Data & Analytics
rtk json config.json
rtk deps
rtk env -f AWS
rtk log app.log
rtk curl <url>
rtk wget <url>
rtk summary <long command>
rtk proxy <command>
Token Savings Analytics
rtk gain
rtk gain --graph
rtk gain --history
rtk gain --daily
rtk gain --all --format json
rtk discover
rtk discover --all --since 7
Rules for the Agent
Use rtk <command> instead of bare commands whenever possible:
Always use rtk for:
rtk git status / rtk git log / rtk git diff
rtk ls -la / rtk cat <file>
rtk npm test / rtk pytest / rtk cargo test
rtk npm run build / rtk ruff check
Don't use rtk for:
- Commands whose output is piped to other tools (e.g.,
git log | grep ...)
- Scripts that parse raw output
- Commands where you need the exact full output
If rtk fails:
Fall back to the bare command. Never block a task because of compression.
Check savings:
rtk gain
rtk gain --global
Token Savings Reference
| Operation | Without rtk | With rtk | Savings |
|---|
git status | ~300 | ~60 | -80% |
git log -20 | ~2,000 | ~400 | -80% |
cat file.ts | ~2,000 | ~600 | -70% |
npm test | ~5,000 | ~500 | -90% |
pytest | ~2,000 | ~200 | -90% |
| Typical session | ~150k | ~45k | -70% |
Links