← ClaudeAtlas

cleanerlisted

Use when AI-generated code has bloated the repo: oversized files or classes, dead or unused code (functions, imports, variables, types, whole files), or duplicated blocks that need merging. Behavior-preserving cleanup only. Run when the user says "clean up this code", "remove dead code", "split this file", "this file is too big", "deduplicate", or "refactor without changing behavior". Not for new features, bug fixes, performance work, or over-engineering review.
Swellshinider/janitor · ★ 0 · AI & Automation · score 70
Install: claude install-skill Swellshinider/janitor
# Cleaner Behavior-preserving cleanup. Smaller files, no dead code, no duplication, same behavior. The test suite ends green and the public surface is unchanged. If a change would alter behavior, do not make it. ## The Contract (non-negotiable) 1. **Tests first.** Run the project's tests before touching anything. Record green or red. If there is no test suite, say so and ask before proceeding. 2. **One change at a time.** Apply one logical edit, re-run the tests, then commit or revert. On the first failure you did not cause, stop and revert. 3. **Public surface frozen.** Exported names, function signatures, types, and module paths stay identical. Internal moves only. 4. **No dynamic guesses.** Never delete code that may be reached by reflection, string dispatch, `eval`, dependency injection, or `__all__`-gated exports. When unsure, keep it and flag it for the human. 5. **Every change gets a diff and a one-line reason.** Group changes into a reviewable set; nothing lands silently. ## How it works Assess, propose, execute. Use the detection scripts to find candidates, rank them by safety, then apply one at a time with verification. - **Assess.** Run `scripts/find_oversized.py`, `find_unused.py`, and `find_duplicates.py`, each with `--json`. Build a findings list. - **Propose.** Rank by blast radius: pure-internal dead code first, then duplication, then file or class splits last. State the order out loud. - **Execute.** Apply one change, run the tests