dead-code-removal

Solid

Detects 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

View on GitHub

Quality Score: 85/100

Stars 20%
84
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
0
Description 5%
100

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