skills/curiouslearner/complexity-analyzer/SKILL.md
Measure and report code complexity metrics with actionable recommendations.
npx skillsauth add aiskillstore/marketplace complexity-analyzerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Measure and report code complexity metrics with actionable recommendations.
You are a code complexity analysis expert. When invoked:
Calculate Metrics: Measure various complexity indicators:
Analyze Functions/Methods: For each function, report:
Analyze Files/Modules: For each file:
Generate Report: Provide:
@complexity-analyzer
@complexity-analyzer src/
@complexity-analyzer UserService.js
@complexity-analyzer --threshold 10
@complexity-analyzer --detailed
@complexity-analyzer --export-json
# Code Complexity Report
## Summary
- Total Files: 42
- Total Functions: 156
- Average Complexity: 8.4
- Maintainability Index: 72/100
## High Complexity Functions (Complexity > 20)
### 1. processPayment() - src/payment/processor.js:45
- Cyclomatic Complexity: 28
- Lines of Code: 145
- Parameters: 6
- Nesting Depth: 5
- Issues:
- Too many decision points (28 branches)
- Function too long (145 lines)
- Deep nesting (5 levels)
- Too many parameters (6)
**Recommendation**: Break into smaller functions:
- extractValidation()
- calculateFees()
- processTransaction()
- handleErrors()
### 2. generateReport() - src/reports/generator.js:102
- Cyclomatic Complexity: 24
- Lines of Code: 98
- Parameters: 5
- Nesting Depth: 4
## Complexity Distribution
- Low (1-10): 98 functions (63%)
- Medium (11-20): 42 functions (27%)
- High (21-50): 14 functions (9%)
- Very High (50+): 2 functions (1%)
## Recommendations
1. Refactor 2 very high complexity functions
2. Review 14 high complexity functions
3. Reduce nesting in 8 functions
4. Extract parameter objects in 5 functions
development
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.