← ClaudeAtlas

refactorlisted

Clean up and improve already-written code — simplification, reuse/DRY extraction, efficiency, language modernization, and architecture/layer hygiene. QUALITY-ONLY: this skill does NOT hunt for correctness bugs — use /code-review for that. It applies edits then verifies via format + test. TRIGGER when: the user wants to tidy, simplify, modernize, de-duplicate, or make changed code more reusable or efficient. DO NOT TRIGGER when: the user wants to hunt correctness/security/crash bugs (use /code-review), scan the WHOLE codebase for rot/ball-of-mud hotspots (use /arch-health), or design a module's interface from scratch (use /codebase-design).
mik2win/foureyes · ★ 2 · Code & Development · score 79
Install: claude install-skill mik2win/foureyes
# Refactor Improve the quality of changed code WITHOUT changing its behavior. Pure refactor: same inputs produce the same outputs. This skill APPLIES the cleanups, then runs the project's `format` and `test` commands to confirm nothing broke. It does NOT look for bugs — for correctness/security/crash analysis run `/code-review`. --- ## Phase 0 — Load profile Read these before touching any code. They define every project fact this skill needs: 1. `.claude/PROJECT.md` — Commands (`format`, `lint`, `test`), Architecture (layers, boundaries, composition root), and any project-specific conventions. 2. `.claude/rules/_generic/*` — stack-agnostic rules (code quality, comments, naming). If `CONTEXT.md` exists, align names toward its ubiquitous language (a rename to the canonical term is behaviour-preserving and in scope). 3. Stack rule packs in `.claude/rules/*` whose `paths` (front-matter glob) match the target files. These carry the language- and framework-specific modernization and anti-pattern checks — do not hardcode any here; defer to them. If `PROJECT.md` is missing or still `TEMPLATE`, fall back to the root `CLAUDE.md` (always in context) when it carries the commands/architecture above — proceed on it, noting you're running without a kit profile. Only if *neither* has those facts, tell the user to run `/bootstrap` first, then stop. --- ## Phase 1 — Resolve target `$ARGUMENTS` selects what to refactor: - **file path** — that file. - **directory** — all