# Rtk

> RTK CLI proxy for token-optimized command output. Prefix all shell commands with `rtk` to save 60-90% tokens. Use when running terminal commands — builds, tests, git operations, file searches.

- Skill: `manu-arrieta/rtk` (Agent Skill)
- Install (CLI): `npx skillmds@latest add manu-arrieta/rtk`
- Raw SKILL.md: https://api.skillmd.com/api/skills/manu-arrieta/rtk/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: Manu-Arrieta (https://skillmd.com/u/manu-arrieta)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/manu-arrieta/rtk

---


# RTK — Token-Optimized CLI

RTK is a CLI proxy that filters and compresses command outputs before they reach the LLM context, saving 60-90% tokens. Its use is NOT optional — it must be used for ALL applicable shell commands.

## Usage

Always prefix shell commands with `rtk`:

```bash
# Instead of:              Use:
git status                 rtk git status
git log -10                rtk git log -10
ls -la                     rtk ls
find . -name "*.py"        rtk find . -name "*.py"
grep -r "pattern" .         rtk grep -r "pattern" .
docker ps                  rtk docker ps
docker logs <ctr>          rtk docker logs <ctr>
npm test                   rtk test npm test
pytest                     rtk test pytest
cat file.json              rtk json file.json
diff a.txt b.txt           rtk diff a.txt b.txt
```

## When NOT to use RTK

- Installing packages (`brew install`, `pip install`, `npm install`)
- Interactive TTY commands
- `rtk` meta commands themselves
- ICM commands (`icm store`, `icm recall`, etc.)
- `specify` commands

## Commands that bypass RTK

The `PreToolUse` hook (`rtk-rewrite.json`) automatically enforces RTK prefixing. Some commands are whitelisted:

- `icm`, `specify`, `rtk`, `cd`, `corepack`, `pnpm`, `chmod`, `mkdir`, `echo`, `true`

## Token Savings Dashboard

```bash
rtk gain              # Show token savings
rtk gain --history    # Per-command savings history
rtk discover          # Find missed RTK opportunities
```

