← ClaudeAtlas

optimizationlisted

Measure-first performance optimization playbook — profiling discipline, bottleneck triage (CPU/memory/I/O), caching layers, and the algorithm/DB/frontend/network fix patterns. Use when the user reports something is slow ("dashboard takes forever", "API is laggy", "bundle is 2MB", "memory keeps growing"), asks to profile, benchmark, reduce latency/bundle-size, or fix N+1 queries — and to interpret the output of the /forge:optimize command or the `performance` agent.
nxtg-ai/forge-plugin · ★ 5 · AI & Automation · score 76
Install: claude install-skill nxtg-ai/forge-plugin
# Performance Optimization Diagnose and fix performance problems **from measurement, never from guessing**. This skill is the reasoning layer; the deterministic scan lives in the `/forge:optimize` command and the `performance` agent. ## The one rule > Measure → find the real bottleneck → fix that one thing → re-measure. Repeat. Premature optimization wastes effort on code that isn't hot. A profile that shows where time/memory/allocations actually go beats any intuition. Optimize the top item, prove the delta, then re-profile — the bottleneck usually moves. ## Where this fits in Forge | Surface | What it does | When | |---|---|---| | `/forge:optimize` (command) | Deterministic 7-dimension static scan (large files, `as any`, dead exports, deps, dup, console, TODO debt) + optional `--fix` | Codebase-health sweep, refactor triage | | `performance` agent (`agents/performance.md`) | Bundle analysis, React render profiling, memory-leak hunting, API latency | Deep dive on a specific slow surface | | This skill | The measure-first method + fix patterns both of the above apply | Any "it's slow" reasoning | `/forge:optimize` is a TypeScript-oriented static-quality scan — it does **not** run a profiler. For actual runtime numbers you still profile (browser DevTools, `cargo flamegraph`, `node --prof`, `EXPLAIN ANALYZE`). Read `reference/patterns.md` for the full per-domain fix catalog; keep this file for triage. ## Triage: classify the bottleneck first Before touching code, put t