golang-refactoring
Golang refactoring — safe, at-scale restructuring of existing Go code: a coverage-adaptive safety net, behavior-preserving transforms (gopls Rename/Extract, gofmt -r, gopatch), the Fowler catalog mapped to Go, breaking import cycles, and small stacked PRs. Apply when a function or type has grown too large, a code smell blocks a feature, or the user asks to refactor Go code — also for renaming at scale, extracting…
- installs 8w
- 3,938
- 30-day movement
- starts with the next reading
- Related entries
- 1
- Connections
- 0
golang-refactoring is an agent skill that guides AI coding agents through safe, at-scale restructuring of existing Go code. It provides a coverage-adaptive safety net, behavior-preserving transforms using gopls Rename/Extract, gofmt -r and gopatch, the Fowler catalog mapped to Go, import-cycle breaking, and a small-stacked-PR workflow.
Reach for it when you need behavior-preserving Go refactors done in verifiable, reviewable steps rather than ad-hoc large edits.
Use it to
- Rename identifiers at scale with gopls
- Extract functions or interfaces from oversized code
- Move code between packages and break import cycles
- Plan a multi-step refactor as stacked PRs
- Apply Fowler-style transforms to Go code smells
For Go developers using AI coding agents like Claude Code
- Host repository
- samber/cc-skills-golang
- Version
- 1.1.1
- Installs, lifetime
- 5,000
- Installs, 8 weeks
- 3,938
- Compatible with
- Designed for Claude Code, Codex or similar harness, and for projects using Golang. Requires gopls and git.
- Licence
- MIT
- Invocable by
- user
- Host stars
- 3,261
- Host language
- Go