Skill
development
✓ Verified
Free
Code Refactoring Assistant
Identify code smells and apply safe, mechanical refactorings preserving exact behavior.
4.7(134 reviews)
49,800 installs
by GitHub
About
Detects common code smells (duplicated logic, long methods, primitive obsession, feature envy, large classes) and applies safe refactorings: extract method, introduce parameter object, replace conditional with polymorphism, etc. Keeps every refactoring behavior-preserving and runs the test suite after each change.
Tags
refactorclean-codesmellsdesign
Skill Instructions Preview
# Refactor Apply safe, behavior-preserving refactorings to the target code. ## Catalog - Extract Method - Extract Variable - Inline Variable - Introduce Parameter Object - Replace Magic Number with Constant - Replace Conditional with Polymorphism - Move Method/Field - Rename Symbol ## Rules 1. Never change behavior 2. Run tests before and after each refactoring 3. One refactoring at a time, separate commits 4. Stop on first test failure 5. Don't 'improve' code outside the scope requested
Related Skills
Skill⭐
planningFREE
Implementation Planner
Break down a feature request into a step-by-step implementation plan with files to touch and risks identified.
planningarchitecturefeature
G
GitHub4.9(178)
71k
★4.5k
SkillNEW
frontend$12
Web Design Reviewer
Review a webpage screenshot or live URL for design quality, accessibility, and conversion best practices.
designuxaccessibility
C
Community4.7(56)
19k
★1.2k
Install
# Add as Claude Code slash command: curl -fsSL "https://raw.githubusercontent.com/github/awesome-copilot/main/skills/refactor/SKILL.md" \ -o ~/.claude/commands/refactor.md
Compatible with
claude codegithub copilotcursorcline
Trigger phrase
/refactorG
GitHub
@github