Guide · Agent skill
How to use the add-rtk agent skill: install rtk in NanoClaw containers
Updated · written with AI from the project's own documentation and checked against our catalogue data
The add-rtk skill is an install recipe for NanoClaw, an agent setup that runs agents in containers. It installs rtk, a command-line proxy that shortens the output of common developer commands such as git, cargo, pytest, docker and kubectl before that output reaches the AI model. The skill says this can save 60-90% of tokens on those commands. This guide explains what the skill changes, how to run it, and how to check it works.
Quick start
- 1Download and unzip the skill. Download the add-rtk ZIP from this page and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder. In the Claude apps you can upload it under Settings → Capabilities → Skills instead.
- 2Install rtk on the host. Run the install script from the rtk GitHub repository and confirm the binary with rtk --version. Move it to ~/.local/bin/rtk if it landed elsewhere.
- 3Find the agent group ID. Run ncl groups list and note the ID of the group you want to change.
- 4Mount rtk into the container. Run ncl groups config add-mount with the host path ~/.local/bin/rtk, the container path /usr/local/bin/rtk and the --ro flag, after adding ~/.local/bin to the mount allowlist.
- 5Add the PreToolUse hook. Run the jq command from Step 4 against the group's settings.json so every Bash call goes through rtk hook claude.
- 6Restart and verify. Restart the group with ncl groups restart, then run rtk --version inside the container and ask the agent to run git status.
What is an agent skill, and what does add-rtk make the agent do?
An agent skill is a folder with a SKILL.md file that gives an AI agent step-by-step instructions for a task. This skill is written for the NanoClaw project's .claude/skills directory and is named add-rtk.
Once applied, every Bash tool call made by the agent in the target agent group is passed through rtk automatically. The skill does this with a Claude Code PreToolUse hook, so the agent does not need extra instructions in CLAUDE.md.
- An rtk binary is installed at ~/.local/bin/rtk on the host.
- That binary is mounted read-only at /usr/local/bin/rtk inside the agent group's containers.
- A PreToolUse hook in the group's settings.json filters Bash calls through rtk.
What you need before you install add-rtk
The steps assume a working NanoClaw setup. The skill depends on the ncl command-line tool, an existing agent group, and the NanoClaw data folder layout. It is not meant for setups that do not use NanoClaw agent containers.
- NanoClaw with the ncl command-line tool and at least one existing agent group
- Docker, with containers running and restartable
- jq, used to edit settings.json
- Network access to fetch the rtk install script from GitHub
- Write access to ~/.local/bin and to ~/.config/nanoclaw/mount-allowlist.json
How do you install the add-rtk skill?
Download the ZIP for add-rtk from this page and unzip it. For a personal setup, place the skill folder in ~/.claude/skills/. For a single project, place it in that project's .claude/skills/ folder.
In the Claude apps, you can instead upload the skill under Settings → Capabilities → Skills.
How do you run the add-rtk steps?
Run the steps in order. The skill's SKILL.md lists five steps: install rtk on the host, identify the agent group, mount rtk into the container config, add the PreToolUse hook, and restart the container. Repeat steps 3 to 5 for each group you want to cover.
- Step 1: install rtk on the host and confirm it with rtk --version.
- Step 2: list agent groups with ncl groups list and note the group ID.
- Step 3: add the read-only mount with ncl groups config add-mount. The mount also needs ~/.local/bin in the allowlist at ~/.config/nanoclaw/mount-allowlist.json.
- Step 4: add the PreToolUse hook to the group's settings.json using jq. The script removes any existing rtk hook first, so re-running it does not create duplicates.
- Step 5: restart the container with ncl groups restart.
ncl groups listHow do you check that rtk is working?
Check that the binary runs inside the container. If it does, ask the agent to run a supported command such as git status. The skill says rtk intercepts the call silently, so you will not see a separate notice. To see how much has been saved, run the gain command on the host.
docker exec "$(docker ps --filter "name=<group-id>" --format '{{.Names}}' | head -1)" rtk --versionHow do you trigger add-rtk with natural requests?
You do not need a special phrase. Ask your NanoClaw operator assistant in plain language to add rtk to an agent group, for example: "Install rtk token compression for my coding group" or "Set up rtk so git and pytest output is compressed." The assistant should use the add-rtk instructions to carry out the steps. Name the group if you have more than one.
- "Add rtk token compression to the group ag-1776342942165-ptgddd."
- "Check whether rtk is mounted in my coding agent's container."
- "Remove rtk from the research group."
What are the safety notes for add-rtk?
This skill runs scripts and uses the network. Step 1 downloads and runs an install script from raw.githubusercontent.com. Read it before you run it if you have concerns. The skill also writes to ~/.local/bin, to the mount allowlist, and to each group's settings.json.
The mount and config verbs are operator-only and run on the host. They are rejected from inside a container. Consider that rtk compresses what the agent sees, so it may hide details you need when debugging.
- Step 1 runs a remote install script fetched with curl.
- Mount changes are made with host-only commands.
- The skill edits settings.json and the mount allowlist.
- REMOVE.md reverses the mount and hook changes.
How do you remove add-rtk?
The skill includes REMOVE.md. Run its steps once for each agent group that had rtk wired. Removal deletes the rtk mount with ncl groups config remove-mount and deletes only the rtk Bash hook from settings.json, leaving other PreToolUse entries intact. Both steps are safe to re-run.
ncl groups config remove-mount --id <group-id> --host ~/.local/bin/rtk --container /usr/local/bin/rtkWhat people use it for
- Lowering token costs for long coding sessions where the agent runs git status, git diff and log commands often.
- Reducing output size for test runs such as pytest or cargo test inside an agent container.
- Keeping docker and kubectl output shorter for an operator who checks container state through an agent.
- Applying the same setup to several NanoClaw agent groups by repeating the steps for each group ID.
Frequently asked questions
Is the add-rtk skill free?
The add-rtk skill is published under the MIT licence, as stated on this page. The source does not list any pricing for rtk or NanoClaw, so check their own repositories for those terms.
What do I need to use add-rtk?
You need NanoClaw with the ncl command-line tool and an existing agent group, Docker with restartable containers, jq, network access to fetch the rtk install script from GitHub, and write access to ~/.local/bin and ~/.config/nanoclaw/mount-allowlist.json.
Does add-rtk work outside NanoClaw?
The source says the steps depend on the ncl command and the NanoClaw data folder layout. It is not written for setups that do not use NanoClaw agent containers.
Why can't I see that rtk is running?
The skill says rtk intercepts supported commands silently. To confirm it, check that rtk --version works inside the container and run rtk gain on the host to see savings.
What if rtk: command not found appears in the container?
The mount was probably not applied or the container was not restarted. Run ncl groups config get --id <group-id> to look for the /usr/local/bin/rtk mount, then restart the group with ncl groups restart.
How do I remove add-rtk?
Follow REMOVE.md. Remove the mount with ncl groups config remove-mount and delete the rtk Bash hook from settings.json for each group. Both steps are idempotent.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use add-rtk if you run NanoClaw agent groups that make many shell calls to git, test runners or container tools and you want smaller command output. Skip it if you do not use NanoClaw, or if you need full unfiltered output for debugging, since rtk compresses what the agent sees.
Download the skill