
Add rtk Token Compression
Routes agent shell commands through rtk to cut token use on dev tools like git and docker
- Repository
- nanocoai/nanoclaw
- Stars
- 31,072
- Licence
- MIT
- Files
- 2 files
What it does
This skill installs rtk, a small command-line proxy that shortens the output of common developer commands such as git, cargo, pytest, docker and kubectl before it reaches the AI model. The skill claims this saves 60-90% of tokens. It sets this up inside NanoClaw agent containers by mounting the rtk program and adding a Claude Code PreToolUse hook so every Bash call is filtered automatically.
Great for
- Developers running NanoClaw agent groups who make many shell calls to git, test runners or container tools
- Operators who want to lower token costs for long coding sessions inside containers
Skip it if
- Setups that do not use NanoClaw agent containers, since the steps depend on its ncl command and data folder layout
- Users who need full, unfiltered command output for debugging, because rtk compresses what the agent sees and may hide details
Try asking
- “Install rtk into my NanoClaw agent group so git and pytest output uses fewer tokens”
- “Set up the rtk PreToolUse hook for group ag-1776342942165-ptgddd”
- “Check how many tokens rtk has saved so far”
Install in 3 steps
- 1
Download the skill
The ZIP contains the 2 original files, the MIT licence and an attribution note.
add-rtk.zip - 2
Add it to your agent
Claude Code (all projects)
mkdir -p ~/.claude/skills && unzip add-rtk.zip -d ~/.claude/skills/Claude Code / Agent SDK (this project only)
mkdir -p .claude/skills && unzip add-rtk.zip -d .claude/skills/Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.
- 3
Ask for the task
No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.
Get better results
- Review the rtk install script at the URL in Step 1 before piping it to sh, since it runs with your user's permissions
- Run the verify steps after restarting the group to confirm the binary is executable inside the container
- Use REMOVE.md to undo the changes if rtk filtering causes missing output
What's inside
- REMOVE.md
- SKILL.md
Redistributed unmodified from nanocoai/nanoclaw under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.