AL-JANEF/janef-forge / skills/engineering/performance-scalability
performance-scalability
VerifiedMeasure first, then fix latency, throughput, memory, CPU, bundle size, query count, contention, and scaling problems with before/after evidence under the same workload. Use for anything slow, expensive, or expected to scale; never optimize from intuition or trade correctness for speed silently.
Performance & Scalability
Measure first. Averages hide tail pain, intuition hides the real hot path, and a synthetic microbenchmark does not prove production improvement.
Measure
- Define the user-visible metric, workload, percentile (p95/p99), environment, and acceptable threshold before editing.
- Reproduce with representative data; isolate measurement noise; profile the dominant resource and trace the critical path.
- Frontend: bundle size, render work, media loading, layout stability, interaction latency. Backend: tail latency, saturation, queue growth, lock contention, database pressure, connection pools, downstream limits.
Optimize
- Remove unnecessary work before caching, parallelizing, or changing infrastructure.
- Fix algorithmic or query complexity (N+1, unbounded reads, missing indexes) before micro-optimizing syntax.
- Bound caches by memory, lifetime, invalidation, and tenant/security scope. A cache that leaks across tenants is a security defect, not a performance win.
- Treat concurrency as a trade-off involving contention, rate limits, ordering, and failure amplification.
- Preserve readability unless the measured gain justifies complexity and tests protect it. Do not trade correctness, durability, or consistency for speed without an explicit, recorded decision.
Verify
- Compare before and after under the same workload; report variance, not only the best run.
- Check correctness, cold/warm behavior, resource transfer (did the cost move elsewhere?), and regression on adjacent workloads.
- Use realistic load profiles for critical paths; distinguish capacity, endurance, spike, and recovery testing.
- Add a budget or benchmark gate only when the environment is stable enough to produce actionable failures.
Output
## Performance: <path>
Baseline: <metric> = <value> (p95/p99, workload, N runs, variance)
Cause: <dominant resource / hot path with evidence>
Change: <what and why>
After: <metric> = <value> (same workload)
Not covered: <e.g. production traffic mix, cold cache>
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 192k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 192k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 192k | Updated | Claude CodeCodex | Verified | Install |