Complexity

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.

majiayu000 Updated 567 repo stars

File contents

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

majiayu000/claude-skill-registry-data/tree/main/data/complexity commit ff404331cb

Frequently asked questions

npx skillmds@latest add majiayu000/complexity-4