area:cliarea:docseffort-largeenhancementhelp wantedpriority:medium
仓库指标
- Star
- (48,085 star)
- PR 合并指标
- (平均合并 11天 1小时) (30 天内合并 45 个 PR)
描述
Sharing real-world data from one week of RTK in active use on Claude Code, plus a rtk discover scan over 30 days of session history.
Current RTK performance (1 week active)
Total commands: 744
Input tokens: 619.6K
Output tokens: 255.6K
Tokens saved: 368.1K (59.4%)
Efficiency meter: ██████████████░░░░░░░░░░ 59.4%
Solid baseline. RTK is doing its job. Two observations on intercepted commands worth flagging:
| Command | Count | Avg savings | Note |
|---|---|---|---|
rtk read |
64 | 5.8% | Most-called intercepted command, but compression is near-zero. Workflow lesson here: agents should prefer structured file-read tools over Bash, but RTK could also explore better compression for raw file content (truncation + summarization?) |
rtk gh pr diff |
18 | 38.1% | Diffs are inherently noisy; could --name-only previews help? |
rtk grep |
32 | 30.6% | Lower than expected vs git/cargo |
Top unhandled commands (from rtk discover, 30-day history)
Note: this scan covers a longer window than RTK has been active, so absolute counts are inflated relative to current usage — but the ranking of unhandled patterns is reliable.
| Command | Count (30d) | Notes |
|---|---|---|
git checkout |
63 | git checkout <branch>, git checkout -b <branch> — small output but very frequent |
npm test |
29 | Bare form. npm run test is intercepted; users have to remember the run form |
pkill -f <pattern> |
16 | Process control, minimal output but frequent |
lsof -ti:<port> |
15 | Port-to-PID lookups; tiny output but called in tight loops |
open <path> |
12 | macOS file/URL opener |
Uninterceptable by design (FYI, not asks)
$(cat file) args— 147 occurrences, by far the biggest token sink. Shell substitution happens before RTK sees the command.python3 << 'SCRIPT'heredocs — 19 occurrences. Same root cause.
These can't be fixed at the RTK layer, but documenting them prominently in the README would help users refactor (assign substitution to a var, or write heredocs to a temp file first).
Repro
rtk gain # for current efficiency snapshot
rtk discover # for unhandled command ranking
Happy to share more granular data — per-command examples, time-series, etc.