Profiles and fixes backend performance problems: measures p95/p99 latency, CPU, memory, I/O and locks, fixes the top bottleneck, then re-measures and adds a regression guard.
Ships in engineering-core. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Never optimize what you have not measured. Profile, fix the largest bottleneck, measure again under the same conditions. A change without a before/after number is a guess.
Not for: browser page-load and rendering (web-performance), a single slow SQL query (sql-optimization), or capacity planning without a concrete bottleneck.
POST /orders is 1.8 s at 300 req/s on staging; target under 400 ms." If the user gives no target, propose one and confirm it.| Goal | Measure | Notes |
|---|---|---|
| User-facing latency | p50, p95, p99 (and max) per endpoint | Mean hides tail problems. |
| Throughput | Requests or items per second at a fixed latency SLO and error rate | Throughput without a latency bound is meaningless. |
| Memory | RSS, live heap after GC, allocation rate, GC pause time | Steady growth over hours suggests a leak. |
| Startup | Time to ready / first successful request | Measure cold and warm separately. |
| Batch / CLI | Wall-clock time and cost per item | Use hyperfine for command-line comparisons. |
| Cost | CPU-seconds or dollars per request | Useful when latency is already fine. |
| Symptom | Likely bound | Next step |
|---|---|---|
| CPU near 100% of available cores; latency grows with load | CPU | CPU sampling profiler, flame graph |
| CPU low but latency high | Waiting: I/O, locks, downstream calls, pool exhaustion | Traces, wall-clock/off-CPU profile, thread dump, pool metrics |
| Memory grows steadily and never drops | Leak or unbounded cache/queue | Compare two heap snapshots taken minutes apart |
| High GC time, frequent pauses | Allocation pressure | Allocation profiler |
| Periodic latency spikes | GC pauses, scheduled jobs, cache expiry stampede, noisy neighbour | Correlate spike times with GC logs, cron, cache TTLs |
| Only p99 is bad | Contention, GC, cold caches, retries, one slow dependency | Look at slowest traces, not averages |
| Node.js latency rises for all requests at once | Event-loop blocking | Event-loop delay metric, CPU profile |
| .NET or Java requests queue while CPU is low | Thread pool starvation from blocking calls in async code | Thread-pool queue length, thread dump |
| Problem | How to spot it | Fix |
|---|---|---|
| N+1 queries | Many near-identical queries per request in logs or a trace waterfall | Batch, join, eager-load, or a data loader |
| Missing index or bad query plan | Slow query log, DB time dominates traces | See sql-optimization |
| Chatty network | Many sequential calls in one trace | Batch requests, run independent calls in parallel, cache |
| Blocking I/O on a hot path | Event-loop lag (Node), thread-pool starvation (.NET/Java), sync calls inside async code | Use async APIs end to end; move CPU work to workers |
| Serialization overhead | JSON encode/decode wide in the profile | Smaller payloads, avoid serializing twice, faster serializer |
| Allocations in hot loops | Allocation profile, high GC time | Preallocate, reuse buffers, avoid boxing and repeated string concatenation |
| Lock contention | Threads blocked, low CPU, wide lock frames in wall-clock profile | Shrink critical sections, shard state, use concurrent data structures |
| Repeated expensive work | Same computation or remote call with same inputs | Memoize or cache with a size bound, TTL and invalidation; prevent stampedes |
| Wrong algorithm or data structure | Nested loops over large inputs, linear lookups in a loop | Hash maps/sets, sorting once, indexing |
| Logging on the hot path | Formatting or I/O of logs visible in the profile | Lower level, check level before formatting, sample |
| Pool sizing | Time spent waiting for a connection or worker | Right-size the pool; never above what the database can serve |
| Regex backtracking | One regex dominates CPU on certain inputs | Anchor and simplify the pattern, or use a linear-time engine |
Use a real harness, not a stopwatch loop:
| Stack | Harness |
|---|---|
| Java/Kotlin | JMH |
| C#/.NET | BenchmarkDotNet (add [MemoryDiagnoser] for allocations) |
| Python | pyperf, pytest-benchmark, or python -m timeit for one-liners |
| Go | go test -bench=. -benchmem -count=10, compare runs with benchstat |
| Rust | criterion |
| JS/TS | tinybench or mitata |
| Any CLI | hyperfine --warmup 3 'old-cmd' 'new-cmd' |
Warm up before measuring (JIT, caches, connection pools).
Run many iterations and several processes; report median and spread. Treat differences inside the noise as no difference.
Benchmark optimized builds only (--release, -c Release, production NODE_ENV).
Guard against dead-code elimination and constant folding: consume results (JMH Blackhole, return values).
Use realistic inputs. Sorted, tiny, or always-cached data gives misleading results.
Keep the machine quiet: no other heavy processes, power plugged in, same hardware for before and after.
A microbenchmark proves a local speedup; only an end-to-end measurement proves user impact.
constant-arrival-rate executor or wrk2's -R. Closed-loop tools that wait for each response under-report latency when the system slows down (coordinated omission).What SKILL.md sets; muted values are Claude Code's defaults
14 skills in this plugin
/codebase-onboardingMaps an unfamiliar repository before changing it - stack, build/test/run commands, entry points, data flow, conventions and how changes ship - and writes a short map. Use when starting work in a repo you have not seen, when asked to explain how a codebase works, onboard to a project, find where something lives, or before a first change in a large or legacy codebase. Not for reviewing a specific diff./code-review-changesReviews code changes (a pull request, merge request or diff) like a senior engineer - finds real bugs, security holes, data risks and breaking changes, verifies each one, and reports it with file:line, a concrete failure scenario and a suggested fix. Use when asked to review a PR, merge request, diff, branch, staged changes or patch, or to check code before merging. Also covers responding to review comments on your own PR./dependency-upgrades/engineering-core:performance-profilingfrom engineering-core
npx claudepluginhub reddygopalkrishna/developer-agent-skills --plugin engineering-coreOther plugins' skills for the same job