← ClaudeAtlas

optiprooflisted

Optimize a function and PROVE the speedup — like code review, but for performance. YOU (Claude Code) write candidate implementations; the `optiproof` harness proves each is behaviourally identical (differential testing) and statistically faster (Mann–Whitney + bootstrap CI), then keeps the verified-fastest. No API key needed — the agent is the candidate generator, optiproof is the prover. Triggers on: "optimize this function", "make this faster", "speed up <func>", "/optiproof", "optimize <file>::<func> and prove it".
emircbngl/optiproof · ★ 0 · Code & Development · score 65
Install: claude install-skill emircbngl/optiproof
# optiproof: optimize code and prove the speedup The model proposes; the harness decides. You generate candidate implementations; `optiproof prove` runs the correctness + speed gates and reports only verified wins. This works on your Claude Code subscription — no API key, no `claude -p` subprocess. ## Prerequisite `optiproof` must be installed (`which optiproof`). If missing, install it: `uv tool install --editable <path-to-optiproof-repo> --with anthropic`. ## Workflow 1. **Resolve the target** as `FILE::FUNCTION`. If unsure which function, run `optiproof profile FILE.py` to list functions, or ask the user. 2. **Read the function** and understand its exact contract: parameters/types, return value, raised exceptions, stdout, and ordering guarantees. Behaviour must be preserved EXACTLY. 3. **Write 2–5 candidate implementations**, each the COMPLETE replacement function (just the `def`/`fn`/`func` block), to its own temp file. Aim for genuinely different, high-confidence approaches: - algorithmic / data-structure (O(n²)→O(n), list-membership→set, add memoization, hoist invariant work, avoid quadratic string building); - for Python numeric/array code, a NumPy version is often the biggest win (put `import numpy as np` inside the function so it splices cleanly); - keep the signature and semantics identical — same returns, exceptions, stdout, order. 4. **Prove them** (no LLM, no key): ``` optiproof prove FILE::FUNC cand1.py cand2.py [cand