refactorlisted
Install: claude install-skill NomadicDaddy/aidd
# Safe Refactoring
Perform safe, context-aware code refactoring with comprehensive impact analysis and validation.
## Usage
```
refactor [target]
```
If no target is specified, infer it from the request and current diff. If no unique target exists,
return a usage error listing the candidate files or symbols.
## Instructions
1. **Identify refactoring target**:
- Parse the argument for target code (file path, function name, or component)
- Document refactoring goal: extract method, rename, move, simplify, optimize, etc.
2. **Impact analysis**:
- Analyze all dependencies and usage patterns of the target
- Identify integration points and side effects
- Assess type safety implications
- Map all files that will be affected
- Assess breaking change risk
3. **Historical pattern learning**:
- Review git history for previous refactoring of this code
- Identify proven patterns to apply
- Note past issues to avoid
4. **Pre-refactoring validation**:
- Run build; it must pass
- Run lint; it must pass
- Run tests; document current results
- **Do NOT run `git stash`.** Capture the baseline diff and preserve all existing changes.
Proceed through relevant dirty files when their intent is clear. Return a blocker only when
overlapping edits cannot be distinguished safely; unrelated dirty files never block the
refactor.
5. **Execute refactoring** (choose appropriate type):
- **Extract Method/Function**: Identi