skills/benchmark-optimization-loop/SKILL.md
Use this skill to convert "make it 20x faster" or "try 50 recursive optimizations" into a bounded measured loop that can actually improve a system.
Do not optimize until these exist:
If the user asks for an unrealistic target, keep the ambition but make the loop bounded and measurable.
Track variants like this:
Variant | Hypothesis | Command | Time | Correct? | Notes
baseline | current path | npm run job | 120s | yes | stable
batch-500 | fewer round trips | npm run job -- --batch 500 | 42s | yes | winner
parallel-8 | more workers | npm run job -- --workers 8 | 31s | no | rate limited
For recursive or hyperparameter work:
Use phrases like "best measured safe variant" instead of "global optimum" unless the search space was actually exhaustive.
A variant cannot become the new default until: