Find Unused Dependencies
- Run automated analysis:
npx depcheck 2>/dev/null | head -40
npx unimported 2>/dev/null | head -40
- For each flagged package, manually verify:
grep -r "require\|from\|import" src/ --include="*.ts" --include="*.js" | grep "package-name" | head -5
- Watch for false positives:
- Packages used in config files (
.eslintrc, jest.config)
@types/* packages (used by TypeScript compiler)
- Peer dependencies (required by other packages)
- Dev tools used in scripts
- Classify each:
- Safe to remove: confirmed unused, no config reference
- Keep: used in config or indirectly
- Investigate: uncertain
- For safe removals, show the
npm uninstall commands. Ask for confirmation before running.
- Estimate bundle size savings.
Use this skill with your AI agent:
Open on Skill Issue to copy, download, or add to your library.
Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.