← ClaudeAtlas

dead-code-finderlisted

Find genuinely unused code — unreferenced exports, unreachable files, and unused dependencies — and remove it safely with build/test verification. Use when trimming a codebase or untangling years of accreted cruft.
imtiazrayhan/agentscamp-library · ★ 1 · AI & Automation · score 75
Install: claude install-skill imtiazrayhan/agentscamp-library
Hunt down code that nothing references and delete it without breaking the build. The skill walks the dependency graph from the project's real entry points, flags exports no module imports, files no path reaches, and dependencies no source line uses — then removes them one at a time, re-running the build and tests after each deletion so a false positive surfaces immediately instead of in production. ## When to use this skill - A codebase has accumulated dead exports, orphaned files, or leftover utilities after refactors and feature removals. - `package.json` lists dependencies you suspect nothing imports anymore. - You want a measured, verifiable cleanup pass — not a risky bulk delete. > [!WARNING] > "Unreferenced" is not the same as "unused." Code can be reached at runtime in ways static search misses: string-based requires (`require(`./handlers/${name}`)`), reflection/DI containers, framework entrypoints (route files, migrations, CLI commands, test setup), config-driven plugin loading, and anything that is part of a published **public API**. Treat these as live until proven otherwise. Verify every removal with the build **and** tests before moving to the next one. ## Instructions 1. **Locate the entry points.** Identify where execution actually begins — `main`/`exports`/`bin` in `package.json`, `next.config`/route conventions, `if __name__ == "__main__"`, CLI definitions, test runners. Everything reachable from these is live; the dead set is the complement. 2. **Detect