← ClaudeAtlas

dead-code-removallisted

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.
aiskillstore/marketplace · ★ 329 · AI & Automation · score 85
Install: claude install-skill aiskillstore/marketplace
# 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 ```