Install, initialize, verify, and troubleshoot RTK (Rust Token Killer) for AI coding agents. Use when you need to reduce shell-command token output, confirm that the correct `rtk` binary is installed, choose between Homebrew, install.sh, or Cargo installation, wire `rtk init` for Claude Code, Codex, Gemini CLI, Cursor, Copilot, Windsurf, Cline, or OpenCode, or use compact wrappers such as `rtk git status`, `rtk read`, `rtk grep`, `rtk test`, `rtk lint`, and `rtk gain`. Triggers on: rtk, rust token killer, token saver cli, rtk init, rtk gain, codex rtk, gemini rtk, opencode rtk, claude hook token reduction.
Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.
Quelldateien prüfen
Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Ein direkter Befehl überspringt den Prüf-Prompt. Prüfen Sie die Quelle, bevor Sie ihn ausführen.
Install, initialize, verify, and troubleshoot RTK (Rust Token Killer) for AI coding agents. Use when you need to reduce shell-command token output, confirm that the correct `rtk` binary is installed, choose between Homebrew, install.sh, or Cargo installation, wire `rtk init` for Claude Code, Codex, Gemini CLI, Cursor, Copilot, Windsurf, Cline, or OpenCode, or use compact wrappers such as `rtk git status`, `rtk read`, `rtk grep`, `rtk test`, `rtk lint`, and `rtk gain`. Triggers on: rtk, rust token killer, token saver cli, rtk init, rtk gain, codex rtk, gemini rtk, opencode rtk, claude hook token reduction.
The target repository is the akillness/rtk fork of rtk-ai/rtk. The fork tracks upstream code, while the bundled still downloads release artifacts from .
install.sh
rtk-ai/rtk
RTK is a high-performance CLI proxy that rewrites common shell commands into token-optimized equivalents before their output reaches an AI agent. Use this skill to verify the right RTK binary, install or repair it, choose the correct rtk init mode for the user's agent, and fall back to direct rtk commands when no automatic hook exists.
When to use this skill
Verify whether RTK is already installed and whether it is the correct project
Repair the common cargo install rtk name-collision mistake
Install RTK with Homebrew, the repository install.sh, or Cargo
Initialize RTK for Claude Code, Codex, Gemini CLI, Cursor, Copilot, Windsurf, Cline, or OpenCode
Explain when rtk init -g is better than local project setup
Use direct rtk wrappers such as rtk git status, rtk read, rtk grep, rtk test, or rtk lint
Diagnose why automatic rewriting is not happening
Explain why built-in file tools do not pass through shell hooks and when to use direct rtk commands instead
Instructions
Step 1: Verify the current installation before reinstalling anything
Run the local status helper first:
bash scripts/check-status.sh --show
Interpret the result in this order:
If rtk gain works, the correct RTK is already installed. Do not reinstall unless the user wants an upgrade.
If rtk --version works but rtk gain fails, the user likely has the wrong rtk package, usually Rust Type Kit.
Step 4: Use direct RTK commands when hooks are absent or insufficient
Automatic rewrite only applies where the agent actually executes shell commands through a supported hook or plugin. Prompt-only integrations such as Codex, Windsurf, and Cline still benefit from explicit rtk commands, but they do not transparently mutate built-in file tools.
Use direct commands when:
The agent uses a built-in Read, Grep, or Glob tool instead of shell
The workflow is in Codex and the user wants compact output immediately
The user wants deterministic verification independent of hook state
Common commands:
rtk git status
rtk read src/main.rs
rtk grep "pattern" .
rtk test cargo test
rtk lint
rtk gain
rtk read Cargo.toml
rtk grep "rtk init" README.md
rtk test cargo test
Example 8: Temporarily bypass rewrite for one command
RTK_DISABLED=1 git status
Best practices
Check rtk gain before reinstalling; it is the quickest way to distinguish the correct RTK from the wrong package.
Use the lightest install path that meets the user's needs: Homebrew for convenience, install script for release binaries, Cargo for source-driven workflows.
Treat rtk init -g as the normal path for hook-capable agents and local rules files as the normal path for Windsurf and Cline.
Use rtk init --show after setup or upgrades so stale hook state is visible immediately.
Remember that built-in read/search tools do not pass through shell hooks; switch to shell commands or direct rtk wrappers when token savings matter.
Keep RTK_DISABLED=1 in mind for one-off passthrough commands instead of uninstalling hooks.
Re-run the installer plus rtk init after RTK upgrades because hook artifacts can change between releases.
When users say "RTK is broken", separate installation correctness, hook registration, and actual command path before proposing a fix.