rtklisted
Install: claude install-skill TsukiNi22/ai-utils
# rtk: token-minimal text for an AI
`SKILL_DIR` = the directory of this file. Helper: `python3 SKILL_DIR/scripts/compact.py [files] [--stats]
[--max-line N] [--head N]` (stdin -> stdout): strips ANSI / OSC 8 links / rulers / box lines / runs of spaces, merges
identical consecutive lines (`xN`), factors the common directory (`# $P=<dir>` then `$P/...`); `--max-line` and
`--head` are lossy, only on request. It is the generic first pass; a format designed for the content (sections 2-3)
always gets much further (xstyle: 147 KB -> 29 KB).
Unrelated to the `rtk` CLI of `RTK.md` (proxy that condenses the outputs of the shell commands Claude runs): this
skill **produces** compact formats; that tool consumes them.
## 1. Rules (the reader is an AI, never a human)
- **Keep every signal**: identifiers, locations (`file:line:col`), codes, exact error messages, numbers, counts,
versions, what changes a decision. **Drop the rest**: colors, ANSI, hyperlinks, banners, boxes, tables (-> one
record per line), alignment spaces, blank lines, progress bars, timestamps that don't matter, greetings / prose,
repeated headers, the source line when the file can be read.
- **Legend once** in a first `#` line (field order, abbreviations: `U/M/m/n`, `a=auto -=manual`); never per record.
- **Write once what repeats**: a key heading its records (`>file` then `line:col ...`), a text shared by every record
of a group written once at the end (`* CODE message => hint`), a common prefix as `$P`, `xN`