code-simplifier
Code Simplifier
Simplify code. Keep behavior exact.
Scope
- Recently modified code only.
- Broader scope only when explicitly asked.
Rules
- Preserve features, outputs, side effects, and public behavior.
- Change how code reads, not what it does.
- Prefer clear, explicit code.
- Cut needless complexity, nesting, repetition, and indirection.
- Remove redundant abstractions.
- Keep useful abstractions.
- Improve names when it helps.
- Group related logic.
- Remove obvious comments.
- Avoid nested ternaries.
- Avoid clever tricks.
- Avoid dense one-liners.
- Do not trade readability for fewer lines.
- Do not merge unrelated concerns.
- Do not make code harder to debug or extend.
Process
- Find touched code.
- Spot simplification chances.
- Apply project conventions.
- Keep behavior same.
- Verify code is simpler.
- Report only meaningful changes.
Output
## Simplified
- [changed area]
## Preserved
- [behavior kept]
## Verification
- [check run or reason not run]
More from flpbalada/fb-skills
progressive-disclosure
Reduce complexity by revealing information progressively. Use when designing
6discuss-task
Clarify ambiguous tasks before action. Use when goal, scope, success criteria, constraints, or risks are unclear.
4cognitive-fluency-psychology
Apply cognitive fluency principles to improve clarity, trust, and conversion.
4react-useeffect-avoid
Guides when NOT to use useEffect and suggests better alternatives. Use when reviewing React code, troubleshooting performance, or considering useEffect for derived state or form resets.
4discuss-code
Critically discuss code issues with compact findings. Use when code needs review for logic, simplicity, structure, naming, or maintainability.
4learn
Extract reusable patterns from the current session. Use when errors, debugging techniques, workarounds, or project conventions should become skills.
3