cyclomatic-complexity
Refactor code to reduce cyclomatic complexity so it stays readable, maintainable, and aligned with the long-term vision of the codebase, not just optimized for AI comprehension. Use whenever the user asks to refactor, simplify, clean up, or review code quality; mentions complexity, maintainability, readability, spaghetti code, deeply nested logic, or god functions; or asks to check AI-generated code before merging. Also use proactively after writing any nontrivial function with heavy branching.
Try your first task
Refactor a complex source file
Start a fresh conversation.
Use the cyclomatic-complexity skill to refactor parser.py
Required inputs
- Path to the source file to analyze and refactor (`parser.py` is the author's sample placeholder)
- Existing project linter configuration, if any
- Existing test suite, if available, for before-and-after behavior verification
Suggested template by Skill Leaderboard, grounded in the linked source. Task evidence ↗
Inside SKILL.md
69 linesSection content has not been verified for this skill yet.
Full source remains withheld under the current source-display policy. Read the author’s source ↗