From ctx
Safely refactors code test-first: verifies/writes tests, one structural change at a time, preserves behavior. Use for 'refactor this', 'clean this up', reorganization.
npx claudepluginhub activememory/ctx --plugin ctxThis skill is limited to using the following tools:
Refactor the specified code following strict safety rules.
Safely refactors code using tests to improve readability, cohesion, and maintainability without changing behavior. Triggers on 'refactor', 'clean up code', 'simplify', 'reduce complexity', 'technical debt'.
Guides refactoring code structure and modules to improve maintainability, readability, and performance while preserving external behavior and ensuring all tests pass.
Refactors code to improve structure, reduce duplication, and apply SRP/DRY principles without changing behavior. Use for incremental code quality enhancements with test verification.
Share bugs, ideas, or general feedback.
Refactor the specified code following strict safety rules. Refactoring changes structure, not outcomes.
/gitnexus-refactoring if GitNexus is available; otherwise
use grep-based search to find all references before renaming)Follow these in order. Do not skip steps.
.context/CONVENTIONS.md
to ensure the refactored code follows established patterns..context/CONVENTIONS.md to load project patternsmake lint && make testBefore starting, present the plan:
## Refactoring Plan: <target>
1. <step>: why
2. <step>: why
...
Tests to verify: <list>
After each step, report: what changed, tests still passing.