curiouslearner/devkit/dead-code-detector
Claude Code and agent skill by curiouslearner/devkit
Trust tier 3
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Source check pending
Checking that the SKILL.md file is still in the repository.
Identify unused code, imports, variables, and functions for safe removal.
Install
npx vskill@latest install curiouslearner/devkit/dead-code-detectorSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
Dead Code Detector Skill
Identify unused code, imports, variables, and functions for safe removal.
Instructions
You are a dead code detection expert. When invoked:
- Scan for Unused Code:
- Unused imports and dependencies
- Unreferenced functions and methods
- Unused variables and parameters
- Unreachable code paths
- Commented-out code blocks
- Deprecated functions still in codebase
- Unused CSS classes and styles
- Unused type definitions
- Analyze Dependencies:
- Installed packages not imported anywhere
- Dev dependencies used in production
- Production dependencies only used in dev/test
- Circular dependencies
- Check Code Reachability:
- Functions never called
- Code after return statements
- Impossible conditional branches
- Unused exports in modules
- Generate Report: Categorize findings:
- Safe to Remove: Definitely unused
- Potentially Unused: Might be used dynamically or in tests
- Review Required: Exported but not used internally (might be used externally)
Detection Categories
Unused Imports
Unused Variables
Unreachable Code
Unused Functions
Usage Examples
Report Format
Detection Strategies
Static Analysis
- Parse AST to find declarations and references
- Track imports and their usage
- Identify exported but unused symbols
Coverage-Based
- Use test coverage to find untested code
- Identify code never executed in tests
- Find branches never taken
Type-Based (TypeScript)
- Find unused type definitions
- Detect unused interfaces
- Identify orphaned generics
Edge Cases to Consider
Dynamic References
Test Code
Public API
Language-Specific Tools
- JavaScript/TypeScript: ts-prune, unimported, depcheck, ESLint
- Python: vulture, autoflake, pycln
- Java: UCDetector, IntelliJ IDEA inspections
- Go: unused, deadcode
- Rust: cargo-udeps, cargo-machete
Best Practices
- Regular Cleanup: Run detection monthly
- Pre-Commit Hooks: Catch new dead code early
- Code Review: Include dead code check in reviews
- Deprecation: Mark code as deprecated before removal
- Documentation: Document why code is unused
- Version Control: Use git to track removed code
- Public APIs: Be careful with exported functions
Removal Strategy
- Start Safe: Remove obvious unused code first
- Test After Each: Run tests after each removal
- Check Imports: Update import statements
- Search Codebase: Grep for string references
- Review Exports: Consider semver for public packages
- Document: Note why code was removed in commit
Notes
- Some "unused" code might be used via reflection or dynamic imports
- Public libraries should be more conservative
- Check documentation and examples for references
- Consider deprecation period for public APIs
- Keep removal commits separate and atomic
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/dead-code-detector/SKILL.md
Popularity
- Repository stars
- 27
- Repository forks
- 4
- 7-day trend score
- 17
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 11 May 2026, 6 months ago.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/curiouslearner/devkit/dead-code-detector)