Add rtk Token-Compression Proxy
Installs the rtk token-compression proxy into agent containers so every Bash call is filtered for 60–90% token savings.
UtilitiesAdvanced★ 30,471⑂ 12,865AI score 6/10Last updated: Aug 9, 2026
What it does
rtk is a CLI proxy that compresses the output of common dev commands (git, cargo, pytest, docker, kubectl, etc.) for 60–90% token savings. This skill installs rtk on the host, mounts it read-only into a nanoclaw agent group's containers, and registers a Claude Code PreToolUse hook so every Bash tool call is transparently routed through rtk — no CLAUDE.md instructions required.
Main steps:
- Install the rtk binary to
~/.local/bin/rtk - Identify the target agent group with
ncl groups list - Add a read-only mount via
ncl groups config add-mount - Append the
PreToolUsehook tosettings.jsonwith an idempotentjqfilter - Restart the container and verify with
rtk --version/rtk gain
Who it's for
- Operators running multiple nanoclaw agent groups who want to cut token spend
- Engineers comfortable with Docker mounts, allowlists, and hook configuration
- Teams whose agents frequently run verbose build/CI/log-heavy commands
Examples
- Measure the win: after wiring the hook, have the agent run
git statusorcargo build, then checkrtk gainfor actual savings. - Fleet rollout: list groups with
ncl groups listand repeat steps 3–5 for each agent group. - Debug a silent failure: if the container reports
rtk: command not found, re-check the mount, themount-allowlist.jsonentry, and restart per the troubleshooting section.
· · · Install guide · · ·
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the .claude/skills/add-rtk folder from the GitHub repo nanocoai/nanoclaw into my ~/.claude/skills/add-rtk/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/nanocoai/nanoclaw.git /tmp/nanoclaw && mkdir -p ~/.claude/skills && cp -r /tmp/nanoclaw/.claude/skills/add-rtk ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal and create the skills folder:
mkdir -p ~/.claude/skills - Clone the repository:
git clone https://github.com/nanocoai/nanoclaw.git /tmp/nanoclaw - Copy the skill:
cp -r /tmp/nanoclaw/.claude/skills/add-rtk ~/.claude/skills/ - Restart Claude Code and confirm
add-rtkappears in your skills list. - Check prerequisites: nanoclaw's
nclCLI, Docker, andjqmust be installed. - Run the rtk installer as described in the skill. It uses
curl | sh, so download and inspect the script first if you prefer a safer install. - Make sure
~/.local/binis listed in~/.config/nanoclaw/mount-allowlist.json, then proceed with the mount, hook edit, and container restart.
View source on GitHub ↗License: MIT