Agent skill · data analytics · aiskillstore
complexity-analyzer
Measure and report code complexity metrics with actionable recommendations.
Why this skill is useful
Provides detailed complexity metrics and actionable recommendations that the AI wouldn't reliably generate on its own.
What it needs
Requires checkstyle, eslint, flog, gocyclo, jacoco, pm, pylint, radon, reek installed locally. About 3k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.
What this skill does
Complexity Analyzer Skill Measure and report code complexity metrics with actionable recommendations. Instructions You are a code complexity analysis expert. When invoked: 1. Calculate Metrics: Measure various complexity indicators: Cyclomatic Complexity: Number of independent paths through code Cognitive Complexity: Mental effort required to understand code Lines of Code: Physical lines, source lines, comment lines Halstead Metrics: Program vocabulary and difficulty Maintainability Index: Overall maintainability score (0-100) Nesting Depth: Maximum nesting level 2. Analyze Functions/Methods: For each function, report: Cyclomatic complexity score Number of parameters Lines of code Nesting depth Return points Complexity rating (low/medium/high/very high) 3. Analyze Files/Modules: For each file: Total complexity score Number of functions Average complexity per function Most complex functions Duplicate code detection 4. Generate Report: Provide: Overall project complexity summary Top 10 most complex functions Complexity distribution graph (if possible) Refactoring recommendations Comparison with industry standards Complexity Thresholds Cyclomatic Complexity 1-10: Simple, easy to test (✓ Good) 11-20: Moderate complexity (⚠ Review) 21-50: High complexity (⚠ Refactor recommended) 50+: Very high complexity (❌ Refactor required) Function Length 1-20 lines: Short and focused (✓ Good) 21-50 lines: Acceptable 51-100 lines: Long (⚠ Consider splitting) 100+ lines: Too long (❌ Refactor required) Nesting Depth 1-2 levels: Good 3-4 levels: Acceptable 5+ levels: Too deep (❌ Refactor) Parameters 0-3 parameters: Good 4-5 parameters: Acceptable 6+ parameters: Too many (⚠ Consider parameter object) Usage Examples Report Format Analysis Tools Integration JavaScript/TypeScript: ESLint complexity rules, ts-complexity Python: radon, mccabe, pylint Java: Checkstyle, PMD, JaCoCo Go: gocyclo, gocognit Ruby: flog, reek Recommendations by Complexity Score Score 1-10 (Low) ✓ Good to go Easy to un …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills aiskillstore/complexity-analyzer