Find dead Python code (unused imports, functions, classes, methods, variables, unreachable statements) with confidence scores. Use when the user asks to find, audit or clean up unused or dead code in a Python project.
97%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Treat every finding as a candidate. Work through this list before recommending removal.
pyproject.toml entry points, setup.cfg, YAML, JSON, templates).getattr, importlib, globals(), plugin or registry patterns, serialization hooks, ORM or framework conventions that call methods by name.unused_import, check re-exports (from .x import y in an __init__.py without __all__) and imports kept for side effects.unreachable_code, confirm the preceding return, raise, continue or break is unconditional in that block; the statement after it never runs.handle_<event>, visit_<Node>, on_<signal>): add a --whitelist pattern.Re-run the scanner on the same paths: removing a function can make its helpers unused in turn. Repeat until the output is stable or only whitelisted names remain.