rtk-optimizer
Optimize command outputs with RTK (Rust Token Killer) for 70% token reduction
Best use case
rtk-optimizer is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Optimize command outputs with RTK (Rust Token Killer) for 70% token reduction
Teams using rtk-optimizer should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/rtk-optimizer/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How rtk-optimizer Compares
| Feature / Agent | rtk-optimizer | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Optimize command outputs with RTK (Rust Token Killer) for 70% token reduction
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 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: ```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 - RTK GitHub: https://github.com/rtk-ai/rtk - RTK Website: https://www.rtk-ai.app/ - Evaluation: `docs/resource-evaluations/rtk-evaluation.md` - CLAUDE.md template: `examples/claude-md/rtk-optimized.md`
Related Skills
twitter-algorithm-optimizer
Analyze and optimize tweets for maximum reach using Twitter's open-source algorithm insights. Rewrite and edit user tweets to improve engagement and visibility based on how the recommendation system ranks content.
spend-optimizer
Audit subscriptions AND optimize credit card rewards. Analyzes bank CSVs to find recurring charges, categorize spend, identify which card each charge should be on, and calculate potential rewards. Use when user says "audit subscriptions", "optimize my cards", "maximize rewards", or "analyze my spending". Outputs interactive HTML with subscription management and card optimization.
resume-optimizer
优化和定制简历以匹配特定公司和职位。分析JD,提取关键技能,重新排序经验,突出相关成就。用于创建简历变体、优化关键词、提升ATS通过率。当用户创建简历变体或优化简历时自动触发。
prompt-optimizer
This skill should be used when users request help optimizing, improving, or refining their prompts or instructions for AI models. Use this skill when users provide vague, unclear, or poorly structured prompts and need assistance transforming them into clear, effective, and well-structured instructions that AI models can better understand and execute. This skill applies comprehensive prompt engineering best practices to enhance prompt quality, clarity, and effectiveness.
performance-optimizer
Performance analysis, profiling techniques, bottleneck identification, and optimization strategies for code and systems. Use when the user needs to improve performance, reduce resource usage, or identify and fix performance bottlenecks.
hinge-profile-optimizer
Comprehensive, research-backed Hinge dating profile optimization. Use when someone wants to improve their Hinge profile, audit an existing profile, write better prompts/captions, select and order photos strategically, or understand why they're not getting quality matches. This is the thorough process (60-90 mins) - discovery interview, game theory analysis, photo strategy, copy creation, settings optimization, and implementation support. Based on 45+ peer-reviewed sources on dating app behavior.
database-optimizer
Expert database optimizer specializing in modern performance tuning, query optimization, and scalable architectures. Masters advanced indexing, N+1 resolution, multi-tier caching, partitioning strategies, and cloud database optimization. Handles complex query analysis, migration strategies, and performance monitoring. Use PROACTIVELY for database optimization, performance issues, or scalability challenges.
claude-code-optimizer
Audit and optimize Claude Code installations to current best practices. Use when users ask to check, audit, optimize, or improve their Claude Code setup, configuration, hooks, permissions, or workflow. Triggers on requests mentioning Claude Code settings, CLAUDE.md files, hooks configuration, permissions setup, or performance optimization.
asset-catalog-optimizer
Analyze and optimize Xcode asset catalogs - find unused assets, missing resolutions, compress images
context-optimizer
Analyzes Copilot Chat debug logs, agent definitions, skills, and instruction files to audit context window utilization. Provides log parsing, turn-cost profiling, redundancy detection, hand-off gap analysis, and optimization recommendations. Use when optimizing agent context efficiency, identifying where to add subagent hand-offs, or reducing token waste across agent systems.
agentv-prompt-optimizer
Iteratively optimize prompt files against AgentV evaluation datasets by analyzing failures and refining instructions.
image-optimizer
Optimize and compress images for web use. Reduces file sizes of JPEG, PNG, GIF images using lossy/lossless compression. Can resize images to maximum dimensions, convert to WebP format, and process entire directories recursively. Use when images are too large for web, need compression, or need format conversion.