Measures cyclomatic complexity of functions and refactors hotspots using guard clauses, extraction, and lookup tables. Activates on refactoring, complexity, or code quality discussions.
Ships in cyclomatic-complexity. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Purpose: AI-written code often works but branches like a jungle. This skill: measure complexity, refactor hotspots, keep code human-maintainable.
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:
Prefer real tools over eyeballing when environment allows:
radon cc -s -a <path>complexity rulegocyclolizard <path>No tool available: count manually, per function, show the count.
if (isEligibleForRefund(order)) beats a 4-clause boolean soup.End every refactor with:
## Complexity report
| Function | Before | After |
|----------|--------|-------|
| parseOrder | 14 | 4 |
Extracted: validateHeader, resolveDiscount
Behavior verified: <how>
Keep prose minimal. Numbers and diffs do the talking.
What SKILL.md sets; muted values are Claude Code's defaults
/cyclomatic-complexity:cyclomatic-complexityfrom cyclomatic-complexity
npx claudepluginhub saurabhkumar8112/cyclomatic-complexity-skill --plugin cyclomatic-complexityOther plugins' skills for the same job