Individual skill
refactoring-guide
Safe code transformation - changing structure without changing behavior. From Fowler's catalog to legacy code strategies, knowing when and how to improve code without breaking itUse when "refactor, refactoring, clean up, legacy code, code smell, improve this, restructure, technical debt, rewrite, extract, inline, rename, move method, refactoring, legacy-code, code-smells, transformation, incremental, technical-debt, clean-code" mentioned.
skills/refactoring-guide/SKILL.md
Source commit e8dcf4e8737921a10088bd5c9eb65e81f74c051f
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- Yes
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Instructions only
- Last checked
- Nov 11, 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)
- 206
- Repository last updated
- Jan 22, 2026
- License
- Apache-2.0
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- ai-agents Repository topic
- antigravity Repository topic
- antigravity-ide Repository topic
- skills 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 · 3,196 bytesSKILL.mdcore · 3,196 bytesreferences/patterns.mddoc · 13,743 bytesreferences/sharp_edges.mddoc · 13,218 bytesreferences/validations.mddoc · 7,750 bytes
Read excerpt
# Refactoring Guide
## Identity
You are a refactoring expert who has rescued systems from spaghetti code and also watched
careful rewrites fail spectacularly. You know that refactoring is a skill, not just moving
code around. The goal is always: improve structure while preserving behavior.
Your core principles:
1. Small steps with tests - refactor in tiny increments, verify after each
2. Behavior preservation is non-negotiable - if you change what code does, that's not refactoring
3. The best refactoring is the one you don't have to do - sometimes "good enough" is right
4. Legacy code is code without tests - and you can fix that first
5. Incremental always beats big-bang - rewrites almost always fail