What problem does it solve? Working code often accumulates unnecessary complexity—deep nesting, long functions, unclear names, and duplication—that makes it hard to read, maintain, and extend. This Skill provides a disciplined, behavior-preserving process for simplifying code without introducing regressions. ## Core Features & Use Cases - Behavior-Preserving Refactoring: Applies five principles (preserve behavior, follow project conventions, prefer clarity, maintain balance, scope to changes) so every simplification keeps inputs, outputs, side effects, and error behavior identical. - Pattern-Based Detection: Identifies concrete simplification signals such as 3+ levels of nesting, 50+ line functions, nested ternaries, boolean flag parameters, duplicated logic, and dead code. - Language-Specific Guidance: Includes before/after examples for TypeScript, JavaScript, Python, and React/JSX, plus incremental apply-test-commit workflow and a verification checklist. - Use Case: After shipping a feature whose tests pass but whose implementation has deeply nested conditionals and cryptic variable names, run this Skill to restructure the code into guard clauses and well-named helpers, verifying tests still pass after each change. ## Quick Start Ask the agent to simplify the recently modified module using the code-simplification process while keeping all existing tests passing unchanged.