find-dead-codelisted
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