dead-code-removal
SolidDetects and safely removes unused code (imports, functions, classes) across multiple languages. Use after refactoring, when removing features, or before production deployment. Includes safety checks and validation.
AI & Automation 335 stars
29 forks Updated today
Install
Quality Score: 85/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# Dead Code Removal
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.
## When to Use This Skill
- After refactoring code and removing features
- Before production deployment to reduce bundle size
- When cleaning up legacy code
- When removing deprecated functionality
- When optimizing codebase size
- When maintaining code quality standards
## What This Skill Does
1. **Language Detection**: Identifies project languages and structure
2. **Entry Point Mapping**: Maps entry points and critical paths
3. **Dependency Analysis**: Builds dependency graphs and usage patterns
4. **Safe Detection**: Identifies unused elements with safety checks
5. **Incremental Removal**: Removes code incrementally with validation
6. **Backup Creation**: Creates backups before making changes
## Helper Scripts
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.
```bash
python scripts/find_unused_imports.py src/utils.py src/services.py
```
## How to Use
### Remove Unused Code
```
Find and remove unused imports and functions in this project
```
```
Clean up dead code in src/ directory, but be conservative
```
### Specific Analysis
```
Check for unused functions in src/utils/ and remove them safely
```
...
Details
- Author
- aiskillstore
- Repository
- aiskillstore/marketplace
- Created
- 5 months ago
- Last Updated
- today
- Language
- Python
- License
- None
Similar Skills
Semantically similar based on skill content — not just same category
AI & Automation Solid
dead-code-eliminator
Identify and safely remove dead, unused, and unreachable code from codebases
1,160 Updated today
a5c-ai AI & Automation Listed
dead-code-detector
Identify unused code, imports, variables, and functions for safe removal.
335 Updated today
aiskillstore AI & Automation Listed
dead-code-removal
Use to identify and safely delete unused functions, classes, exports, and files.
7 Updated 2 days ago
yeaight7 AI & Automation Solid
dead-code
Find unused functions and dead code in the codebase
496 Updated 1 months ago
vibeeval AI & Automation Listed
dead-code
Find unused functions and dead code in the codebase
3,795 Updated 4 months ago
parcadei