find-dead-code
Find dead code using parallel subagent analysis and optional CLI tools, treating code only referenced from tests as dead. Use when the user asks to \"find dead code\", \"find unused code\", \"find unused exports\", \"find unreferenced functions\", \"clean up dead code\", or \"what code is unused\". Analysis-only — does not modify or delete code.
npx skills add majiayu000/claude-skill-registry --skill find-dead-code-tobihagemann-turbo --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 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. | 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/**`, `t
- Step 1: Detect Languages, Scope & Test Boundaries
- Test File Patterns
- Step 2: Quick Wins — CLI Tools (Optional)
- Step 3: Test-Only Analysis — Parallel Subagents (Core)
- Subagent Strategy
- Subagent Task
- Merging Results
- Step 4: Filter, Classify & Evaluate
- Evaluate Findings
- Recommend Action
- Common Dead Code Patterns
- Adjacent Findings
- Step 5: Present Findings
- Definite Dead (zero references outside definition)
What does the find-dead-code skill do?
Find dead code using parallel subagent analysis and optional CLI tools, treating code only referenced from tests as dead. Use when the user asks to \"find dead code\", \"find unused code\", \"find unused exports\", \"find unreferenced functions\", \"clean up dead code\", or \"what code is unused\". Analysis-only — does not modify or delete code.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill find-dead-code-tobihagemann-turbo --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
