token-economylisted
Install: claude install-skill NDDev-it-com/rldyour-claudecode
# Token economy (rtk + Serena/LSP)
Keep the model's context small. Two non-overlapping layers:
- **rtk = shell-output compression.** The `rldyour-rtk` PreToolUse Bash hook
transparently rewrites supported commands (`git`, `pytest`/`jest`/`cargo test`,
`tsc`/`eslint`/`ruff`, `ls`/`grep`/`find`, `docker`/`kubectl`, ...) to
`rtk <cmd>` so only signal reaches context. You do not type `rtk` yourself -
the hook does it.
- **Serena/LSP = symbol-level code reads.** Navigate and edit code through
`find_symbol` / `find_referencing_symbols` / `insert_after_symbol`, not by
reading whole files.
## Rules
1. Run shell commands normally; the hook routes supported ones through rtk.
Never defeat it by demanding raw output for git/test/build/lint/ls/grep/find.
2. For large files prefer `rtk read <file>` or `rtk read <file> -l aggressive`
(signatures only); for code understanding prefer Serena symbol tools.
3. Do not duplicate layers: rtk compresses command output; Serena/LSP handles
symbol reads and edits.
4. Do not wrap interactive commands (editors, REPLs); the hook already skips
unknown/interactive commands (graceful passthrough).
5. On a failing command rtk saves full output to a tee log - read that log
instead of re-running the command.
6. Check savings with `/rtk-gain`.
## Scope limits
- The hook fires only on the **Bash tool**. Native Read/Grep/Glob and MCP tool
output do not pass through rtk. To compress those, use shell equivalents
(`rtk grep`, `rtk