rtk
БесплатноЗапускает вложенные скриптыНе проверенInstall, initialize, verify, and troubleshoot RTK (Rust Token Killer) for AI coding agents. Use when you need to reduce shell-command token output, confirm…
от akillness★ 63 звезды на GitHubОб этом скилле
rtk - Rust Token Killer for AI Coding Agents
Keyword:
rtk·rust token killer·rtk init·rtk gainThe target repository is the
akillness/rtkfork ofrtk-ai/rtk. The fork tracks upstream code, while the bundledinstall.shstill downloads release artifacts fromrtk-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 rtkname-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 -gis better than local project setup - Use direct
rtkwrappers such asrtk git status,rtk read,rtk grep,rtk test, orrtk 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
rtkcommands 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 gainworks, the correct RTK is already installed. Do not reinstall unless the user wants an upgrade. - If
rtk --versionworks butrtk gainfails, the user likely has the wrongrtkpackage, usually Rust Type Kit. - If
rtkis missing entirely, move to installation.
The install and verification decision tree lives in references/install-and-verify.md.
Step 2: Install or repair RTK with the narrowest method that fits
Use the wrapper:
bash scripts/install.sh
Important installer choices:
- Default
autoprefers Homebrew on macOS when available, then the fork'sinstall.sh, then Cargo - Use
--method brewwhen Homebrew is available and the user wants a standard system-managed install - Use
--method scriptfor the repository install script path - Use
--method cargowhen the user explicitly wants a git-source build or is working from the fork - Use
--force-uninstall-wrongwhen the user already installed the wrongrtk
Examples:
bash scripts/install.sh --method brew
bash scripts/install.sh --method script
bash scripts/install.sh --method cargo --repo akillness/rtk
bash scripts/install.sh --force-uninstall-wrong
Keep these installation rules explicit:
- Always verify with
rtk gainafter installation - Treat
cargo install rtkas unsafe unless the user already confirmed the correct package - If the install script path is used, remember the script still pulls release artifacts from
rtk-ai/rtk
Step 3: Choose the correct rtk init mode for the agent
Use the init wrapper instead of hand-building flags:
bash scripts/init-agent.sh --agent claude --global
Default mapping:
- Claude Code:
--agent claude --globalfor hook-first setup - Codex:
--agent codex --globalor local--agent codex --local - Gemini CLI:
--agent gemini --global - Cursor:
--agent cursor --global - Copilot:
--agent copilot --global - OpenCode:
--agent opencode --global - Windsurf:
--agent windsurf --local - Cline / Roo Code:
--agent cline --local
Good follow-up checks:
bash scripts/init-agent.sh --agent claude --global --auto-patch
bash scripts/init-agent.sh --agent codex --global
bash scripts/init-agent.sh --agent opencode --global
bash scripts/init-agent.sh --agent claude --show
Read references/platform-init.md when the user needs the per-agent hook type, scope, or uninstall behavior.
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, orGlobtool 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
The command families and config knobs are summarized in references/commands-and-config.md.
Step 5: Diagnose failures explicitly
Use bash scripts/check-status.sh --show as the first diagnostic pass, then branch:
- Wrong binary
Установить rtk в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
BashReadWriteEditGlobGrepWebFetchВложенные файлы
FAQ
Что делает скилл rtk?
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.
Как установить скилл rtk?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл rtk запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic