Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问许可证需确认审计异常

rtkRTK 搜索

Agent Skill

rtk 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,689

周安装

69

GitHub Stars

11

下载量

546
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:rtk(RTK 搜索)
来源仓库:https://github.com/akillness/oh-my-skills
仓库路径:skills/rtk
安装命令:
npx skills add https://github.com/akillness/oh-my-skills --skill rtk
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/akillness/oh-my-skills --skill rtk

简介

RTK 是一个为 AI 编码代理优化的 CLI 代理工具,用于减少 shell 命令的 token 消耗。

  • 适合在 Rust 项目中自动重写命令输出,提升大仓库下的交互效率。
  • 支持多种初始化模式,可根据代理环境选择适配方式,必要时回退到原生命令。
  • 安装命令:npx skills add https://github.com/akillness/oh-my-skills --skill rtk
  • 使用前需确认项目是否依赖 Rust 工具链,并检查权限与网络访问能力。

SKILL.md

rtk - Rust Token Killer for AI Coding Agents

Keyword: rtk · rust token killer · rtk init · rtk gain The target repository is the akillness/rtk fork of rtk-ai/rtk. The fork tracks upstream code, while the bundled install.sh still downloads release artifacts from 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:

  1. If rtk gain works, the correct RTK is already installed. Do not reinstall unless the user wants an upgrade.
  2. If rtk --version works but rtk gain fails, the user likely has the wrong rtk package, usually Rust Type Kit.
  3. If rtk is 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 auto prefers Homebrew on macOS when available, then the fork's install.sh, then Cargo
  • Use --method brew when Homebrew is available and the user wants a standard system-managed install
  • Use --method script for the repository install script path
  • Use --method cargo when the user explicitly wants a git-source build or is working from the fork
  • Use --force-uninstall-wrong when the user already installed the wrong rtk

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 gain after installation
  • Treat cargo install rtk as 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 --global for hook-first setup
  • Codex: --agent codex --global or 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, 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

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 installed: fix the name collision and reinstall
  • Hook missing or stale: rerun the correct rtk init mode
  • Agent still verbose: confirm whether the task used shell commands or built-in tools
  • PATH issue: ensure ~/.local/bin or ~/.cargo/bin is on PATH
  • Windows wrapper failure: recommend RTK 0.23.1+

The troubleshooting matrix is in references/troubleshooting.md.

Examples

Example 1: Verify whether the correct RTK is already installed

bash scripts/check-status.sh --show

Example 2: Install from the fork-aware script path

bash scripts/install.sh --method script --repo akillness/rtk

Example 3: Repair the wrong cargo install rtk package

bash scripts/install.sh --force-uninstall-wrong --method cargo

Example 4: Claude Code global hook setup

bash scripts/init-agent.sh --agent claude --global --auto-patch

Example 5: Codex global prompt setup

bash scripts/init-agent.sh --agent codex --global

Example 6: OpenCode plugin install

bash scripts/init-agent.sh --agent opencode --global

Example 7: Use RTK directly for compact output

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

  1. Check rtk gain before reinstalling; it is the quickest way to distinguish the correct RTK from the wrong package.
  2. Use the lightest install path that meets the user's needs: Homebrew for convenience, install script for release binaries, Cargo for source-driven workflows.
  3. Treat rtk init -g as the normal path for hook-capable agents and local rules files as the normal path for Windsurf and Cline.
  4. Use rtk init --show after setup or upgrades so stale hook state is visible immediately.
  5. 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.
  6. Keep RTK_DISABLED=1 in mind for one-off passthrough commands instead of uninstalling hooks.
  7. Re-run the installer plus rtk init after RTK upgrades because hook artifacts can change between releases.
  8. When users say "RTK is broken", separate installation correctness, hook registration, and actual command path before proposing a fix.

References

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.01%
按下载量换算191

Claude

28.74%
按下载量换算157

Cursor

20.32%
按下载量换算111

Gemini CLI

10.01%
按下载量换算55

安全审计

Gen Agent Trust Hub

未通过

Socket

可疑

Snyk

可疑

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/akillness/oh-my-skills --skill rtk 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills