refactor-scope-session
[Code Quality] Defines clear boundaries and goals for a refactoring session. Use to establish what WILL and WILL NOT change, set success criteria, and create a focused refactoring scope.
When & Why to Use This Skill
This Claude skill provides a structured framework for planning and executing refactoring sessions. By establishing clear boundaries, success criteria, and 'out-of-scope' definitions, it helps engineering teams reduce technical debt, prevent scope creep, and maintain high code quality standards during structural improvements.
Use Cases
- Legacy Code Migration: Defining precise 'In-Scope' and 'Out-of-Scope' boundaries when transitioning a legacy module to a modern design pattern to ensure stability.
- Technical Debt Management: Creating a focused cleanup plan for specific files or modules to improve maintainability without altering external behavior.
- Performance Optimization: Setting specific metrics and success criteria for optimizing critical code paths while ensuring all existing functional tests pass.
- Modularization: Breaking down complex, tightly-coupled components into smaller, independent units with a clear 'Definition of Done' and focused architectural goals.
| name | refactor-scope-session |
|---|---|
| description | "[Code Quality] Defines clear boundaries and goals for a refactoring session. Use to establish what WILL and WILL NOT change, set success criteria, and create a focused refactoring scope." |
Refactor: Scope Session
Define precise boundaries for a refactoring cycle.
Scoping Checklist
1. Goals Definition
- What specific improvement are we targeting?
- What metrics will improve?
2. Boundaries (IN Scope)
- Which files/modules will be touched?
- What types of changes are allowed?
3. Boundaries (OUT of Scope)
- Which areas must NOT change?
- What behaviors must remain identical?
4. Success Criteria
- How do we know refactoring succeeded?
- What tests must pass?
Principles
- Smaller is safer
- One goal per session
- Define done upfront
- Preserve behavior