Dead Code Detector Skill
Purpose
Static analysis of Python source code to find dead code patterns:
unused imports, unused variables, unreachable statements, and empty
function bodies. Uses Python's ast module for parsing.
Invocation
Pass Python source code via SKILLSCALE_INTENT environment variable
or via stdin.
Checks Performed
- •Unused Imports — imports that are never referenced in the code
- •Unused Variables — local variables assigned but never read
- •Unreachable Code — statements after return, raise, break, continue
- •Empty Functions — function/method bodies that contain only
passor...
Output
Markdown-formatted report listing each issue with its type, line number, and description.
Limitations
- •Python source only.
- •Does not resolve dynamic attribute access or
globals()/locals(). - •Does not follow imports across modules.
- •Maximum input: 500KB.