a5c-ai/babysitter / library/specializations/code-migration-modernization/skills/refactoring-assistant
refactoring-assistant
VerifiedSuggest and guide application of refactoring patterns to improve code quality
README.md
View on GitHub# Refactoring Assistant Skill
## Overview
The Refactoring Assistant skill provides intelligent refactoring suggestions. It guides the application of proven refactoring patterns to improve code quality and maintainability.
## Quick Start
### Prerequisites
- IDE with refactoring support
- Code analysis tools
- Test suite for validation
### Basic Usage
1. **Analyze code**
- Identify code smells
- Review complexity metrics
- Map dependencies
2. **Get suggestions**
- Review refactoring recommendations
- Prioritize by impact
- Plan execution order
3. **Apply refactorings**
- Use IDE automated refactoring
- Verify with tests
- Commit incrementally
## Features
### Refactoring Patterns
| Pattern | Use Case | Benefit |
|---------|----------|---------|
| Extract Method | Long methods | Readability |
| Extract Class | Large classes | SRP |
| Move Method | Feature envy | Cohesion |
| Introduce Parameter Object | Many params | Simplicity |
| Replace Conditional with Polymorphism | Complex conditionals | Extensibility |
### Design Patterns
Suggests application of:
- Strategy Pattern
- Factory Pattern
- Observer Pattern
- Decorator Pattern
- And more...
## Configuration
```json
{
"prioritize": ["readability", "testability"],
"skipPatterns": ["singleton"],
"maxSuggestionsPerFile": 10,
"includeDesignPatterns": true
}
```
## Related Documentation
- [SKILL.md](./SKILL.md) - Full skill specification
- [Refactoring: Improving the Design of Existing Code](https://martinfowler.com/books/refactoring.html)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |