dead-code-eliminator
Identify and safely remove dead, unused, and unreachable code from codebases
Best use case
dead-code-eliminator is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Identify and safely remove dead, unused, and unreachable code from codebases
Teams using dead-code-eliminator should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/dead-code-eliminator/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How dead-code-eliminator Compares
| Feature / Agent | dead-code-eliminator | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Identify and safely remove dead, unused, and unreachable code from codebases
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Dead Code Eliminator Skill
Identifies and safely removes dead code, unused functions, unreachable code paths, and orphaned files from codebases to reduce complexity and maintenance burden.
## Purpose
Enable safe dead code removal for:
- Codebase simplification
- Migration preparation
- Technical debt reduction
- Build size optimization
- Maintenance cost reduction
## Capabilities
### 1. Unused Function Detection
- Find uncalled functions
- Identify unused exports
- Detect unreferenced methods
- Map call graphs
### 2. Unreachable Code Identification
- Analyze control flow
- Find code after returns
- Detect impossible conditions
- Identify dead branches
### 3. Unused Variable Detection
- Find unread variables
- Identify write-only variables
- Detect unused parameters
- Flag shadowed variables
### 4. Orphan File Detection
- Find unimported modules
- Identify orphaned assets
- Detect unused configuration
- Map file dependencies
### 5. Safe Removal Verification
- Verify no runtime references
- Check dynamic imports
- Validate reflection usage
- Test after removal
### 6. Impact Analysis
- Estimate removal scope
- Calculate size reduction
- Assess risk level
- Document dependencies
## Tool Integrations
| Tool | Language | Integration Method |
|------|----------|-------------------|
| ts-prune | TypeScript | CLI |
| unimported | JavaScript | CLI |
| deadcode | Python | CLI |
| UCDetector | Java | Eclipse Plugin |
| unused | Rust | CLI |
| deadcode | Go | CLI |
| webpack-bundle-analyzer | JavaScript | CLI |
## Output Schema
```json
{
"analysisId": "string",
"timestamp": "ISO8601",
"deadCode": {
"functions": [
{
"file": "string",
"name": "string",
"line": "number",
"confidence": "high|medium|low",
"reason": "string"
}
],
"variables": [],
"files": [],
"unreachable": []
},
"impact": {
"filesAffected": "number",
"linesRemovable": "number",
"estimatedSizeReduction": "string"
},
"risks": [],
"recommendations": []
}
```
## Integration with Migration Processes
- **code-refactoring**: Pre-refactoring cleanup
- **legacy-decommissioning**: Feature removal
- **monolith-to-microservices**: Service extraction prep
## Related Skills
- `static-code-analyzer`: Combined analysis
- `code-smell-detector`: Related smell detection
## Related Agents
- `legacy-decommissioning-specialist`: Uses for cleanup
- `code-transformation-executor`: Executes removalRelated Skills
dead-stock-identifier
Slow-moving and obsolete inventory identification skill with disposition planning and working capital optimization
intercompany-eliminator
Automated intercompany transaction identification and elimination skill for consolidated reporting
process-builder
Scaffold new babysitter process definitions following SDK patterns, proper structure, and best practices. Guides the 3-phase workflow from research to implementation.
babysitter
Orchestrate via @babysitter. Use this skill when asked to babysit a run, orchestrate a process or whenever it is called explicitly. (babysit, babysitter, orchestrate, orchestrate a run, workflow, etc.)
yolo
Run Babysitter autonomously with minimal manual interruption.
user-install
Install the user-level Babysitter Codex setup.
team-install
Install the team-pinned Babysitter Codex workspace setup.
retrospect
Summarize or retrospect on a completed Babysitter run.
resume
Resume an existing Babysitter run from Codex.
project-install
Install the Babysitter Codex workspace integration into the current project.
plan
Plan a Babysitter workflow without executing the run.
observe
Observe, inspect, or monitor a Babysitter run.