find-dead-code

Installation
SKILL.md

Find Dead Code

Identify dead code in a codebase. Core rule: code only used in tests is still dead code. Only production usage counts.

In an incomplete or abandoned implementation, a declared-but-unused symbol may be intended-but-not-yet-used. When git history shows it was added as a deliberate part of an unfinished stack, recommend investigate rather than delete.

Step 1: Detect Languages, Scope & Test Boundaries

Determine the project structure:

  1. Check for config files: package.json, tsconfig.json, pyproject.toml, setup.py, Package.swift, .xcodeproj, Cargo.toml, go.mod, pom.xml, build.gradle
  2. Glob for source files: **/*.ts, **/*.py, **/*.swift, **/*.go, **/*.rs, **/*.java
  3. Identify source roots — where production code lives (e.g., src/, lib/, Sources/)
  4. Partition the codebase into analysis units by top-level source directories (e.g., src/auth/, src/api/, src/utils/, lib/models/). Each directory becomes one subagent's scope in Step 3.

If the user specified a scope, restrict analysis to that scope.

Test File Patterns

Installs
38
GitHub Stars
400
First Seen
Mar 11, 2026
find-dead-code — tobihagemann/turbo