dead-code-sweep
Originally frompetekp/agent-skills
Installation
SKILL.md
Dead Code Sweep
Systematic identification and removal of dead code, redundant implementations, and orphaned artifacts in codebases — particularly those maintained by coding agents with limited context windows.
Why Agent-Maintained Codebases Accumulate Cruft
Coding agents operate within narrow context windows. When refactoring, they often:
- Re-implement functionality without finding and removing the original
- Leave compatibility shims for interfaces that no longer exist
- Abandon helper functions after inlining their logic
- Create new files without deleting the ones they replace
- Duplicate type definitions across module boundaries
- Leave imports for symbols they stopped using mid-refactor
This cruft compounds. Each orphaned artifact misleads the next agent (or human), who wastes context budget reading code that does nothing.