From sd0x-dev-flow
Refactors code by removing dead code, extracting duplication, and simplifying deep nesting while preserving behavior. Runs tests before and after to confirm nothing breaks.
How this skill is triggered — by the user, by Claude, or both
Slash command
/sd0x-dev-flow:simplifyThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
- Keywords: simplify, clean up code, remove duplication, simplify code
/feature-dev)/doc-refactor)/refactor)Agent({
description: "Simplify code, eliminate duplication, preserve behavior",
subagent_type: "code-simplifier",
prompt: `Simplify the code at: $ARGUMENTS
Follow the task steps and constraints defined in this skill.`
})
After simplification, dispatch risk assessment:
Agent({
description: "Review refactoring risk and verify behavior preservation",
subagent_type: "refactor-reviewer",
prompt: `Review the refactoring changes just applied.
Check behavior preservation, dependency impact, test coverage, and rollback risk.`
})
For $ARGUMENTS:
## Refactoring Summary
- [file:line] <change>
## Test Results
✅/❌
## Next Steps
- <suggestions>
npx claudepluginhub sd0xdev/sd0x-dev-flow --plugin sd0x-dev-flowRefines existing code for clarity, readability, and maintainability without changing behavior, interfaces, or outputs. Use for simplify, clean up, refactor for readability requests.
Simplifies code for clarity by reducing complexity while preserving exact behavior. Use when refactoring functional but hard-to-read code, during reviews, or for maintenance.
Simplifies complex/AI-generated code by removing duplication, dead code, over-engineering, and bloat patterns like verbose error handling. Use after features, on long functions (>40 lines), deep nesting (>3), or repeated patterns.