cyclomatic-complexity

Installation
SKILL.md

Cyclomatic Complexity

Purpose: AI-written code often works but branches like a jungle. This skill: measure complexity, refactor hotspots, keep code human-maintainable.

Measure first

CC = decision points + 1. Decision points: if, else if, case, loops, catch, ternary, &&, || in conditions.

Project linter config wins. If eslintrc, radon config, sonar config, or similar sets a complexity threshold, use that. No config: use defaults below.

Thresholds:

  • 1-5: fine, leave alone
  • 6-10: watch, refactor if touching anyway
  • 11-15: refactor now
  • 15+: must split, no debate
Installs
66
GitHub Stars
391
First Seen
Aug 26, 2026
cyclomatic-complexity — saurabhkumar8112/cyclomatic-complexity-skill