Individual skill
refactor
Systematic code refactoring based on Martin Fowler's methodology. Use when users ask to refactor code, improve code structure, reduce technical debt, clean up legacy code, eliminate code smells, or improve code maintainability. This skill guides through a phased approach with research, planning, and safe incremental implementation.
03-skills/refactor/SKILL.md
Source commit 2b530b767495815c7f53534bbb78f76b65c2e4a5
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- No
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Not checked yet
- Last checked
- Nov 9, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 47,014
- Repository last updated
- Nov 3, 2026
- License
- MIT
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- claude-code Repository topic
- guide Repository topic
- tutorial Repository topic
- engineering Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
SKILL.mdcore · 11,944 bytesSKILL.mdcore · 11,944 bytesSKILL.mdcore · 11,944 bytesSKILL.mdcore · 11,944 bytesSKILL.mdcore · 11,944 bytesSKILL.mdcore · 11,944 bytesreferences/code-smells.mddoc · 13,848 bytesreferences/refactoring-catalog.mddoc · 24,313 bytesscripts/analyze-complexity.pyruns · 20,183 bytesscripts/detect-smells.pyruns · 28,738 bytestemplates/refactoring-plan.mddoc · 6,638 bytes
Read excerpt
# Code Refactoring Skill
A systematic approach to refactoring code based on Martin Fowler's *Refactoring: Improving the Design of Existing Code* (2nd Edition). This skill emphasizes safe, incremental changes backed by tests.
> "Refactoring is the process of changing a software system in such a way that it does not alter the external behavior of the code yet improves its internal structure." — Martin Fowler
## Core Principles
1. **Behavior Preservation**: External behavior must remain unchanged
2. **Small Steps**: Make tiny, testable changes
3. **Test-Driven**: Tests are the safety net
4. **Continuous**: Refactoring is ongoing, not a one-time event
5. **Collaborative**: User approval required at each phase