Code complexity guidelines to keep cyclomatic complexity below 6 using strategy patterns or dispatch tables. Use when writing or refactoring functions with complex branching logic.
Installs into .claude/skills of the current project.
Are you the author of Complexity?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/majiayu000-complexity)
---
name: complexity
description: Code complexity guidelines to keep cyclomatic complexity below 6 using strategy patterns or dispatch tables. Use when writing or refactoring functions with complex branching logic.
---
# Code Complexity Guidelines
Apply these guidelines to keep code complexity manageable.
## Cyclomatic Complexity
Keep the cyclomatic complexity of each function below 6.
- If you have a large switch case, consider using the strategy pattern or dispatch table instead