refactor
Surgical code refactoring to improve maintainability without changing behavior.
What it does
- Code is hard to understand or maintain
- Functions/classes are too large
- Code smells need addressing
- Adding features is difficult due to code structure
- User asks "clean up this code", "refactor this", "improve this"
- Code that works and won't change again (if it ain't broke...)
- Critical production code without tests (add tests first)
Requirements & configuration
- Code smells need addressing
- "Just because" - need a clear purpose
- + // If you need it again, git history has it
Derived from the skill's own SKILL.md documentation · extracted 2026-07-23
Surgical code refactoring to improve maintainability without changing behavior.
Source
Repository: https://github.com/github/awesome-copilot
refactor FAQ
What does the refactor skill do?
Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements. Code is hard to understand or maintain Functions/classes are too large
What does refactor require?
Code smells need addressing "Just because" - need a clear purpose + // If you need it again, git history has it
How do I install refactor?
Run: npx -y skills add https://github.com/github/awesome-copilot --skill refactor --agent claude-code — the source lives at github.com/github/awesome-copilot.
Maintain refactor?
Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.
[](https://getagentictools.com/skills/github-awesome-copilot-refactor?ref=badge) npx agentictools info skills/github-awesome-copilot-refactor The second line is the CLI lookup for this page — handy in READMEs and docs.