← ClaudeAtlas

refactorlisted

Improves existing work in scored rounds instead of rewriting it. Each round attacks the champion's weakest criterion with a reviewable diff, scores the result, and fights it head-to-head (VS) against the current champion; the loop runs until a challenger fails to beat it on both score and VS, then reports a full analysis plus a round-by-round table. Use when the user says "/refactor", "refactor this and compare", "make this better", "polish this", "sharpen it", "refine it", "optimize it", "improve it until it can't be improved". For throwing the code away and starting over, use rewrite instead.
olcayseygan/crumora · ★ 0 · Code & Development · score 72
Install: claude install-skill olcayseygan/crumora
# refactor — sharpen it in place Take what exists and **sharpen it, round after round**, until another pass stops being worth it. Sibling of **rewrite**. Same tournament, opposite move: | | rewrite | refactor | | --- | --- | --- | | Starting point | blank file, spec only | the champion's actual code | | Round output | a whole new version | a **reviewable diff** | | Question it answers | "is a different design better?" | "how good can *this* design get?" | | Ends when | a fresh attempt stops winning | a diff stops being worth its cost | If mid-run the honest answer becomes *"this needs to be thrown away, not patched"*, **stop and say so**, then recommend `rewrite`. Grinding polish onto the wrong design is the failure mode this skill has to avoid. --- ## 0. Pick the target If the user passed an argument, that is the target (`/refactor src/parser.ts`). If not, ask **one question**: what should be improved. Then write the **behaviour contract** — 3-8 bullets of what must stay true no matter what changes. This is not a wish list, it is a fence. Anything not in it is fair game to change; anything in it is a regression if broken. If the run is *meant* to change behaviour (fixing a known bug, tightening a limit), write that as an explicit bullet before round 1. Silent behaviour changes discovered in round 4 poison every earlier comparison. ## 1. Setup (round 0) 1. **Champion = the current code.** Read it properly, all of it. 2. **Freeze the rubric** (§3) and **score the ch