
Description
Refactoring Patterns is an agent skill that applies named refactoring transformations to improve the internal structure of existing code without changing what it does. It works in a disciplined loop: confirm the tests pass, make one small structural change, then confirm the tests still pass. A smell catalog helps find where code has degraded, such as long methods, tangled conditionals and duplication, and a refactoring catalog decides what to do about each one. Rather than rewriting, the skill keeps behavior fixed and changes only how the code is organized, so every step can be checked. Its scoring looks at eight diagnostic rows and maps the result to a 0 to 10 scale. A 10 means no obvious smells remain, each function does one thing, names reveal intent, duplication is gone and tests cover the refactored paths. The agent states the current score, names the smells pulling it down and lists the refactorings needed to reach 10. It triggers on requests such as refactor this, code smells, or cleaning up messy code.…
Highlights
- Named refactorings applied one small, tested step at a time
- Smell catalog to find structural problems
- Scores code structure from 0 to 10 on eight diagnostic rows
- Lists the refactorings needed to reach 10/10
Ratings & Reviews
No ratings yet
Be the first to rate refactoring-patterns.
People also visit
refactoring-patterns FAQ
What is the Refactoring Patterns skill?
An agent skill that guides an AI agent through behavior-preserving refactorings of existing code, using a catalog of code smells and named refactorings.
How do I install it?
Run npx skills add https://github.com/wondelai/skills --skill refactoring-patterns in your project.
How does it keep changes safe?
Each cycle verifies that tests pass, applies one small structural change and verifies again. It is built on the rule that behavior does not change during a refactoring.
What does the score mean?
The score from 0 to 10 counts how many of eight diagnostic rows pass, adjusted down when a single smell is severe. Bands show when code is clean, mostly sound or full of smells.
Which security audits has it passed?
Gen Agent Trust Hub: Pass. Socket: Pass. Snyk: Pass.
What are the best refactoring-patterns alternatives?
Popular alternatives to refactoring-patterns include code-simplify, safe-refactor and request-refactor-plan. See all refactoring-patterns alternatives
















