code-simplification
Simplifies code for clarity. Use when refactoring code for clarity without changing behavior. Use when code works but is harder t…
What it does
- After a feature is working and tests pass, but the implementation feels heavier than it needs to be
- During code review when readability or complexity issues are flagged
- When you encounter deeply nested logic, long functions, or unclear names
- When refactoring code written under time pressure
- When consolidating related logic scattered across files
- After merging changes that introduced duplication or inconsistency
- Code is already clean and readable — don't simplify for the sake of it
Requirements & configuration
- After a feature is working and tests pass, but the implementation feels heavier than it needs to be
- Explicit code is better than compact code when the compact version requires a mental pause to parse.
- | Nested ternaries | Requires mental stack to parse | Replace with if/else chains, switch, or lookup objects |
- Avoid batching multiple simplifications into a single untested change. If something breaks, you need to know which simplification caused it.
- | "It's working, no need to touch it" | Working code that's hard to read will be hard to fix when it breaks. Simplifying now saves time on every future change. |
Derived from the skill's own SKILL.md documentation · extracted 2026-07-23
Simplifies code for clarity. Use when refactoring code for clarity without changing behavior. Use when code works but is harder to read, maintain, or extend than it should be. Use when reviewing code that has accumulated unnecessary complexity.
Source
Repository: https://github.com/addyosmani/agent-skills
code-simplification FAQ
What does the code-simplification skill do?
Simplifies code for clarity. Use when refactoring code for clarity without changing behavior. Use when code works but is harder to read, maintain, or extend than it should be. Use when reviewing code that has accumulated unnecessary complexity. After a feature is working and tests pass, but the implementation feels heavier than it needs to be During code review when readability or complexity issues are flagged
What does code-simplification require?
After a feature is working and tests pass, but the implementation feels heavier than it needs to be Explicit code is better than compact code when the compact version requires a mental pause to parse. | Nested ternaries | Requires mental stack to parse | Replace with if/else chains, switch, or lookup objects | Avoid batching multiple simplifications into a single untested change. If something breaks, you need to know which simplification caused it. | "It's working, no need to touch it" | Working code that's hard to read will be hard to fix when it breaks. Simplifying now saves time on every future change. |
How do I install code-simplification?
Run: npx -y skills add https://github.com/addyosmani/agent-skills --skill code-simplification --agent claude-code — the source lives at github.com/addyosmani/agent-skills.
Maintain code-simplification?
Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.
[](https://getagentictools.com/skills/addyosmani-agent-skills-code-simplification?ref=badge) npx agentictools info skills/addyosmani-agent-skills-code-simplification The second line is the CLI lookup for this page — handy in READMEs and docs.