brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
software-performanceDiagnoses slow services and regressions via profiling and tail-latency math. Use when diagnosing slow services, profiling hot paths, or judging whether an optimization is real.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this skill to find out why something is slow and whether a fix really helped: symptom, profile, bottleneck, smallest proven fix, and re-measurement. It owns profiling, misdiagnosis checks, tail-latency and capacity math, and before/after regression judgment. It does not design load-test campaigns, CI performance gates, or Core Web Vitals budgets.
| Task | Use |
|---|---|
| CPU hot path | Flamegraph-first profiling with the language's own profiler (references/perf-budgets-and-cwv.md) |
| Pauses, stalls, rising p99 | Lock-aware and off-CPU profiles before GC tuning (see Common Misdiagnoses) |
| "Did this change help?" | Same-conditions re-measure against the baseline noise band (Neutral Is a Revert) |
| Frontend regression from Lighthouse JSON | scripts/check_perf_budget.py (exit 1 on breach; 2 on invalid input or missing budgeted metrics; missing INP may use an explicit TBT lab budget) |
-e lock for Java monitors (its --nativelock mode covers native pthread locks only), Go's mutex and block profiles.L = λ × W: at 500 req/s and 0.3 s latency, 150 requests are in flight. A closed-model load generator with 50 VUs and no think time caps out at 50 / 0.3 ≈ 166.7 req/s, so a clean-looking result never exercised the target. Check concurrency ≥ target_rps × latency_s, or use an arrival-rate test (see qa-testing-performance).20 / 0.05 = 400 req/s, whatever the CPU headroom.speedup = 1 / (s + (1 − s) / N): with a 20% serial fraction the ceiling is 1 / 0.2 = 5×. Measure the serial fraction (locks, single-writer steps, shared queues) before recommending more workers.1 − 0.99^10 ≈ 9.6%. Shared dependencies can correlate slow calls; measure the joint tail rather than assuming independence. Per-service p99s alone do not determine the end-to-end tail.Record workload, data volume and distribution, concurrency, warm-up, cache state, build mode, hardware, network path, and run-to-run variance with every result. Change one variable at a time. Reject conclusions from a single run, a debug build, a synthetic happy path, or a benchmark whose bottleneck differs from production. Compare distributions (medians and tails over repeated runs, or a confidence interval), not one number against another. Also reject a win where the mean improves while p95/p99 worsen on the user path that matters, and a cache win that hides a missing index or adds invalidation, staleness, or memory cost.
Search loops (tuning parameters, trying many variants): log every run with its hypothesis, command, result, and correctness check. Compare each candidate with the current accepted winner, not only the previous run, and confirm a new winner on a holdout or replay workload it was not tuned on. Stop when gains fall inside the noise band, correctness fails, the cost budget is spent, or more variables are changing than you can explain. Report the "best measured variant", not an optimum, unless the search was exhaustive.
Profiler flags, tool capabilities, and version-specific behaviour are time-sensitive: verify them against current primary sources (see data/sources.json) or run --help on the pinned version. If live verification is unavailable, give methodology and mark tooling claims provisional.
When prior decisions or pitfalls are relevant, consult learnings.consolidated.md if present; use learnings.md only for needed history or as the available fallback. Otherwise skip both.
After applying it, if you encountered a pattern worth remembering, a mistake worth preventing, or a domain fact that surprised you, append one dated bullet to learnings.md via agents-skills-feedback-loop/scripts/append_learning.py. Do not modify SKILL.md itself.