token-saver
This skill guides and performs the installation and configuration of tools optimized to reduce token consumption (input/output) and context compression in coding LLMs (Claude Code, Codex, OpenCode, Agy).
The configurable tools are:
- rtk (Rust Token Killer): CLI command proxy that filters redundant outputs from builds, lints, tests, and git, generating 60-90% savings in local operations.
- caveman: Ultra-compressed communication mode that reduces ~75% of output token consumption by speaking in a telegraphic style (without linking verbs or formalities) without losing technical precision.
- graphify: Codebase mapping into a structured knowledge graph. Allows the LLM to query relationships between files and god nodes without linearly scanning or cross-reading files.
- context-mode: MCP/Plugin that intercepts giant outputs from tools (APIs, long logs, dumps) and stores them in a local FTS5 database, returning only compressed summaries to the active context window.
How to Calculate Token Savings for Each Tool
rtk:
- Command:
rtk gain - What it shows: Report of tokens saved in intercepted commands.
- Command with history:
rtk gain --history
- Command:
caveman:
- Calculation: Compare character/token counts generated in normal mode vs caveman mode.
- Example: A 400-token response drops to
100 tokens. Typical saving is **75%** on output tokens.
graphify:
- Saving: Reduces input token consumption when searching the codebase.
- Instead of reading 10 related files via grep/search (e.g., 20k-50k tokens), the LLM queries the graph in
graphify-out/directly, consuming less than 1k tokens.
context-mode:
- Saving: Prevents context overflow from console dumps/logs.
- A 50k-token build log is summarized to 1k tokens in the active window, while keeping the full log searchable via the local SQLite database. Typical saving of 90-98% on long logs and extensive outputs.
Skill Execution Flow
When this skill is activated:
Ask User (Iterative): Ask the user for each tool if they want to install/configure it, and the scope of the installation:
- rtk: Install? [y/n] -> Scope: [g]lobal or [p]roject?
- caveman: Install/Activate? [y/n] -> Scope: [g]lobal or [p]roject?
- graphify: Install/Configure? [y/n] -> Scope: [g]lobal or [p]roject?
- context-mode: Install/Configure? [y/n] -> Scope: [g]lobal or [p]roject?
Run Setup Script: Run the helper script
skills/token-saver/scripts/setup-token-saving.sh(with BypassSandbox when necessary) to perform actions based on the user's selection.Confirm and Teach: Display a summary of what was configured and quick usage instructions (command cheat-sheet) for each activated tool.