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.

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

Establish which files are test files. Code referenced ONLY from these locations is dead.

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