simplify-code-solution
Installation
SKILL.md
Simplify Code Solution
Find the simplest complete production design for a code problem, whether it is a proposed solution or existing code. Simpler means easier to understand and change while keeping every real requirement. Fewer files, functions, or lines do not by themselves make a solution simpler.
1. Choose the mode
- Recommend: for questions such as "Could this be simpler?" or a review of a proposal. Do not edit files. A request to revise a proposal changes the proposal, not the code it describes.
- Implement: when the user asks to simplify or refactor the code, or to apply a recommendation. Make the change and verify it without asking for approval again.
Stay in recommend mode unless the user asked for changes; liking a design is not a request to implement it. Ask only when a missing decision would change the solution or its scope.
2. Understand what the code must do
Read the code on the current path, its callers, its tests, and the local patterns, and stop reading once the requirements and risks are clear. Then separate:
- Requirements: the behavior and contracts callers rely on, and the success criteria.
- Assumptions and nice-to-haves that could be dropped.
- Complexity to keep: code that encodes real domain rules, durability, recovery, or operational guarantees. Durable queues, explicit state, and domain distinctions often look heavy and are still needed.