Help us improve
Share bugs, ideas, or general feedback.
From claude-resources
Performance discipline: profile before optimize, benchmark, N+1 detection, hot-path analysis. Use when responding to a measured performance issue OR designing a high-throughput path. Pair with core/code-review §5 (review-time checklist).
npx claudepluginhub deandum/claude-resources --plugin go-skillsHow this skill is triggered — by the user, by Claude, or both
Slash command
/claude-resources:performanceThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Performance optimization without measurement is ritual. This skill is the design-time and response-time discipline for choosing *what* to optimize and *how much*. For the review-time checklist, see `core/code-review` §5 Performance.
Measures and optimizes performance with data-driven profiling, identifying bottlenecks like N+1 queries, missing indexes, and synchronous I/O. Triggers on performance, speed, latency, profiling, or benchmark keywords.
Use when performance is a concern - sluggish pages, slow queries, bloated bundles, high-latency APIs, or whenever someone says "optimize" or "make it faster"
Identifies and fixes performance bottlenecks by profiling code, suggesting targeted optimizations, implementing with TDD, and verifying improvements. Supports backend (Python, Go, Node), frontend (JS), full scopes.
Share bugs, ideas, or general feedback.
Performance optimization without measurement is ritual. This skill is the design-time and response-time discipline for choosing what to optimize and how much. For the review-time checklist, see core/code-review §5 Performance.
"Fast" is not a target. "p99 < 100ms at 1000 req/s" is. Before optimizing anything, know:
If you cannot state the target in numbers, you are not optimizing — you are guessing.
Rules of measurement:
Without a baseline, "it's faster now" is a story, not evidence.
Profilers find the real bottleneck. Intuition finds the bottleneck you remember from a different project. Always profile first.
Look for:
If the profile does not match your mental model, the mental model is wrong.
Order of attack:
Most performance wins live at levels 1 and 2. Micro-tuning is where complexity metastasizes without payoff.
After any optimization, re-run the benchmark:
A change that does not move the target number is a complexity add, not an optimization. Revert it.
Loops that issue one query (or one RPC, or one external call) per iteration are the most common performance bug. Always ask: is this operation inside a loop? Is each iteration independent? Can it be batched?
| Shortcut | Reality |
|---|---|
| "I know this is slow — profiling is overhead." | You don't. The profiler will surprise you. Run it. |
| "Premature optimization is the root of all evil — so I'll skip it." | Knuth's full quote: "except for the 3% that matters." Measure to find the 3%. |
| "The change is tiny, no need to benchmark." | Tiny changes can trigger huge regressions (cache misses, branch prediction, inlining). Benchmark. |
| "The optimization is obviously faster." | Obvious is not measured. "Obviously" is the word that precedes most regressions. |
| "I'll optimize everything to be safe." | Optimizing cold code is a complexity tax with zero return. Target the hot path. |
// optimized or // fast path without a baseline number nearby