refactor-simplifying-conditionals

Installation
SKILL.md

Refactor: Simplifying Conditional Expressions

Overview

These 8 techniques flatten, clarify, and eliminate conditional logic. Complex conditionals are a major source of bugs. Goal: make each branch's purpose obvious, eliminate duplication across branches, and replace type-switching with polymorphism.

When to Use

  • Nested if/else deeper than 2 levels
  • Same condition checked in multiple places
  • Switch statements on type codes that grow with each new type
  • Complex boolean expressions
  • Null checks scattered throughout

Quick Reference

Installs
8
GitHub Stars
4
First Seen
Apr 8, 2026
refactor-simplifying-conditionals — mickeyyaya/refactoring-skills