guru-refactor-conditionals

Community

Simplify conditionals with proven refactors.

AuthorCybLow
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Refactoring techniques for simplifying conditional logic help remove clutter and improve readability.

Core Features & Use Cases

  • Decompose Conditional: extract complex conditionals into clean, testable functions.
  • Replace Nested Conditional with Guard Clauses: flatten logic by early returns for special cases.
  • Replace Conditional with Polymorphism: delegate behavior to specialized classes instead of type checks.
  • Consolidate Conditional Expression: combine branches that yield the same result.
  • Introduce Null Object / Introduce Assertion: reduce null checks and document assumptions.

Quick Start

Apply the Decompose Conditional and Guard Clauses techniques to simplify a complex conditional in your codebase.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: guru-refactor-conditionals
Download link: https://github.com/CybLow/pypaginate/archive/main.zip#guru-refactor-conditionals

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.