performance

A performance-checking workflow for the RTK command-line tool. It measures startup time, memory use, output token savings, and compiled file size against stated targets.

In plain words
What is it for?
Use it to benchmark the tool before and after changes, especially changes to filters, regular expressions, dependencies, or command execution.
Why use it?
It helps find code changes that make the tool slower, use more memory, produce more text, or grow too large before release.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/rtk-ai/rtk/performance
Any agent
npx skills add rtk-ai/rtk --skill performance
Clone the repo
git clone --depth 1 https://github.com/rtk-ai/rtk

Made for: Claude Code, Codex.

Per session 13 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,420 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00013 $0.03420
Opus 5 $0.00006 $0.01710
Sonnet 5 $0.00003 $0.00684
Haiku 4.5 $0.00001 $0.00342

Measured 2d ago against content hash a78b6552571a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

performance scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo dtrace -n 'syscall::open*:entry { @[execname] = count(); }' &
.claude/skills/performance/SKILL.md · 436 lines

How it starts

The opening of the file, as written. The whole thing — 436 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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:

# 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

# 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

Read the full file on GitHub · 436 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 436 lines · 13 tokens per session scan B a78b6552571a

Subscribe to this mod's changes

performance is a skill published in the GitHub repository rtk-ai/rtk (78,131 stars, last pushed today), licensed Apache-2.0. It adds 13 tokens to every session and 3,420 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

build-teaql-app

Build or change a TeaQL application in Java, Rust, Go, Swift, Python, C#/.NET, or TypeScript, including Kotlin/JVM applications that consume Java-generated libraries. Mandatory order: first draft and save a complete KSML model, then verify the client and evaluate that saved model, repair it through repeated evaluation…

teaql/teaql-agent-kit · 112 tokens

orchestrator-lanes

Claude Code dev-orchestrator only. File-based multi-lane PM playbook (score, DAG, run-controller, L0/L1/L2, ship). Use when this session IS that agent, or user says info / справка / lane-stack:orchestrator-lanes info. SKIP: Grok, Codex, Kimi, Qwen, AGY, Cursor writer CLIs and any default coding agent — do not load, do…

VKirill/claude-lane-stack · 104 tokens

source-command-methodology-advisor

Analyzes your codebase and asks 3 targeted questions to recommend the right AI-assisted development methodology stack.

FlorianBruniaux/claude-code-ultimate-guide · 27 tokens

info

Lane-stack work-process cheat sheet. Catalog of resume, onboard, architect a new app, design, docs. Use when user says info, справка, lane-stack:info, /lane-stack:info, что умеет стек, как запускать.

VKirill/claude-lane-stack · 53 tokens

lane-memory

SMA-style project fact corpus under .agents/memory/. Opt-in via adoc stages.memory.enabled. Use when user says память, lane-memory, corpus, CORE, почему бот забыл, or an agent needs durable non-code facts. Not PROGRESS/LESSONS dumps.

VKirill/claude-lane-stack · 59 tokens

source-command-ccguide-daily

Daily update check — official Anthropic docs diff + guide/CC releases digest.

FlorianBruniaux/claude-code-ultimate-guide · 23 tokens