Giverny

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`…

by samber★ 4,015Code review & quality

What Golang Refactoring does

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 functions or interfaces, moving code between packages, or planning a multi-step refactor. Target styles owned elsewhere → See `samber/cc-skills-golang@golang-naming` (renames), `s

How to install Golang Refactoring in Claude Code

Giverny gives you a ready prompt with the exact install command from samber/cc-skills-golang. Sign in with GitHub, copy the prompt and paste it into Claude Code; Claude installs the skill and confirms it loaded. To install by hand, clone samber/cc-skills-golang and copy the skills/golang-refactoring folder into ~/.claude/skills/.

How to use it

Once installed, Claude loads Golang Refactoring on its own whenever your request matches what the skill does. You can also ask for it by name, for example: “Use the golang-refactoring skill on my current project.”

More Claude skills for code review & quality