control-flow
SKILL.md
Human-Readable Control Flow
When refactoring complex control flow, mirror natural human reasoning patterns:
Related Skills: See
refactoringfor systematic code audit methodology including branch collapsing and caller counting.
When to Apply This Skill
Use this pattern when you need to:
- Refactor nested conditionals into linear guard-clause control flow.
- Replace mixed
throw/returntry-catch logic with readable early returns. - Name booleans and branches to read like natural human reasoning.
- Restructure handlers so failure paths are explicit before the happy path.