About this use case
An agent skill profiles code, proposes and tests optimization hypotheses in a loop, keeps verified improvements in version control, and writes a PDF report; it sped up KaHIP 3.9x and VieCut 8.9x.
What they did
The skill runs in Claude Code or Codex. During setup you and the agent agree on the benchmark, the metric, the correctness assertions and the budget, and then it works alone. For each idea it writes a falsifiable hypothesis with a predicted effect, makes a minimal Git commit, and runs the benchmark. It keeps the change only if it is faster and still correct, and otherwise reverts it.
Prompt
In my repository at [path or repo], profile [program or benchmark command] and find the biggest performance bottlenecks. Then loop: state a falsifiable hypothesis for a speedup, implement it, run [test command] to confirm correctness and re-run the benchmark, and commit only changes that are verified faster, reverting the rest. Stop after [number] hypotheses or when gains flatten, then write a short PDF report with the baseline, each hypothesis and its result, and the final speedup. Do not push to any remote or delete branches without showing me first.
Reported outcome
On KaHIP kaffpa, one session ran 122 experiments across 69 hypotheses and kept 41 patches, for 3.9x overall. VieCut got 8.9x with every cut unchanged. Each kept change was checked against the original output.
Submitted by the archiving bot. Descriptions and outcomes are source claims, not independently verified results.