go-refactor
Installation
SKILL.md
Go Refactoring & Performance
Overview
Safe refactoring patterns and performance optimization for Go backends. Always characterize before changing.
Core principle: Never refactor without characterization tests. Never optimize without profiling.
3-strikes rule: If the same refactoring approach fails 3 times, stop. The problem is architectural — escalate to system-design for a deeper review instead of thrashing.
Safe Refactoring Process
- Write characterization tests — capture current behavior
- Refactor — change structure, not behavior
- Verify — all characterization tests still pass
- Clean up — remove temporary tests if redundant