Install any skill in seconds. Free to start, no credit card required.
Get Started Free →tobihagemann/find-dead-code
Find dead code using parallel subagent analysis and optional CLI tools, treating code only referenced from tests as dead.
Passed 12 of 16 test cases with the skill, and 10 of 16 without it.
and 2 more in the full report
5 fixed11 passed either way3 still failing3 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 5 test cases the skill fixed. Same model, same prompt, with and without the skill.
A test-only method `syncUserData()` is referenced in `.turbo/plans/sync.md`, where the YAML frontmatter explicitly sets `status: done`. What action should be recommended for `syncUserData()`?
| Checked | Without skill | With skill |
|---|---|---|
| Recommends investigate for the symbol referenced in the plan. | Missed | Passed |
| Notes that the roadmap plan status claims the feature shipped. | Passed | Passed |
The instructions your model reads when the skill loads.
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.
Determine the project structure:
package.json, tsconfig.json, pyproject.toml, setup.py, Package.swift, .xcodeproj, Cargo.toml, go.mod, pom.xml, build.gradle**/*.ts, **/*.py, **/*.swift, **/*.go, **/*.rs, **/*.javasrc/, lib/, Sources/)src/auth/, src/api/, src/utils/, lib/models/). Each directory becomes one sub-agent's scope in Step 3.If the user specified a scope, restrict analysis to that scope.
Establish which files are test files. Code referenced ONLY from these locations is dead.
| Language | Test file patterns |
|---|---|
| TS/JS | *.test.{ts,tsx,js,jsx}, *.spec.{ts,tsx,js,jsx}, __tests__/**, __mocks__/**, *.stories.{ts,tsx,js,jsx} |
| Python | test_*.py, *_test.py, tests/**, test/**, conftest.py |
| Swift | *Tests.swift, *Test.swift, Tests/**, *UITests.swift, XCTestCase subclasses |
| Go | *_test.go, testdata/** |
| Rust | tests/**, benches/**, #[cfg(test)] modules (inline test modules within source files) |
| Java/Kotlin | src/test/**, *Test.java, *Tests.java, *Spec.java, *Test.kt |
| General | fixtures/**, __fixtures__/**, mocks/**, testutils/**, testhelpers/**, spec/** |
Also exclude: test runner configs (jest.config.*, vitest.config.*, pytest.ini), storybook files, benchmark files.
If a CLI tool is installed, run it as a fast first pass for zero-reference dead code.
| Language | Tool | Check | Run |
|---|---|---|---|
| TS/JS | knip | npx knip --version | npx knip --no-exit-code |
test cases passed, vs 10 / 16 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.