performance-profilerlisted
Install: claude install-skill JayRHa/AgentSkills
# Performance Profiler
## Overview
Make slow things fast — correctly and provably. This skill enforces a
measure-driven loop: never optimize on a hunch, always profile to find the real
hot path, fix the biggest contributor first, then re-measure to confirm the win
and guard against regressions.
Keywords: performance, profiling, optimization, bottleneck, latency, throughput,
p99, slow, benchmark, flamegraph, CPU profile, memory leak, allocations, N+1
query, caching, big-O, complexity, hot path, regression.
The cardinal rule: **measure first**. Most "obvious" optimizations target the
wrong code. Profilers routinely show that 90% of time sits in a place nobody
suspected.
## Workflow
Follow this loop. Do not skip steps — especially step 1 and step 6.
1. **Define the goal and a metric.** Pick ONE primary metric and a target:
wall-clock latency (p50/p95/p99), throughput (req/s, rows/s), CPU time,
peak memory (RSS), or allocations. Write down the current value and the
target. "Make it faster" is not a goal; "cut p95 from 800ms to under 200ms"
is.
2. **Reproduce reliably.** Build a repeatable scenario with representative data
volume. A bottleneck at 10 rows may vanish at 10M and vice-versa. Disable
noise: warm caches, JIT warmup, fixed input, quiet machine, multiple runs.
3. **Measure the baseline.** Time/benchmark the whole operation before touching
anything. Save the numbers. Use `scripts/bench.py` for a quick statistically
sane wall-clock benchmark