python-dead-code
Installation
SKILL.md
Python Dead Code Detection
Detect and remove unused code in Python projects using vulture and ruff. Framework-aware analysis that distinguishes real dead code from convention-driven usage patterns.
Core Expertise
What it detects
- Unused imports (ruff F401)
- Unused variables (ruff F841)
- Redefined-unused names (ruff F811)
- Unused functions and classes (vulture)
- Unreachable code after return/raise/break (vulture)
Key capabilities
- Two-tool approach: ruff for fast lint-level checks, vulture for deeper analysis
- Framework-aware false positive filtering
- Confidence scoring (vulture
--min-confidence) - Whitelist support for intentional exceptions
- CI/CD integration (GitHub Actions, pre-commit)