add-rtk (rtk token-compression proxy installer)
Installs the rtk CLI proxy and wires it into nanoclaw agent containers via a PreToolUse hook for 60–90% token savings on dev commands.
AutomationAdvanced★ 30,471⑂ 12,865AI score 7/10Last updated: Aug 9, 2026
What it does
- Installs the
rtkbinary on the host at~/.local/bin/rtk. - Adds a read-only mount to
/usr/local/bin/rtkinside a target agent group's containers usingncl groups config add-mount. - Injects a
PreToolUsehook (rtk hook claude) into the group'ssettings.jsonwith an idempotentjqcommand, so every Bash call is filtered through rtk without any CLAUDE.md instructions. - Covers container restart, mount/hook verification, and troubleshooting for missing binary, non-firing hooks, and permission errors.
Who it's for
- Operators running nanoclaw agent groups in Docker containers.
- Teams burning tokens on verbose output from git, cargo, pytest, docker, kubectl.
- Anyone who prefers hook-level optimization over prompt-level instructions.
Examples
- "Add rtk to group ag-1776342942165-ptgddd" → runs install, mount, hook write, and restart in order.
- Container reports
rtk: command not found→ checks the mount config and restarts the group. - After setup, run
~/.local/bin/rtk gainto see actual token savings.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/nanocoai/nanoclaw/HEAD/.claude/skills/add-rtk/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
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 && mkdir -p ~/.claude/skills && cp -r nanoclaw/.claude/skills/add-rtk ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal and clone the repo:
git clone https://github.com/nanocoai/nanoclaw.git - Copy the skill folder:
mkdir -p ~/.claude/skills && cp -r nanoclaw/.claude/skills/add-rtk ~/.claude/skills/ - Restart Claude Code and confirm add-rtk appears in your skills list.
- Prerequisites: the nanoclaw
nclCLI, Docker, andjq; run from the host since the mount verb is rejected inside containers. - Ask Claude: "install rtk for group <group-id>" to walk through Steps 1–5.
- Make sure
~/.local/binis in~/.config/nanoclaw/mount-allowlist.json, then verify withrtk --versioninside the container.
View source on GitHub ↗License: MIT