refactor-performance
Performance — code-level review of the diff — refactor-chain · review/verify
Bundle: refactor-chain (self-diagnosing, self-healing fix-it pipeline).
Phase: review / verify · Prerequisite: refactor-verify has confirmed behavior is preserved on the diff (review the correct change, not a broken one) · Next: refactor-review-gate, which folds these findings into the single ranked ship report.
Adaptivity / conditional: repo-agnostic, advisory-only. Reads the diff statically; if a runtime tracing tool is available it may confirm a hotspot, but it does not depend on one (runtime web-vitals work is refactor-web-performance's job, not this skill's).
Purpose
A behavior-preserving refactor can still quietly make code slower — a helper extraction that turns one pass into two, a loop that now hits the database per row, a memo that was dropped, a heavy dependency pulled in for one function. This skill reads the accumulated diff and flags the code-level performance costs the refactor introduced or left on the table: algorithmic hotspots, N+1 queries, unnecessary/repeated work, and bundle/query cost. It ranks findings by likely impact and hands each one a concrete fix sketch. It is advisory: it reports, it does not edit.