Skip to content
Back to skills

Complexity

ASecurity

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.

  • 666 stars
  • 0 votes
  • 1 copy
  • 9 views
  • Added February 8, 2026
developmentrefactoring

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill complexity --agent claude-code

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.

Security grade badge for Complexity
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-complexity/badge)](https://www.skillsdirectory.com/skills/majiayu000-complexity)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.