Code Complexity Analyzer Skill
Purpose
Perform static analysis of Python source code to compute complexity
metrics. Uses Python's ast module for reliable parsing.
Invocation
Pass Python source code via SKILLSCALE_INTENT environment variable
or via stdin.
Metrics Computed
- •Cyclomatic Complexity — counts decision points (if/elif/for/while/and/or/except)
- •Function Length — lines of code per function/method
- •Max Nesting Depth — deepest nesting level per function
- •Import Count — number of imports and from-imports
- •Class Count — number of classes defined
Output
Markdown-formatted report with per-function metrics table and overall file-level summary.
Limitations
- •Python source only (not other languages).
- •Does not follow imports to analyze dependencies.
- •Maximum input: 500KB.