refactoring-assistant
Installation
SKILL.md
Refactoring Assistant Skill
Detect code smells and assist refactoring during development. Proactively suggest improvements without waiting for explicit requests.
Activation Triggers
- Threshold violations detected during code editing (automatic)
- "refactor", "code smell" (manual)
Code Smell Thresholds
| Code Smell | Threshold | Action |
|---|---|---|
| Long Method | > 50 lines | Extract functions |
| Duplicate Code | 3+ occurrences | Extract to shared function/constant |
| Deep Nesting | > 3 levels | Early return, extract conditions |
| Long Parameter List | > 5 params | Structured params (TS: RORO, Go: struct) |
| Large Module | > 300 lines | Split into smaller modules |
| Complex Conditional | > 3 conditions | Extract to named function/variable |