What problem does it solve? Codebases accumulate technical debt through long functions, deep nesting, poor naming, and SOLID violations, making them hard to read, test, and extend. This Skill provides a systematic framework for identifying code smells and refactoring them into clean, maintainable code. ## Core Features & Use Cases - Complexity Control: Enforces cyclomatic (≤10) and cognitive (≤15) complexity thresholds with concrete refactoring tactics like guard clauses, lookup tables, and named predicates. - SOLID & Modern Error Handling: Applies all five SOLID principles with multi-language examples (Python, TypeScript, Java, Go) and distinguishes expected domain errors (Result/Option types) from unrecoverable exceptions. - Refactoring Playbook: Ships a detailed implementation playbook covering code smell catalogs, monolith decomposition, ROI-based prioritization, and static analysis toolchain configuration (Ruff, ESLint, SonarQube). - Use Case: When reviewing a pull request with a 150-line function containing nested conditionals, use this Skill to decompose it into focused methods with guard clauses, extract parameter objects, and verify complexity metrics drop below thresholds. ## Quick Start Review the attached legacy module using the clean-code skill and refactor it to reduce cognitive complexity below 15 per function.