Find potentially unused exports (dead code detection)
Analyzes codebase to identify potentially unused exports and dead code.
/plugin marketplace add nathanvale/side-quest-marketplace/plugin install the-cinema-bandit@side-quest-marketplacepath?claude-haiku-4-5-20251001Analyze PROJECT_INDEX.json to find exports with zero incoming references.
bun run ${CLAUDE_PLUGIN_ROOT}/src/cli.ts dead [$ARGUMENTS]
The CLI will scan for exported symbols with no references. Optional path argument scopes analysis to a directory.
Found N potentially unused exports:
| Symbol | File | Type | Last Modified |
|--------|------|------|---------------|
| legacyHelper | utils/old.ts | function | 3 months ago |
| DEPRECATED_CONST | constants.ts | variable | 6 months ago |
| UnusedType | types.ts | type | 2 months ago |
Recommendations:
1. Verify these aren't used via dynamic imports
2. Check if they're part of public API
3. Consider removing or deprecating
Automatically exclude from "unused" detection:
index.ts files (barrel exports)_ (private by convention).d.ts filesWarn the user:
import()) may not be detected