This skill safely identifies and removes unused code across multiple programming languages. It includes comprehensive safety checks to prevent removing code that's actually needed.
Works with
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versiondead-code-removalExecute the skills CLI command in your project's root directory to begin installation:
Fetches dead-code-removal from 89jobrien/steve and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate dead-code-removal. Access via /dead-code-removal in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
0
total installs
0
this week
4
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
4
stars
This skill safely identifies and removes unused code across multiple programming languages. It includes comprehensive safety checks to prevent removing code that's actually needed.
This skill includes Python helper scripts in scripts/:
find_unused_imports.py: Uses AST parsing to accurately detect unused imports in Python files. Outputs JSON with unused imports and line numbers.
python scripts/find_unused_imports.py src/utils.py src/services.py
Find and remove unused imports and functions in this project
Clean up dead code in src/ directory, but be conservative
Check for unused functions in src/utils/ and remove them safely
Identify Project Type:
pyproject.toml, setup.py, requirements.txtpackage.json, tsconfig.jsonpom.xml, build.gradlego.modCargo.tomlDetect Entry Points:
main.py, __main__.py, app.py, run.pyindex.js, main.js, server.js, app.jsMain.java, *Application.java, *Controller.java*.config.*, settings.*, setup.*test_*.py, *.test.js, *.spec.jsCross-File Dependencies:
Framework Patterns:
Using Helper Script:
The skill includes a Python helper script for finding unused imports:
# Find unused imports in Python files
python scripts/find_unused_imports.py src/utils.py src/services.py
Unused Imports:
# Python: AST-based analysis
import ast
# Track: Import statements vs actual usage
# Skip: Dynamic imports (importlib, __import__)
// JavaScript: Module analysis
// Track: import/require vs references
// Skip: Dynamic imports, lazy loading
Unused Functions/Classes:
Never Remove If:
getattr(), eval(), globals() usage detectedwindow[], this[], dynamic import() usage@Component, @Service)Framework Preservation:
Python:
JavaScript:
Java:
Backup Creation:
backup_dir="./unused_code_backup_$(date +%Y%m%d_%H%M%S)"
cp -r . "$backup_dir" 2>/dev/null || mkdir -p "$backup_dir" && rsync -a . "$backup_dir"
Incremental Removal:
Validation:
# Python
python -m py_compile file.py
python -m pytest
# JavaScript
npx eslint file.js
npm test
# Java
javac -Xlint file.java
mvn test
Input: Clean up unused imports in src/utils/helpers.py
Output:
## Dead Code Removal: src/utils/helpers.py
### Analysis
- **File**: `src/utils/helpers.py`
- **Total imports**: 8
- **Unused imports**: 3
### Unused Imports Found
1. `import os` - Line 2 (not used anywhere)
2. `import json` - Line 3 (not used anywhere)
3. `from datetime import timedelta` - Line 5 (not used anywhere)
### Safe to Remove
✅ All 3 imports are safe to remove (no dynamic usage detected)
### Changes
```python
# Before
import os
import json
from datetime import datetime, timedelta
import requests
# After
from datetime import datetime
import requests
### Example 2: Remove Unused Functions
**Input**: Find unused functions in `src/services/`
**Output**:
```markdown
## Dead Code Removal: src/services/
### Analysis
- **Files analyzed**: 12
- **Functions found**: 45
- **Unused functions**: 2
### Unused Functions
**1. `formatOldDate()` in `src/services/utils.js`**
- **Location**: Line 34-42
- **Status**: ✅ Safe to remove
- **Reason**: No references found, not exported, not used in tests
**2. `legacyAuth()` in `src/services/auth.js`**
- **Location**: Line 78-95
- **Status**: ⚠️ Preserved (framework pattern)
- **Reason**: Referenced in route configuration (line 12)
### Summary
- **Removed**: 1 function (`formatOldDate`)
- **Preserved**: 1 function (framework usage)
- **Lines removed**: 9
- **Size reduction**: ~300 bytes
Do:
Don't:
Static Analysis:
Validation:
Report Should Include:
Make data-driven prioritization decisions faster
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
Save 3-5 hours/week on communication overhead
Prerequisites
Time Estimate
30-60 minutes to see productivity improvements
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid when
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
asyrafhussin/agent-skills
shadcn/improve
mattpocock/skills
parcadei/continuous-claude-v3
cursor/plugins
ailabs-393/ai-labs-claude-skills
dead-code-removal fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
Registry listing for dead-code-removal matched our evaluation — installs cleanly and behaves as described in the markdown.
Keeps context tight: dead-code-removal is the kind of skill you can hand to a new teammate without a long onboarding doc.
dead-code-removal is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
Solid pick for teams standardizing on skills: dead-code-removal is focused, and the summary matches what you get after install.
I recommend dead-code-removal for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
dead-code-removal reduced setup friction for our internal harness; good balance of opinion and flexibility.
I recommend dead-code-removal for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
Useful defaults in dead-code-removal — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
We added dead-code-removal from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
showing 1-10 of 36