npx claudepluginhub radenadri/skills-alena[file-or-pattern-to-refactor]# /refactor — Safe Refactoring Refactor code while maintaining correctness through continuous verification. ## Instructions 1. **Assess the target** from `$ARGUMENTS`: - Read and understand the current code - Identify code smells: duplication, long functions, god classes, deep nesting - Map all callers and dependents of the code being refactored 2. **Establish a safety net**: - Run existing tests: `npm test` / `pytest` / etc. - If no tests exist → WRITE CHARACTERIZATION TESTS FIRST - Note the current test results as the baseline 3. **Plan the refactoring** — choose fr...
/refactorOrchestrates refactoring for specified scope: assesses architecture and issues, plans incremental transformations with risk mitigation, provides code change guides with examples, validation tests, and monitoring plan.
/refactorSystematically refactors target code area: identifies smells like long functions and duplicates, verifies/adds tests, plans atomic steps, executes with verification, preserves behavior.
/refactorSafely refactors code progressively using techniques like Extract Method, quantitatively scores SOLID principle adherence (0-100), visualizes technical debt, and prioritizes improvements.
/refactorSafely refactors code gradually, quantitatively scores SOLID principles adherence (0-100 per principle), detects smells and debt, and prioritizes improvements with techniques like Extract Method.
/refactorSafely refactors code gradually using techniques like Extract Method, scores SOLID adherence (0-100), visualizes technical debt, and prioritizes improvements.
/refactorPerforms safe incremental refactoring on code, scores SOLID principles compliance (0-100 total), detects smells via grep/bash, visualizes technical debt, and prioritizes fixes with examples.
Refactor code while maintaining correctness through continuous verification.
Assess the target from $ARGUMENTS:
Establish a safety net:
npm test / pytest / etc.Plan the refactoring — choose from:
Execute in small steps:
Verify the refactoring:
NEVER combine refactoring with behavior changes — do one or the other.