Agent skill · Audited from source
Performance
skill · rtk-ai/rtkApache-2.0 licenceAudited 28 Sep 2026 · source 7ecfb6c13649
Is it safe? Yes — SAFE, grade B (89/100). We read this skill's source at commit 7ecfb6c13649 and found no filesystem, network or shell access and no hard-coded secrets. What it does: CLI performance optimization - startup time, memory usage, token savings benchmarking
Cite
Cite this page
ModelsAtlas. “Performance (rtk-ai/rtk)”. Retrieved 28 Sep 2026. https://modelsatlas.com/skills/rtk-ai/performance
3 skills are called “Performance”. You are viewing rtk-ai/rtk.
- rtk-ai/rtk★ 82k✓SAFE
- addyosmani/web-quality-skills★ 3k!CAUTION
- Besty0728/Unity-Skills★ 1.8k✓SAFE
Trust audit
Audit 0.4.1 · source read 28 Sep 2026
SAFE means nothing in the source contradicts what the skill says it does. Grade B is shared by 17,406 of 18,389 audited skills.
What the source does
- FilesystemNone observedNo reads or writes in the source
- NetworkNone observedNo outbound calls in the source
- ShellNone observedNo commands run in the source
- DependenciesPinnedNothing floats
- SecretsNone foundNo keys in source
Five audit layers
| Layer | What we check | Result | Findings |
|---|---|---|---|
L0 Provenance | Repo owner, licence, archive status, activity | PASS | 0 |
L1 Static source | Secrets, path traversal, supply chain, hidden code | NA | 0 |
L2 Instructions | Prompt injection, authority framing, hidden directives | PASS | 0 |
L3 Inventory | The files and declarations match the source | PASS | 1 |
L4 Sandbox | Run in isolation and watch behaviour | SKIPPED why | 0 |
Gates applied: no behavioural pass.
Findings (1)
LOWInventory / provenanceskill.no_frontmatter · SKILL.md:1
- Why
- SKILL.md lacks name/description frontmatter
- Fix
- —
Audit 0.4.1 · source sha 7ecfb6c13649 · 28 Sep 2026Report an issue or request a re-scan
Provenance
Who published it, and what the verdict is pinned to
- Publisherrtk-ai GitHub organizationOwner of the repository this skill is read from
- Source folderrtk-ai/rtk/.claude/skills/performanceThe exact folder we audited
- LicenceApache-2.0As the repository states it
- Commit pinned for this verdict7ecfb6c13649A new audit runs when the source changes
- Repository statusNot archivedPushed today
- Sandboxed runNot runSkills are read, not executed; layer L4 is skipped
What it tells the agent
Full source on GitHub ↗Its description: CLI performance optimization - startup time, memory usage, token savings benchmarking
---
description: CLI performance optimization - startup time, memory usage, token savings benchmarking
---
# 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
# Startup time baseline
hyperfine 'rtk git status' --warmup 3 --export-json /tmp/baseline_startup.json
# Memory usage baseline (macOS)
/usr/bin/time -l rtk git status 2>&1 | grep "maximum resident set size" > /tmp/baseline_memory.txt
# Memory usage baseline (Linux)
/usr/bin/time -v rtk git status 2>&1 | grep "Maximum resident set size" > /tmp/baseline_memory.txt
# Binary size baseline
ls -lh target/release/rtk | tee /tmp/baseline_binary_size.txt
```
### 2. Make Changes
Implement optimization or feature changes.
### 3. Rebuild and Measure
```bash
# Rebuild with optimizations
cargo build --release
# Measure startup time
hyperfine 'target/release/rtk git status' --warmup 3 --export-json /tmp/after_startup.json
# Measure memory usage
/usr/bin/time -l target/release/rtk git status 2>&1 | grep "maximum resident set size" > /tmp/after_memory.txt
# Check binary size
ls -lh target/release/rtk | tee /tmp/after_binary_size.txt
```
### 4. Compare Results
```bash
# Startup time comparison
hyperfine 'rtk git status' 'target/release/rtk git status' --warmup 3
# Example output:
# Benchmark 1: rtk git status
# Time (mean ± σ): 6.2 ms ± 0.3 ms [User: 4.1 ms, System: 1.8 ms]
# Benchmark 2: target/release/rtk git status
# Time (mean ± σ): 7.8 ms ± 0.4 ms [User: 5.2 ms, System: 2.1 ms]
#
# Summary
# 'rtk git status' ran 1.26 times faster than 'target/release/rtk git status'
# Memory comparison
diff /tmp/baseline_memory.txt /tmp/after_memory.txt
# Binary size comparison
diff /tmp/baseline_binary_size.txt /tmp/after_binary_size.txt
```
### 5. Identify Regressions
**Startup time regression** (>15% increase or >2ms absolute):
```bash
# Profile with flamegraph
cargo install flamegraph
cargo flamegraph -- target/release/rtk git status
# Open flamegraph.svg
open flamegraph.svg
# Look for:
# - Repeated fixed-regex compilation (should be in LazyLock init)
# - Excessive allocations
# - File I/O on startup (should be zero)
```
**Memory regression** (>20% increase or >1MB absolute):
```bash
# Profile allocations (requires nightly)
cargo +nightly build --release -Z build-std
RUSTFLAGS="-C link-arg=-fuse-ld=lld" cargo +nightly build --release
# Use DHAT for heap profiling
cargo install dhat
# Add to main.rs:
# #[global_allocator]
# static ALLOC: dhat::Alloc = dhat::Alloc;
```
**Token savings regression** (<60% savings):
```bash
# Run token accuracy tests
cargo test test_token_savings
# Example failure output:
# Git log filter: expected ≥60% savings, got 52.3%
# Fix: Improve filter condensation logic
```
## Common Performance Issues
### Issue 1: Regex Recompilation
**Symptom**: Startup time >20ms, flamegraph shows regex compilation in hot path
**Detection**:
```bash
# Flamegraph shows Regex::new() calls during execution
cargo flamegraph -- target/release/rtk git log -10
# Check whether fixed patterns are compiled outside LazyLock statics
```
**Fix**:
```rust
// ❌ WRONG: Recompiled on every call
fn filter_line(line: &str) -> Option<&str> {
let re = Regex::new(r"pattern").unwrap(); // RECOMPILED!
re.find(line).map(|m| m.as_str())
}
// ✅ RIGHT: Compiled once with LazyLock
use std::sync::LazyLock;
static LINE_PATTERN: LazyLock<Regex> =
LazyLock::new(|| Regex::new(r"pattern").unwrap());
fn filter_line(line: &str) -> Option<&str> {
LINE_PATTERN.find(line).map(|m| m.as_str())
}
```
### Issue 2: Excessive Allocations
**Symptom**: Memory usage >5MB, many small allocations in flamegraph
**Detection**:
```bash
# DHAT heap profiling
cargo +nightly build --release
valgrind --tool=dhat target/release/rtk git status
```
**Fix**:
```rust
// ❌ WRONG: Allocates Vec for every line
fn filter_lines(input: &str) -> String {
input.lines()
.map(|line| line.to_string()) // Allocates String
.collect::<Vec<_>>()
.join("\n")
}
// ✅ RIGHT: Borrow slices, single allocation
fn filter_lines(input: &str) -> String {
input.lines()
.collect::<Vec<_>>() // Vec of &str (no String allocation)
.join("\n")
}
```
### Issue 3: Startup I/O
**Symptom**: Startup time varies wildly (5ms to 50ms), flamegraph shows file reads
**Detection**:
```bash
# strace on Linux
strace -c target/release/rtk git status 2>&1 | grep -E "open|read"
# dtrace on macOS (requires SIP disabled)
sudo dtrace -n 'syscall::open*:entry { @[execname] = count(); }' &
target/release/rtk git status
sudo pkill dtrace
```
**Fix**:
```rust
// ❌ WRONG: File I/O on startup
fn main() {
let config = load_config().unwrap(); // Reads ~/.config/rtk/config.toml
// ...
}
// ✅ RIGHT: Lazy config loading (only if needed)
fn main() {
// No I/O on startup
// Config loaded on-demand when first accessed
}
```
### Issue 4: Dependency Bloat
**Symptom**: Binary size >5MB, many unused dependeExcerpt, first 6,000 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.
Install
Pinned to the audited commit 7ecfb6c
git clone https://github.com/rtk-ai/rtk git -C rtk checkout 7ecfb6c13649
The author documents no install command, so this uses the repository directly. Our verdict covers commit 7ecfb6c13649 only.
Works in
The author has not said which agents this skill supports, and we have not tested it in any.
Audit history
Every audit, every source change
- ✓SAFE B 89 / 100
first audit · source
7ecfb6c13649
README badge
For maintainers · shows the latest audit
[](https://modelsatlas.com/skills/rtk-ai/performance/)
The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.
Similar skills
All coding & review skills →rtk-ai/rtk
Review RTK Rust code for idiomatic simplification. Detects over-engineering, unnecessary allocations, verbose patterns. Applies Rust idioms without changing behavior.
rtk-ai/rtk
Rust design patterns for RTK. Newtype, Builder, RAII, Trait Objects, State Machine. Applied to CLI filter modules. Use when designing new modules or refactoring existing ones.
rtk-ai/rtk
Issue triage: audit open issues, categorize, detect duplicates, cross-ref PRs, risk assessment, post comments. Args: "all" for deep analysis of all, issue numbers to focus (e.g. "42 57"), "en"/"fr" for language, no arg…
rtk-ai/rtk
Batch review des PRs RTK par ordre de complexité croissante (XS → S → M → L). Pour chaque PR : vérifie l'état (conflits, CLA, reviews), lit le diff complet, analyse le code en contexte, présente un résumé avec lien +…
rtk-ai/rtk
PR triage: audit open PRs, deep review selected ones, draft and post review comments. Args: "all" to review all, PR numbers to focus (e.g. "42 57"), "en"/"fr" for language, no arg = audit only in French.
rtk-ai/rtk
Generate a comprehensive repo recap (PRs, issues, releases) for sharing with team. Pass "en" or "fr" as argument for language (default fr).
Add this badge to your README
[](https://modelsatlas.com/skills/rtk-ai/performance/)
<a href="https://modelsatlas.com/skills/rtk-ai/performance/"><img src="https://modelsatlas.com/skills/rtk-ai/performance/badge.svg" alt="ModelsAtlas: SAFE B"></a>
Questions about Performance
What does the Performance skill do?
Is Performance safe to install?
What can Performance access on my machine?
How current is this page?
Sources
- github.com/rtk-ai/rtk/tree/develop/.claude/skills/performance — the audited source at commit 7ecfb6c13649 and every finding aboveObserved · 28 Sep 2026
Spotted something wrong? Report a correction · Methodology
Keep going in your AI
Opens with this page as the source. We add nothing else to the prompt.
- What does the Performance skill do?
- Is Performance safe to install?
- What can Performance access on my machine?