What problem does it solve? Working code often accumulates unnecessary complexity—deep nesting, long functions, unclear names, and duplicated logic—that slows down maintenance and review. This Skill guides behavior-preserving refactoring so code becomes easier to read, understand, and modify without risking regressions. ## Core Features & Use Cases - Behavior-Preserving Refactoring: Every simplification must keep inputs, outputs, side effects, error behavior, and edge cases identical, verified through proportionate final-state checks. - Five Guiding Principles: Preserve behavior exactly, follow project conventions, prefer clarity over cleverness, maintain balance against over-simplification, and scope changes to what recently changed. - Structured Four-Step Process: Understand the code before touching it, identify simplification signals (nested ternaries, boolean flags, dead code, duplicated logic), apply changes incrementally, and verify the result. - Use Case: After a feature passes tests but the implementation feels heavy, use this Skill during code review to flatten nested conditionals, rename misleading variables, and remove dead code while keeping the diff clean and reviewable. ## Quick Start Ask the agent to simplify the recently modified function in your current file for readability without changing its behavior.