← ClaudeAtlas

awb-optimizelisted

WHAT: make code measurably faster (or lighter) with a disciplined loop — set a baseline, measure to find the real bottleneck, fix the top one, re-measure, and record a before/after table — so a change is kept only when a number says it helped. USE WHEN: a concrete performance goal on real code ("this is too slow", "optimize X", "cut the p95 latency / memory", "speed up the import"), where you can measure before and after. DO NOT TRIGGER: "tidy this up / simplify" with no speed goal (that is a review/simplify skill); a correctness bug (that is a debug skill); micro-tuning with no measurable target or baseline.
doivamong/agent-workbench · ★ 2 · AI & Automation · score 78
Install: claude install-skill doivamong/agent-workbench
# Optimize (measure-driven) > **Announce on activation:** "Using awb-optimize — baseline first, then measure → fix → verify." If you can't state the goal as a number ("p95 under 200 ms", "peak RSS under 400 MB"), stop and define that first — optimization without a metric is guessing. ## Scope - **Does:** drive a measure → fix-one → re-measure loop and force a before/after record. - **Does NOT:** ship a profiler (use `cProfile` / `perf` / `timeit` / your bench harness), guarantee a speedup, or pick the target for you. The thresholds here are per-app, per-workload heuristics. ## Process 1. **HARD GATE: baseline before any change.** Record the current number on representative data, with the exact command. No baseline → you can't tell improvement from noise. Run it 2–3×; if it swings wildly, your measurement is too noisy to act on — fix that first. 2. **Measure where the time goes.** Profile and rank the hotspots by actual cost. Intuition about "the slow part" is wrong often enough to waste the effort. 3. **Fix the single biggest one.** One change per loop, so the next measurement attributes the delta. 4. **Re-measure, keep or revert.** Same command. If it didn't beat the baseline past the noise, **revert it** (`git checkout`) — a change that doesn't move the number is just complexity. If it helped, that's the new baseline; loop. 5. **Record a before/after table** on every shipped win, so it's legible and reversible: | Metric | Before | After | How meas