What problem does it solve?
Go code often accumulates technical debt when refactoring without a structured approach. This Skill provides a framework for safe, incremental Go refactoring using test-driven development, ensuring improvements align with idioms and maintain backward compatibility.
Core Features & Use Cases
- Single-function refactoring: Extract isolated logic to cleaner helpers with tests.
- Package/module restructuring: Reorganize code while preserving interfaces and behavior.
- Code quality & Go idioms: Apply language-appropriate patterns and error handling.
- Test refactoring & organization: Convert tests to table-driven styles and improve coverage.
- Dependency considerations: Manage imports and dependencies with minimal risk.
- Workflow coordination: Align with related skills like golang-fmt-lint and golang-dependency-management.
Quick Start
Start by writing or adjusting tests for the intended change, then implement the refactor in small steps, keeping all tests green and code style consistent.