Performance
This skill provides systematic performance analysis for the RTK CLI tool, measuring startup time against a <10ms target, memory usage under 5MB, and token savings between 60–90%. It includes baseline capture, regression detection with flamegraph profiling, and common optimization techniques like LazyLock initialization and zero-copy string processing.
Performance skill benchmarks RTK CLI startup time, memory usage, and token savings against defined targets.
AI-generated summary based on this skill's SKILL.md
Decision gist · record as of 2026-07-27
Performance skill benchmarks RTK CLI startup time, memory usage, and token savings against defined targets. This skill provides systematic performance analysis for the RTK CLI tool, measuring startup time against a <10ms target, memory usage under 5MB, and token savings between 60–90%. It includes baseline capture, regression detection with flamegraph profiling, and common optimization techniques like LazyLock initialization and zero-copy string processing.
Use it when
- Performance addresses binary bloat through dependency analysis with cargo and memory optimization techniques.
- Performance provides methods to measure token efficiency gains from filter optimizations, tracking savings between 60–90%.
Verify before relying
Read SKILL.md below before installing (1 file). Open directory: indexed for reading, not audited.
Similar skills
Install
rtk-ai/rtk/performance · repository language: Rust
Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.
Frequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How to benchmark CLI startup time for Performance?
Performance provides systematic measurement of RTK CLI startup time against a <10ms target. Use hyperfine to capture baseline startup metrics, then track results across builds. Performance includes regression detection workflows to identify when changes exceed acceptable thresholds, helping maintain the startup performance goal.
How does Performance optimize Rust binary size and memory?
Performance addresses binary bloat through dependency analysis with cargo and memory optimization techniques. It covers LazyLock initialization patterns for lazy static setup, zero-copy string processing to reduce allocations, and heap profiling with dhat. The skill targets memory usage under 5MB while maintaining functionality.
What token savings can Performance measure in filters?
Performance provides methods to measure token efficiency gains from filter optimizations, tracking savings between 60–90%. The skill includes token measurement techniques to quantify the impact of compression and processing improvements, enabling data-driven decisions on which optimizations deliver the best efficiency returns.
How does Performance detect regressions using profiling tools?
Performance uses flamegraph profiling to identify performance regressions by visualizing CPU hotspots and call patterns. Combined with baseline capture and CI/CD integration, the skill enables continuous regression detection. System call tracing via strace and dtrace helps pinpoint unexpected overhead from dependencies or initialization.
Can Performance set up continuous monitoring in CI/CD?
Performance includes setup guidance for continuous performance monitoring within CI/CD pipelines, with pre-commit performance hook configuration. The skill provides RTK performance targets checklist and regression testing workflows to catch performance degradation early, ensuring startup time, memory, and token goals remain met across releases.
What optimization techniques does Performance teach?
Performance covers LazyLock and zero-copy processing as core optimization techniques, plus regex compilation overhead reduction and dependency bloat analysis. The skill prioritizes optimizations by impact, helping you focus on changes that move closest to <10ms startup and 5MB memory targets while maximizing token savings.
SKILL.md
Rendered from the published skill. Quoted content, verbatim.
Performance Optimization Skill
Systematic performance analysis and optimization for RTK CLI tool, focusing on startup time (<10ms), memory usage (<5MB), and token savings (60-90%).
When to Use
- Automatically triggered: After filter changes, regex modifications, or dependency additions
- Manual invocation: When performance degradation suspected or before release
- Proactive: After any code change that could impact startup time or memory
RTK Performance Targets
| Metric | Target | Verification Method | Failure Threshold |
|---|---|---|---|
| Startup time | <10ms | hyperfine 'rtk <cmd>' |
>15ms = blocker |
| Memory usage | <5MB resident | /usr/bin/time -l rtk <cmd> (macOS) |
>7MB = blocker |
| Token savings | 60-90% | Tests with count_tokens() |
<60% = blocker |
| Binary size | <5MB stripped | ls -lh target/release/rtk |
>8MB = investigate |
Performance Analysis Workflow
1. Establish Baseline
Before making any changes, capture current performance:
```bash
(truncated - see the full file via the links below)
File tree — 1 file
.claude/skills/performance/SKILL.md
Let your AI agent find skills like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.
wish › “Benchmark and measure CLI startup time, memory usage, and token savings”
Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →
Related skills
Ship orchestrates the full release cycle for RTK projects: quality verification, semantic versioning, changelog generation, git tagging, and remote push to activate CI/CD pipelines. Follow pre-release checklists, execute the multi-step workflow, and verify post-release artifacts automatically.
tdd-rust guides you through test-driven filter implementation for RTK using the Red-Green-Refactor cycle. Start with real command output fixtures, write failing tests that verify both output format and ≥60% token reduction, then implement the minimum code to pass. Lock output format with snapshot tests and integrate into your CLI.
RTK Optimizer detects high-verbosity shell commands and suggests RTK wrappers to dramatically reduce token usage—achieving up to 92% savings on git log, 90% on cargo test and pytest, and similar gains across build tools and package managers. The skill automatically proposes optimizations when it spots commands like git diff, find, or test frameworks, then executes the wrapped version to preserve context window space.
Rtk helps you set up and troubleshoot Rust Token Killer, a CLI tool that rewrites shell commands into token-efficient versions for AI agents. Install via Homebrew, script, or Cargo, then initialize RTK for your specific agent—Claude Code, Codex, Gemini CLI, Cursor, Copilot, Windsurf, Cline, or OpenCode. Use direct `rtk` commands like `rtk git status` or `rtk read` when automatic hooks aren't available.
memory-benchmark measures heap allocations and process memory for SQL workloads under different journal modes. It includes dhat-based allocation tracking, stack-usage analysis via the stack-report binary, and six built-in workload profiles (insert-heavy, read-heavy, mixed, scan-heavy, series-blob, update-churn) for regression detection and performance tuning.
This skill guides you through configuring benchmarks and integrating CodSpeed into your project. It covers language-specific harnesses (divan, criterion, pytest-benchmark, vitest, go test, Google Benchmark) and a universal exec mode for any language, helping you identify performance-critical code and establish repeatable performance tracking.
More skills codspeed-optimize (Apache-2.0) · debugging (MIT) · design-patterns (Apache-2.0)