← ClaudeAtlas

find-dead-codelisted

Find genuinely dead / unused / unreachable SOURCE code - unused functions, classes, methods, exports, and unreachable branches that a linter's local-scope rules miss. Wraps the right whole-program tool for the stack (vulture, knip, go deadcode, etc.) with a curated allowlist for the project's dynamic-reference patterns so findings are low-noise and safe to act on. Generic skill - forge-adapt tailors the tool, paths, and false-positive patterns to the project. Use when the user asks to "find dead code", "remove unused code", "what code is unused", "dead-code scan", or "clean up the codebase" before a refactor or release.
agigante80/forge-kit · ★ 0 · Code & Development · score 62
Install: claude install-skill agigante80/forge-kit
<!-- find-dead-code-version: 1 --> # Find Dead Code Locate genuinely-dead source code so it can be removed safely - WITHOUT proposing the deletion of code that only *looks* unused because it is referenced dynamically (routes, DI, reflection, serialization, string-keyed dispatch, public exports). This is the SOURCE-code counterpart to `dep-auditor` (which owns unused *dependencies*). > **This is a generic template.** `forge-adapt` adapts the tool choice, scan paths, confidence > threshold, and the dynamic-reference table below to the project's actual stack and frameworks. ## The load-bearing rule > **The tool flags CANDIDATES, not verdicts.** Never delete a symbol because the scanner listed > it. Every candidate must be confirmed to have no *dynamic* reference before removal, and the > **build + full test suite is the real safety net** - static/grep analysis cannot see reflection, > field-name aliases, or dynamic dispatch, but a green build + tests catch what the scan misses. > Deleting a dynamically-referenced symbol (a route handler, an ORM column, a DI provider, a > migration hook) compiles fine and breaks production silently. ## Local vs global dead code - use the right tool - **Local** (unused imports, unused locals, redefinitions) is almost always already caught by the project's linter/compiler in CI - Python `ruff`/pyflakes (`F401/F811/F841`), ESLint `no-unused-vars`, `tsc --noUnusedLocals`, Go `vet`, the Rust compiler. Do not re-report it. - **Global / whole