跳到正文
cccskills
免费在 GitHub 公开

rtk-optimizer

Suggests running verbose shell commands through RTK, a tool that condenses command output, and executes them after confirmation. It helps reduce the text an AI agent processes when reviewing Git history, tests, builds, and files.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

Wrap high-verbosity shell commands with RTK to reduce token consumption. Use when running git log, git diff, cargo test, pytest, or other verbose CLI output that wastes context window tokens.

集成工具GitHub
查看安装方法

适用场景

  • Reducing output when reviewing Git history and diffs
  • Condensing long test and build results
  • Reading large files with less command output
  • Tracking token savings during a session

包含的文件(1)

  • SKILL.md4.1 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

RTK optimizer skill

Purpose: Automatically suggest RTK wrappers for high-verbosity commands to reduce token consumption.

How it works

  1. Detect high-verbosity commands in user requests
  2. Suggest RTK wrapper if applicable
  3. Execute with RTK when user confirms
  4. Track savings over session

Supported commands

Git (>70% reduction)

  • git log → rtk git log (92.3% reduction)
  • git status → rtk git status (76.0% reduction)
  • find → rtk find (76.3% reduction)

Medium-Value (50-70% reduction)

  • git diff → rtk git diff (55.9% reduction)
  • cat <large-file> → rtk read <file> (62.5% reduction)

JS/TS Stack (70-90% reduction)

  • pnpm list → rtk pnpm list (82% reduction)
  • pnpm test / vitest run → rtk vitest run (90% reduction)

Rust Toolchain (80-90% reduction)

  • cargo test → rtk cargo test (90% reduction)
  • cargo build → rtk cargo build (80% reduction)
  • cargo clippy → rtk cargo clippy (80% reduction)

Python & Go (90% reduction)

  • pytest → rtk python pytest (90% reduction)
  • go test → rtk go test (90% reduction)

GitHub CLI (79-87% reduction)

  • gh pr view → rtk gh pr view (87% reduction)
  • gh pr checks → rtk gh pr checks (79% reduction)

File operations

  • ls → rtk ls (condensed output)
  • grep → rtk grep (filtered output)

Activation examples

User: "Show me the git history" Skill: Detects git log → Suggests rtk git log → Explains 92.3% token savings

User: "Find all markdown files" Skill: Detects find → Suggests rtk find "*.md" . → Explains 76.3% savings

Installation check

Before first use, verify RTK is installed:

rtk --version  # Should output: rtk 0.16.0+

If not installed:

# Homebrew (macOS/Linux)
brew install rtk-ai/tap/rtk

# Cargo (all platforms)
cargo install rtk

Usage pattern

# When user requests high-verbosity command:

1. Acknowledge request
2. Suggest RTK optimization:
   "I'll use `rtk git log` to reduce token usage by ~92%"
3. Execute RTK command
4. Track savings (optional):
   "Saved ~13K tokens (baseline: 14K, RTK: 1K)"

Session tracking

Optional: Track cumulative savings across session:

# At session end
rtk gain  # Shows total token savings for session (SQLite-backed)

Edge cases

  • Small outputs (<100 chars): Skip RTK (overhead not worth it)
  • Already using Claude tools: Grep/Read tools are already optimized
  • Multiple commands: Batch with RTK wrapper once, not per command

Configuration

Enable via CLAUDE.md:

## Token Optimization

Use RTK (Rust Token Killer) for high-verbosity commands:
- git operations (log, status, diff)
- package managers (pnpm, npm)
- build tools (cargo, go)
- test frameworks (vitest, pytest)
- file finding and reading

Metrics (verified)

Based on real-world testing:

  • git log: 13,994 chars → 1,076 chars (92.3% reduction)
  • git status: 100 chars → 24 chars (76.0% reduction)
  • find: 780 chars → 185 chars (76.3% reduction)
  • git diff: 15,815 chars → 6,982 chars (55.9% reduction)
  • read file: 163,587 chars → 61,339 chars (62.5% reduction)

Average: 72.6% token reduction

Limitations

  • 446 stars on GitHub, actively maintained (30 releases in 23 days)
  • Not suitable for interactive commands
  • Rapid development cadence (check for breaking changes)

Recommendation

Use RTK for: git workflows, file operations, test frameworks, build tools, package managers Skip RTK for: small outputs, quick exploration, interactive commands

References

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Evaluate Claude Code agents, skills, and commands with weighted quality criteria. Get scores, readiness grades, template comparisons, and practical improvement suggestions in Markdown or JSON reports to guide reviews before release.

中文简介正在准备中。当前显示英语简介。

  • Review skills before release
  • Compare agent definitions with reference templates
  • Quickly check critical quality criteria
FlorianBruniaux/claude-code-ultimate-guide62042026年10月18日 更新

Assess a codebase across seven areas, including exposed credentials, security, dependencies, structure, and tests. Receive category scores, findings tied to file locations, and a prioritized improvement plan with smaller tasks that can be completed quickly.

中文简介正在准备中。当前显示英语简介。

  • Assessing the overall health of an inherited project
  • Reviewing exposed credentials and security risks
  • Identifying dependency and test coverage gaps
FlorianBruniaux/claude-code-ultimate-guide62042026年10月18日 更新

Measure code patterns such as casts to any or disabled lint rules, then run repeated, targeted edits. Keep changes that improve the chosen metric, revert unsuccessful changes, and track results for each improvement loop.

中文简介正在准备中。当前显示英语简介。

  • Finding code patterns to prioritize for cleanup
  • Preparing measurement files for an improvement loop
  • Repeating targeted edits to reduce casts to any
FlorianBruniaux/claude-code-ultimate-guide62042026年10月18日 更新

best-of-n

免费

Generate several separate solutions, compare them against criteria fixed in advance, and verify the selected result through executable checks or an independent reviewer. Keep a proof log documenting candidates, evidence, failures, and remaining limits.

中文简介正在准备中。当前显示英语简介。

  • Comparing implementation options before choosing one
  • Verifying a solution when a wrong choice would be costly
  • Keeping evaluation evidence for delivery or audit
FlorianBruniaux/claude-code-ultimate-guide62042026年10月18日 更新

canary

免费

Monitor a live application after deployment and compare it with a saved baseline, a record of its earlier state. Check page responses, loading times, and new errors, flag persistent changes, and produce a per-page health report.

中文简介正在准备中。当前显示英语简介。

  • Recording a healthy baseline before deployment
  • Monitoring production immediately after deployment
  • Checking key pages for slower responses or failures
FlorianBruniaux/claude-code-ultimate-guide62042026年10月18日 更新

catchup

免费

Rebuild project context after clearing a conversation or returning to work. Review recent Git history, uncommitted changes, and TODO markers to get a structured summary of project status and suggested next steps.

中文简介正在准备中。当前显示英语简介。

  • Restoring project context after /clear
  • Reviewing recent changes after a long break
  • Checking unfinished work before choosing the next task
FlorianBruniaux/claude-code-ultimate-guide62042026年10月18日 更新

查看 FlorianBruniaux 的全部技能

报告此技能的问题