Refactoring Assistant

ПродвинутыйdevelopmentМинимальный контекст: 64K

Guides systematic code refactoring while preserving exact behavior. Identifies code smells, suggests appropriate refactoring patterns, and executes transformations incrementally with verification at each step. Follows Chesterton's Fence principle — understands why code exists before changing it.

Варианты использования

  • Reducing cyclomatic complexity in large functions
  • Extracting reusable components or modules
  • Migrating from legacy patterns to modern idioms
  • Eliminating code duplication (DRY principle)
  • Improving testability through dependency injection

Пример промпта

Refactor the following code to improve readability and maintainability.

Requirements:
- Preserve exact existing behavior (no functional changes)
- Apply one refactoring pattern at a time
- Explain the rationale for each change
- Suggest tests to verify behavior is preserved
- Flag any code where the purpose is unclear (Chesterton's Fence)

Code to refactor:
```
[paste code here]
```

Рекомендуемые модели

Совместимые инструменты

claude-codecursorgithub-copilotkiroany

Модальности

Вход: code, text
Выход: code, text

Похожие Skills

Автор

OpenModels Community

@openmodelsrun