Agent skill

rtk-optimizer

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.

Stars 3,172
Forks 439

Install this agent skill to your Project

npx add-skill https://github.com/FlorianBruniaux/claude-code-ultimate-guide/tree/main/examples/skills/rtk-optimizer

SKILL.md

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 logrtk git log (92.3% reduction)
  • git statusrtk git status (76.0% reduction)
  • findrtk find (76.3% reduction)

Medium-Value (50-70% reduction)

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

JS/TS Stack (70-90% reduction)

  • pnpm listrtk pnpm list (82% reduction)
  • pnpm test / vitest runrtk vitest run (90% reduction)

Rust Toolchain (80-90% reduction)

  • cargo testrtk cargo test (90% reduction)
  • cargo buildrtk cargo build (80% reduction)
  • cargo clippyrtk cargo clippy (80% reduction)

Python & Go (90% reduction)

  • pytestrtk python pytest (90% reduction)
  • go testrtk go test (90% reduction)

GitHub CLI (79-87% reduction)

  • gh pr viewrtk gh pr view (87% reduction)
  • gh pr checksrtk gh pr checks (79% reduction)

File Operations

  • lsrtk ls (condensed output)
  • greprtk 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:

bash
rtk --version  # Should output: rtk 0.16.0+

If not installed:

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

# Cargo (all platforms)
cargo install rtk

Usage Pattern

markdown
# 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:

bash
# 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:

markdown
## 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

Expand your agent's capabilities with these related and highly-rated skills.

FlorianBruniaux/claude-code-ultimate-guide

eval-skills

Audit all skills in the current project for frontmatter completeness, effort level appropriateness, allowed-tools scoping, and content quality. Produces a scored report with effort-level recommendations for each skill. Use when onboarding to a new project, reviewing skill quality before shipping, or adding effort fields to an existing skill library.

3,172 439
Explore
FlorianBruniaux/claude-code-ultimate-guide

git-ai-archaeology

Analyze AI config evolution in a git repo — first commits per path, monthly distribution, major PRs, maturity phases

3,172 439
Explore
FlorianBruniaux/claude-code-ultimate-guide

design-patterns

Detect, suggest, and evaluate GoF design patterns in TypeScript/JavaScript codebases. Use when refactoring code, applying singleton/factory/observer/strategy patterns, reviewing pattern quality, or finding stack-native alternatives for React, Angular, NestJS, and Vue.

3,172 439
Explore
FlorianBruniaux/claude-code-ultimate-guide

pr-triage

4-phase PR backlog management with audit, deep code review, validated comments, and optional worktree setup. Use when triaging pull requests, catching up on pending code reviews, or managing a backlog of open PRs. Args: 'all' to review all, PR numbers to focus (e.g. '42 57'), 'en'/'fr' for language, no arg = audit only.

3,172 439
Explore
FlorianBruniaux/claude-code-ultimate-guide

guide-recap

Transform CHANGELOG entries into social content (LinkedIn, Twitter/X, Newsletter, Slack) in FR + EN. Use after releases or weekly to generate release notes, announcements, social media posts, or recap summaries from guide updates.

3,172 439
Explore
FlorianBruniaux/claude-code-ultimate-guide

talk-stage5-script

Produces a complete 5-act pitch with speaker notes, a slide-by-slide specification, and a ready-to-paste Kimi prompt for AI slide generation. Requires validated angle and title from Stage 4. Use when you have a confirmed talk angle and need the full script, slide spec, and AI-generated presentation prompt.

3,172 439
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results