Skip to content

a5c-ai/babysitter / library/specializations/code-migration-modernization/skills/refactoring-assistant

refactoring-assistant

Verified

Suggest and guide application of refactoring patterns to improve code quality

FileKindSize
README.mdmarkdown1.5 KB
SKILL.mdskill md3.0 KB
# 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)
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 implementationStars: 322kUpdated Claude CodeCodexVerifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 322kUpdated Claude CodeCodexVerifiedInstall
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 fallbackStars: 322kUpdated Claude CodeCodexVerifiedInstall
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 alwaysStars: 322kUpdated Claude CodeCodexVerifiedInstall