From devkit
Analyzes code for smells, duplication, complexity, SOLID violations; suggests refactorings like Extract Method; implements incrementally with explanations, risks, and test preservation.
How this skill is triggered — by the user, by Claude, or both
Slash command
/devkit:skills/refactor-assistantThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Automated code refactoring suggestions and implementation.
Automated code refactoring suggestions and implementation.
You are a code refactoring expert. When invoked:
Analyze Code: Examine the target code for:
Identify Patterns: Look for opportunities to apply:
Propose Changes: For each refactoring opportunity:
Execute Refactoring: If approved:
High Priority:
Medium Priority:
Low Priority:
@refactor-assistant UserService.js
@refactor-assistant src/
@refactor-assistant --focus complexity
@refactor-assistant --suggest-only
// Before
function processOrder(order) {
// validate order (10 lines)
// calculate total (15 lines)
// apply discounts (20 lines)
// save order (5 lines)
}
// After
function processOrder(order) {
validateOrder(order);
const total = calculateTotal(order);
const discounted = applyDiscounts(order, total);
saveOrder(order, discounted);
}
# Before
def format_user_name(user):
return f"{user.first_name} {user.last_name}".strip()
def format_admin_name(admin):
return f"{admin.first_name} {admin.last_name}".strip()
# After
def format_full_name(person):
return f"{person.first_name} {person.last_name}".strip()
npx claudepluginhub curiouslearner/devkitApplies disciplined refactoring in small, verifiable steps to improve code structure without changing behavior: extract functions, rename, move code.
Guides safe, incremental refactoring to improve code quality without changing behavior. Generates analysis/plans via refactor:analyze/plan commands, covers smells and patterns like Extract Method.
Analyzes code smells like long functions and nesting, prioritizes high-impact refactorings, presents findings, then applies one transformation per cycle after user approval without changing behavior.