performance-engineering
Skill2 starsChanged 5 days agoMITView on GitHub
Measure and reduce latency, memory, Core Web Vitals, and cloud or token spend. Use for endpoint profiling, k6 load tests, bottlenecks, N+1 queries, memory leaks, LCP/INP, autonomous metric loops, and rightsizing costs. Trigger on 'this is slow', 'load test this', 'memory keeps growing', 'improve LCP', 'the cloud bill is too high', 'cut token cost'.
10 other projects use a version of this.
Adopted by
Most recently taken up by
- Kin9Zeus/senior-engineer-skillstheir own version, first seen Nov 1, 2026
- HeBtcd/skillstheir own version, first seen Nov 1, 2026
- ai-enhanced-engineer/aiee-skillstheir own version, first seen Nov 1, 2026
- g-cqd/skillstheir own version, first seen Oct 23, 2026
- jlu-lujing/TaskHuntertheir own version, first seen Oct 23, 2026
- dathuynh1108/agent-skillstheir own version, first seen Oct 11, 2026
Used with
Projects with it also use clack-cli-patterns, drag-to-reorder and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
openchamberSkillclack-cli-patterns
Use when creating or modifying OpenChamber CLI commands, prompts, terminal output, non-TTY behavior, `--quiet`, or `--json` behavior.
Also in 3 projects that use this
openchamberSkilldrag-to-reorder
Use when implementing or modifying OpenChamber sortable or drag-to-reorder behavior, especially `@dnd-kit`, touch/mobile interactions, variable-width items, or wrapping layouts.
Also in 3 projects that use this
gabriellstSkilldesktop-shell
Work on the CODM desktop shell — the Tauri v2 host (packages/app/tauri), the react client-side services DI (packages/app/react/src/services — ports + platform services + Container/Token + ServicesProvider), sidecar supervision, or any OS-integration capability (folder picker, notifications, badge, secrets, autostart). Use whenever a task mentions Tauri, the desktop app, sidecars, or an OS capability the react console needs.
Also in 3 projects that use this
- +9 more from openchamber
Other versions10 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 10
- btriapitsyn/openchamber★ 13ksame name
- openchamber/openchamber★ 13ksame name
- travisjneuman/.claude★ 106same name
- HeBtcd/skills★ 5same name
- ai-enhanced-engineer/aiee-skills★ 4same name
- dathuynh1108/agent-skills★ 4same name
- jlu-lujing/TaskHunter★ 4same name
- Mnwa/performance-engineering★ 4same name
- Kin9Zeus/senior-engineer-skills★ 3same name
- g-cqd/skills★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository40 other files it gives its agents.
- .agents/AGENTS.mdAGENTS.md
- AGENTS.mdAGENTS.md
- .agents/CLAUDE.mdCLAUDE.md
- 3d-modelsSkill
- agent-engineeringSkill
- agent-orchestrationSkill
- agy-image-babysitterSkill
- backend-systemsSkill
- bot-engineeringSkill
- cloud-devopsSkill
- code-reviewSkill
- data-engineeringSkill
- documentationSkill
- finishing-devSkill
- frontend-engineeringSkill
- git-branch-cleanupSkill
- git-workflowSkill
- goldsrc-moddingSkill
- ios-engineeringSkill
- local-dubbingSkill
- mobile-engineeringSkill
- motion-videoSkill
- observabilitySkill
- package-managementSkill
- portkillSkill
- radar-iaSkill
- readme-standardSkill
- reaSkill
- release-autoupdateSkill
- requirements-planningSkill
- security-opsSkill
- skill-authoringSkill
- software-architectureSkill
- stack-selectionSkill
- starting-devSkill
- test-engineeringSkill
- threejsSkill
- tooling-devSkill
- web-researchSkill
- x-post-readingSkill
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 5 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Write the target down first: the metric, the percentile, and today's number.
- Very specific: line 25
Write the target down before touching code: the user-visible metric, the percentile that matters (p50/p95/p99, RPS, RSS), and today's …
- Distinctive: line 30
Add a regression guard: a CI benchmark, a budget assertion, or an alert threshold.
- Distinctive: line 83
USE/RED depth, percentile math, and measuring before optimizing: measurement-methodology.md
- Distinctive: line 96
Stop when the target is met, or when the next profile entry is smaller than the noise floor.
- Very specific: line 97
When the profile points at structure — chatty I/O across a boundary, needless synchronization, a fan-out that should be one call — stop …
- Distinctive: line 101
Test against production-sized data.
“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Performance Engineering
Not this skill: a correctness bug that is merely slow to hit (its domain skill), or an active incident with no measurement yet (observability).
Preflight
# Baseline before any change — you cannot prove an improvement without it.
# autocannon fits an HTTP endpoint; swap for the load generator that fits the
# target (k6, wrk, a DB benchmark, a profiler) when it isn't one.
autocannon -c 50 -d 30 http://localhost:3000/endpoint | tee /tmp/before.txt
nproc && free -m && cat /sys/fs/cgroup/cpu.max 2>/dev/null # is the box throttled?Write the target down first: the metric, the percentile, and today's number. "Make it faster" is not a target.
Workflow
- Write the target down before touching code: the user-visible metric, the percentile that matters (p50/p95/p99, RPS, RSS), and today's baseline. "Make it faster" is not a target.
- Reproduce the slowness under a repeatable load — fixed input, cache state stated, environment recorded.
- Profile before hypothesizing. Pick the layer the symptom points at; guessing here is how a week disappears into the wrong subsystem.
- Attack the top of the profile only. One change per measurement cycle.
- Re-measure against the baseline under the same load. Keep the change only if the metric moves beyond run-to-run variance and correctness holds.
- Add a regression guard: a CI benchmark, a budget assertion, or an alert threshold.
Pick the Profiler by Symptom
Two lenses choose what to look at before any tool runs: USE — Utilization, Saturation, Errors — per resource (CPU, memory, disk, network), from Brendan Gregg's Systems Performance; and RED — Rate, Errors, Duration — per request-driven service. The table below already routes along both: rows above the fold are USE questions about a resource, rows below are RED questions about a request path.
| Symptom | Layer | Tool |
| CPU pegged, one endpoint slow | CPU | node --cpu-prof · py-spy record -p <pid> · pprof |
| Memory grows and never returns | Heap | node --heapsnapshot-signal=SIGUSR2 · tracemalloc · objgraph |
| Latency fine alone, awful under load | Concurrency | event-loop lag probe · pool saturation metrics |
| One request slow, CPU idle | I/O wait | distributed trace waterfall |
| Slow only with real data volume | Database | EXPLAIN (ANALYZE, BUFFERS) · pg_stat_statements |
| Throughput plateaus below CPU limit | Saturation | connection pool size, queue depth, thread pool |
# Node: CPU profile of a running server
node --cpu-prof --cpu-prof-dir=./prof server.js
# Python: sample a live process without stopping it
py-spy record -o profile.svg --pid $(pgrep -f 'python app.py')
# Load, with a fixed shape so runs are comparable
autocannon -c 50 -d 30 -p 10 http://localhost:3000/endpointThe N+1 Signature
One query in the log, then N nearly identical ones with a different id. It never shows up locally because N is 3 with seed data and 4,000 in production. Count queries per request in a test and assert the count — that assertion catches the regression a latency benchmark misses, in CI, before it ever reaches a profiler.
Connection Pool Exhaustion
| Symptom | Likely cause | Fix |
| Latency climbs under load; app CPU and DB CPU both idle | pool smaller than concurrent demand; requests queue for a connection | raise the pool to match concurrency, or shed load; watch queue-wait time, not just DB-side metrics |
| Intermittent "timeout acquiring connection from pool" | leaked connections — a missing close/release on an error path | audit for checkout without a finally/using/context-manager release; alert on pool checkouts that never return |
| Fine alone, collapses when replicas scale out | shared DB max_connections hit across all replicas combined | size each replica's pool against the DB ceiling divided by replica count, or front the DB with a pooler (PgBouncer) |
| p99 fine, throughput plateaus below CPU/DB capacity | the pool itself is the saturation resource, not the code | this is a USE-method saturation finding — resize the pool before profiling application code further |
A pool is a bounded resource like a CPU core; it saturates the same way, and the fix is sizing or shedding, never a code-level micro-optimization.
Noise Floor
A result inside run-to-run variance is not a result. Averages hide exactly the tail a user feels: a service reporting p50 = 50ms and p99 = 4s has a "great" mean while one request in a hundred waits 80x longer — percentiles, not the mean, are what an SLO should be built on (Kleppmann, Designing Data-Intensive Applications, ch. 1).
| Guard | Why |
| Discard the first runs | JIT warmup, cold caches, lazy imports |
| Report median and p95/p99 | A better median with a worse tail is a worse system |
| Repeat the baseline, not just the fix | Machine drift is indistinguishable from your change |
| Watch CPU quota and thermals | A throttled container fakes a regression perfectly |
| Sample in independent processes | In-process iterations autocorrelate through JIT, GC, and thermal state; a significance test over them assumes independence it does not have |
| Decide with a test, not an eyeball | Mann-Whitney U over 7+ samples per side, and an effect larger than max(noise band, 2 x stdev) — at n=7 only differences around 1 sigma are detectable |
Reference Routing
- Practical performance cases: real-world-cases.md
- Profiling by layer (Node, Python, browser, SQL): profiling-playbook.md
- Caching, batching, and load-test design: optimization-patterns.md
- USE/RED depth, percentile math, and measuring before optimizing: measurement-methodology.md
See Reference Map for specialized references and sub-domain guides.
Stop
- There is no profile. Stop guessing — intuition about hot paths is wrong often enough to be worthless.
- The delta sits inside run-to-run variance. That is not a result; keep measuring or revert.
- The profile points at structure, not code. Stop tuning and route it to
software-architecture.
Rules
- Hand off production alerting to
observability, frontend tuning tofrontend-engineering, and backend bottlenecks tobackend-systems. - No optimization without a profile. The bottleneck is measured, never guessed — intuition about hot paths is wrong often enough to be worthless. Knuth's "premature optimization is the root of all evil" (Structured Programming with go to Statements, 1974) is an argument for measuring before tuning, not for skipping tuning; it names the unmeasured 97% as the trap, not the measured 3% as the excuse.
- Rightsizing is a tradeoff, not a one-way lever: over-provisioning is a silent, recurring cost; under-provisioning is a latency risk that pages someone. State which one is being traded before resizing anything — see cost-engineering.
- Stop when the target is met, or when the next profile entry is smaller than the noise floor.
- When the profile points at structure — chatty I/O across a boundary, needless synchronization, a fan-out that should be one call — stop tuning and delegate to
software-architecture. - Caching is the wrong fix for avoidable work: a cache over an N+1 still fires on every miss and now serves stale rows. Fix the access pattern first, then delegate cache design to
backend-systems. - Reject micro-optimizations that complicate code without moving the user-visible metric.
- Load tests never run against production without explicit approval.
- Test against production-sized data. A bottleneck that only appears at scale is invisible locally, and that is exactly the one that pages you.
- Browser latency, bundle size, and Core Web Vitals belong to web-performance; spend to cost-engineering; a crash or wrong answer to
observability. - Turning a proven target into an unattended keep-or-revert loop is metric-loop; gating a branch on the benchmark delta is
test-engineering.
Checklist
- Metric, percentile, target, load, and environment recorded before the first change.
- A profile — not a hypothesis — chose what to fix.
- One change per measurement cycle; baseline re-measured alongside it.
- Improvement exceeds run-to-run variance, with tails reported, not just the median.
- Correctness unchanged and a regression guard is in place.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

