Slash Command
/code-simplify
Simplify code for clarity and maintainability — reduce complexity without changing behavior
From agent-skillsInstall
1
Run in your terminal$
npx claudepluginhub addyosmani/agent-skillsDetails
Namespace
commands/Command Content
Invoke the agent-skills:code-simplification skill.
Simplify recently changed code (or the specified scope) while preserving exact behavior:
- Read CLAUDE.md and study project conventions
- Identify the target code — recent changes unless a broader scope is specified
- Understand the code's purpose, callers, edge cases, and test coverage before touching it
- Scan for simplification opportunities:
- Deep nesting → guard clauses or extracted helpers
- Long functions → split by responsibility
- Nested ternaries → if/else or switch
- Generic names → descriptive names
- Duplicated logic → shared functions
- Dead code → remove after confirming
- Apply each simplification incrementally — run tests after each change
- Verify all tests pass, the build succeeds, and the diff is clean
If tests fail after a simplification, revert that change and reconsider. Use code-review-and-quality to review the result.
Other plugins with /code-simplify
Stats
Stars112
Forks7
Last CommitMar 6, 2026