← ClaudeAtlas

refactorlisted

Evidence-driven refactoring — where does structural improvement actually pay off, then make that change without changing behavior. Survey mode diagnoses by evidence, not aesthetics — git churn × complexity hotspots, the recurring-bug log, upcoming work — and verdicts each candidate REFACTOR/PREP/LEAVE/WATCH, where LEAVE is the default and "the textbook recommends it" is never a reason. Execute mode takes one approved candidate in small behavior-preserving moves, suite green after each. Keeps a debt register in out/refactor/tracker.md so repeat surveys open with what changed. Use for "clean up this module", "improve the architecture", "pay down tech debt" — e.g. "/refactor", "/refactor <target>". For new behavior use feature; for something broken use bugfix.
duthaho/skillhub · ★ 6 · Code & Development · score 75
Install: claude install-skill duthaho/skillhub
# refactor — earn it first, then preserve behavior `/refactor` — survey the repo, emit a brief of where improvement pays off `/refactor <target or goal>` — execute one candidate, safely Answer one question: **where does structural improvement actually pay for itself in this codebase — and how is that change made without changing behavior?** The skill exists to prevent the two documented failure modes of "improve the architecture": refactoring the wrong code (most ugly code is never touched again, so cleaning it returns nothing), and **pattern-itis** — applying design patterns because they're best practices rather than because a problem here demands them, turning straight-line code into abstraction lasagna. ## Survey mode — `/refactor` ### Step 1 — Evidence, not aesthetics Candidates come from signals, never from "this code looks bad": - **Hotspots** — churn × complexity. Churn from git itself: `git log --format= --name-only --since="12 months ago" | sort | uniq -c | sort -rn | head -30`, crossed with a complexity proxy (file length, indentation depth). Code that is both complex *and* frequently edited is where interest compounds; complex-but-cold code is a LEAVE by default. - **The bug log** — `out/dev/bugfix-log.md` if present. A file that shows up repeatedly is structural debt announcing itself. - **Upcoming work** — the user's stated goals, open specs and plans under `out/dev/`. These seed **PREP** candidates: make the change easy, then make the easy ch