rtk: Skill for Claude Code

.claude/skills/performance/SKILL.md

performance is a skill for Claude Code from rtk-ai/rtk. It costs 13 tokens per session (3,419 once invoked), scanned B, original, Apache-2.0.

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 Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths; positional $N argument.

This is rtk-ai/rtk's own configuration. It tells Claude Code how to work on rtk itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything rtk configures →

About the project

rtk is a command-line proxy that filters and compresses output from development commands before it reaches an LLM's context. It is used with coding agents to reduce the tokens consumed by commands such as Git operations. The catalogue includes skills, commands, agents, and instructions for using rtk in agent workflows.

rtk-ai/rtk · 84,655 stars · on GitHub · rtk-ai.app

Reuse

Borrowing it

Nothing to install: this file belongs to rtk-ai/rtk. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/rtk-ai/rtk/develop/.claude/skills/performance/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/rtk-ai/rtk

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for performance

README.md
[![agentmods](https://agentmods.dev/badge/skills/rtk-ai/rtk/performance/github.svg)](https://agentmods.dev/skills/rtk-ai/rtk/performance)
Your own site
<a href="https://agentmods.dev/skills/rtk-ai/rtk/performance"><img src="https://agentmods.dev/badge/skills/rtk-ai/rtk/performance/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for performance

Your own site · 80×15
<a href="https://agentmods.dev/skills/rtk-ai/rtk/performance"><img src="https://agentmods.dev/badge/skills/rtk-ai/rtk/performance.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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,419 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Snyk pass 7 Sept 2026
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Privilege Escalation · line 197
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Privilege Escalation · line 199
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Privilege Escalation · line 424
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
How audits are shown
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.1 $0.00013 $0.03419
Opus 5.5 $0.00005 $0.01368
Sonnet 5.5 $0.00003 $0.00684
Haiku 4.5 $0.00001 $0.00342

Measured 13d ago against content hash f83955f6da61, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 13d 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 (≥20% floor).

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 ≥20% floor Tests with count_tokens() <20% = 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. 13d ago Changed f83955f6da61
  2. 1mo 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 (84,655 stars, last pushed yesterday), licensed Apache-2.0. It adds 13 tokens to every session and 3,419 once invoked, about $0.0001 per session on Opus 5.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.