rtk-clilisted
Install: claude install-skill Raele24/ai-engineering-framework
# RTK (Rust Token Killer) — Terminal Output Compression Skill
> **Upstream Attribution:** Integrates [`rtk-ai/rtk`](https://github.com/rtk-ai/rtk) (Rust Token Killer), licensed under **Apache License 2.0**.
## 1. Purpose
Prevent raw, verbose terminal outputs (`git status`, `git diff`, `pytest`, `npm`, `cargo`, `docker`) from flooding the agent context window. Terminal observations account for 60–80% of token consumption in tool-heavy coding sessions.
## 2. Activation Conditions
- Active whenever executing high-volume shell commands via `run_command` or `Bash`.
- Automatically checks whether `rtk` is available in `PATH` and falls back to compact native CLI flags when `rtk` is absent.
## 3. Execution & Safe Fallback Protocol
### Mode A: When `rtk` Binary Is Installed (`Get-Command rtk`)
Prefix supported developer commands with `rtk` (or use `rtk init` agent hooks where configured):
```bash
rtk git status
rtk git diff
rtk git log -n 10
rtk pytest
rtk npm test
rtk gain # View cumulative token savings telemetry
```
### Mode B: Safe Fallback When `rtk` Is Not Installed (Zero-Failure Guarantee)
Never fail a task because `rtk` is not installed. When `rtk` is absent from `PATH`, use compact native CLI flags to achieve 40–70% output reduction natively:
| Verbose Command (Avoid) | Compact Native Fallback (Use When `rtk` Absent) |
| :--- | :--- |
| `git status` | `git status -sb` |
| `git log` | `git log --oneline -n 15` |
| `git diff` (on huge changesets) | `git diff --s