← ClaudeAtlas

pytest-optimizerlisted

Use when the user wants to make a pytest suite faster, profile slow tests or fixtures, find unused or mis-scoped fixtures, consolidate duplicate test tracks, migrate to typed parametrize, or apply safe test speedups. Triggers on phrases like "speed up my tests", "why are my tests slow", "profile pytest", "optimize the test suite", "find slow fixtures", "my fixtures are slow", "which fixtures are unused", "the test suite takes too long", or "parallelize my tests". Runs a resumable four-phase pipeline (scan, benchmark, plan, execute) that measures before it mutates and applies each speedup as its own verified commit. Does not edit the suite until a speedup clears the noise band and a safety gate.
tony/ai-workflow-plugins · ★ 2 · Testing & QA · score 59
Install: claude install-skill tony/ai-workflow-plugins
# pytest-optimizer Profile a pytest suite, find **safe** speedups, and apply each one as its own verified commit — through a resumable, idempotent four-phase loop. The core discipline: **measure before you mutate, and prove a speedup against the project's own timing noise before you trust it.** A theoretically great change whose measured delta falls inside the noise band is worth nothing and is never committed. `$ARGUMENTS` may name a test path or marker to scope the run, a `--phase` to jump to, `--force` to ignore idempotency tokens and re-run, and `--memory-dir` to override where durable state is written. ## The loop ``` 00-scan -> 01-benchmark -> 02-plan -> 03-execute -> (re-scan) ``` Each phase is a separate command that reads and writes durable JSON under the resolved memory directory. Re-running the whole skill resumes at the first incomplete phase. After `03-execute`, re-scanning measures the new baseline and the loop can continue until no candidate clears the rubric. | Phase | Command | Reads | Writes | |-------|---------|-------|--------| | 1 | the `pytest-optimizer-00-scan` skill | `AGENTS.md`/`CLAUDE.md`, prior `state.json` | `baseline.json`, `capabilities.json`, `hypotheses.json` | | 2 | the `pytest-optimizer-01-benchmark` skill | `baseline.json`, `hypotheses.json` | `benchmarks.json` | | 3 | the `pytest-optimizer-02-plan` skill | `benchmarks.json`, `baseline.json` | `plan.json` | | 4 | the `pytest-optimizer-03-execute` skill | `plan.json`, `baselin