← ClaudeAtlas

cleanuplisted

Removes dead code in the area the current prompt is about, verifying every callsite of what it touches first so nothing regresses. Read the ask, find what's actually unreachable, prove it, then delete. Use when the user says "cleanup", "remove dead code", or "tidy this up".
LinardsLiepenieks/honecode · ★ 0 · Code & Development · score 70
Install: claude install-skill LinardsLiepenieks/honecode
# Clean up dead code Work **only** the area the current prompt is about: files named, the diff just made, the thing being discussed. Don't sweep the repo. 1. **Read the ask** to fix the scope. State in one line what's in bounds. 2. **Find the dead**: unreachable branches, unused exports/params/props, orphaned files, commented-out blocks, stale comments describing code that no longer exists, config for features that shipped or died. 3. **Prove it before deleting.** Grep every symbol and file path you plan to remove, across the whole repo, not just the module: imports, re-exports, dynamic/string references, tests, config, docs, other languages. A thing with one live callsite is not dead. If you can't prove it's unused, leave it and say why. 4. **Condense the comments.** A comment describes the code as it is *now*: short, present tense, one line where one line does. Cut anything that narrates history instead of state: "was X, now Y", "changed to fix…", "previously handled by…", "keeping this for now", dates, PR/ticket numbers, before/after rationale. Git already has that. Cut restated code (`// increment i`) and stale text describing behavior that moved. Keep the non-obvious *why* (an invariant, a workaround for a real upstream bug, a load-bearing ordering constraint), trimmed to its point. 5. **Delete, don't rewrite.** Removing is in scope; refactoring behavior is not. If something reads badly but is live, note it and move on. 6. Run the lint/test/typecheck gate for what you