name: rtk-assisted-shell description: Reduce shell output token waste on git, file reads, searches, test runs, linters, logs, and other noisy developer commands with RTK-style filtering. Use when shell-heavy work is flooding the session with logs, diffs, or command output that should be compacted before it reaches the model. license: MIT metadata: abvx_status: experimental abvx_origin: adapted
RTK Assisted Shell
Save tokens by routing noisy shell workflows through RTK-style filtering first.
Goal
Before running a command that could dump large output, prefer an RTK-shaped command or an equivalent compact shell pattern so the model receives a smaller artifact.
Default Rewrites
Prefer these forms first when RTK is installed:
git status->rtk git statusgit diff->rtk git diffgit log->rtk git logcat file,head file,tail file->rtk read filerg pattern,grep pattern->rtk grep pattern .ls, largefindflows ->rtk lsor compactfindpytest,npm test,cargo test,go test,tsc, linters ->rtk <command>docker logs,kubectl logs->rtk docker logs ...,rtk kubectl logs ...
If RTK is not installed or does not support the command, fall back to compact native shell patterns:
- file-scoped diffs, not whole history;
- bounded excerpts, not full files;
- failing tests first, not full suites;
- error-first or summary-first log views.
Workflow
- Decide whether the command is likely to be noisy.
- If yes, prefer RTK rewrite first.
- If RTK output is still insufficient, broaden one step:
- summary -> excerpt -> raw command.
- If RTK is unavailable, preserve the same compactness policy manually.
- Keep exact raw output only when it materially changes diagnosis or handoff.
When To Use Aggressively
- repo exploration;
- git state and diff inspection;
- test and lint failures;
- CI logs;
- container and cluster logs;
- broad searches over large repos.
Guardrails
- Do not use RTK if output format must remain exact for downstream parsing.
- Do not hide the only decisive stack trace or assertion.
- If RTK filtering obscures the needed detail, fall back to a narrower raw command before using a broad raw command.
Final Report
State whether RTK or manual compact output shaping was used, what decisive signal was kept, and what large output was intentionally avoided.