Dead Code
Identifies and highlights unused or unreachable code segments, improving codebase clarity and reducing potential maintenance overhead.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add dead-code npx -- -y @trustedskills/dead-code
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"dead-code": {
"command": "npx",
"args": [
"-y",
"@trustedskills/dead-code"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
dead-code
What it does
This skill enables AI agents to identify and remove unused, obsolete, or redundant code within software projects. It streamlines maintenance by automatically scanning repositories to find functions, variables, or files that are no longer referenced or executed.
When to use it
- Refactoring legacy codebases where documentation is missing or outdated.
- Reducing technical debt before deploying a new feature to production.
- Cleaning up projects after deleting specific modules or dependencies.
- Preparing code for performance optimization by eliminating bloat.
Key capabilities
- Automated detection of dead functions and variables.
- Identification of unused imports and dependencies.
- Removal of obsolete files from the project structure.
- Integration with continuous integration workflows for ongoing cleanup.
Example prompts
- "Scan my current repository and list all JavaScript functions that have never been called."
- "Remove any Python modules in this folder that are no longer imported by other scripts."
- "Identify unused CSS classes and delete them from the stylesheet to reduce file size."
Tips & gotchas
Ensure you back up your code before running automated deletion scripts, as false positives can inadvertently remove functional logic. This skill works best on projects with established build pipelines where execution paths are clear.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.