code-complexity-scanner

Installation
SKILL.md

Code Complexity Scanner

Overview

This skill analyzes source code to measure cyclomatic complexity, cognitive complexity, and function length. It identifies the most complex functions and files in a codebase, helping teams focus refactoring efforts on the code that's hardest to maintain and most likely to harbor bugs.

Instructions

Step 1: Identify Target Language and Files

Detect the primary language from file extensions and package files. Filter to source code only (exclude node_modules, vendor, dist, build, pycache, .git).

Step 2: Measure Cyclomatic Complexity

For each function/method, count:

  • if, elif/else if → +1 each
  • for, while, do-while → +1 each
  • case in switch (each case) → +1 each
  • catch → +1
Related skills
Installs
1
GitHub Stars
47
First Seen
Mar 13, 2026