headroom
Installation
SKILL.md
Headroom — portable token-reduction skill
This skill teaches any coding agent to apply the Headroom compression techniques in-context. It does not require the Headroom binary.
When to apply which transform
Pick the transform by content type. If a tool result is shorter than ~200 tokens, skip compression — the overhead isn't worth it.
| Content the agent is about to use / paste | Apply | Helper script |
|---|---|---|
| JSON array of dicts / objects (tool results, API responses) | SmartCrusher | scripts/smart_crusher.py |
| Build / test logs (pytest, npm, cargo, make) | LogCompressor | scripts/log_compressor.py |
grep / ripgrep / ag output (file:line:content) |
SearchCompressor | scripts/search_compressor.py |
| Source code (Python, JS, TS, Go, Rust, Java, C/C++) | CodeCompressor | scripts/code_compressor.py |
| Conversation history over the context budget | RollingWindow | scripts/context_manager.py |
| Anything the model is about to write back | Output Shaper (L2) | prompts/verbosity_steering.md |