What problem does it solve?
This Skill solves the problem of overly complex, hard-to-maintain code (such as deeply nested logic, overly long functions, duplicate code, and dead code) that slows down development and increases bug risk, without altering the code's original functionality.
Core Features & Use Cases
- Complexity Detection: Automatically identifies common code quality issues including deep nesting, long functions, nested ternaries, unclear naming, duplicate code, and dead code.
- Behavior-Preserving Refactoring: Simplifies code step-by-step while ensuring the original program behavior remains exactly unchanged.
- Regression Validation: Runs tests after each refactoring step, reverts changes if tests fail, and verifies build success and clean diffs before completion.
- Use Case: After implementing a new feature with messy, hard-to-read code, use this Skill to clean up the implementation without breaking existing functionality or requiring manual test re-runs.
Quick Start
Use the code-simplify skill to clean up the recently modified payment processing module while keeping all existing test cases passing.