benchmark-optimization-loopcommit 0765f7aSKILL.md · Performance
Benchmark Optimization Loop
Turns speed-up requests into a bounded, measured loop: baseline first, one-hypothesis variants, a correctness gate, and the fastest safe variant wins.
npx skills add affaan-m/ECC --skill benchmark-optimization-loopCommand selected. Copy it manually.
- Permissions
- read-repo
- write-files
- shell
- network
- Compatible with
- Claude Code, Codex, Cursor, Copilot, OpenCode
- GitHub
- 294.3k
- Source
- Community · Affaan Mustafa
- Status
- Scan passed
- License
- MIT
- Category
- Performance
Core rule
Do not optimize until the operation, correctness gate, metric, baseline and search budget are defined.
Execution Phases
Phase 01Define the baseline
Fix the operation, the correctness gate that must stay green, the metric, the current baseline and the budget for variants, time, spend and data impact.
Phase 02Measure and find bottlenecks
Measure the baseline and identify bottlenecks from evidence.
Phase 03Run one-hypothesis variants
Each variant tests one hypothesis on the same input shape and goes in a variant table; for recursive search, log every run and compare against the prior accepted winner.
Phase 04Promote through the gate
Reject variants that fail correctness, safety or reproducibility; promote the fastest safe one only when tests pass, the delta repeats and rollback is obvious.
Phase 05Codify and confirm
Encode the winner in a script, command, test, config or doc, rerun baseline and winner to confirm the delta, and report exact commands and measurements.
Permissions (summarised from SKILL.md)
| Capability | Needed | Details |
|---|---|---|
| File writes | Required | Edits code and codifies the winning path in scripts, tests, configs or docs. |
| Command execution | Required | Runs benchmarks for the baseline and each variant, plus correctness tests. |
| Network outbound | Not required | The skill does not call for network access. |
SKILL.md frontmatter (YAML)
---
name: benchmark-optimization-loop
description: Convert 'make it faster' requests into a bounded measured optimization loop — baseline first, generate one-hypothesis variants, benchmark each against a correctness gate, and promote the fastest safe variant with reproducible commands. Use when asked to speed something up, try many variants, run recursive optimization, benchmark latency/throughput/cost, or pick the best implementation by repeated measured tests.
license: MIT
metadata:
origin: ECC
tools: Read, Write, Edit, Bash, Grep, Glob
---