Golang Refactoring
Behavior-preserving Go refactoring workflow with a coverage-gated safety net, gopls-driven transforms, and small stacked PRs.
- CCM score
- 65 of 100
- skills.sh installs
- 14.1K
- GitHub stars
- 4K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers the core loop: blast-radius mapping with gopls, a safety net gated on coverage, tool-driven steps, verification, and atomic commits
- Includes the Fowler refactoring catalog mapped to Go, tooling escalation from
gofmt -rtoeg,gopatch, andgo/analysisfixers, plus import-cycle and package-move guidance - Enforces separate PRs for structural and behavioral changes, and separate PRs for code moves versus optimizations, targeting 100–500 lines each
- Designed for planning and executing multi-step Go restructuring with human sign-off gates; style-specific work defers to naming, layout, modernize, code-style, and design-pattern skills
Install
$ npx -y skills add samber/cc-skills-golang --skill golang-refactoring -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Community default. A company skill that explicitly supersedes
samber/cc-skills-golang@golang-refactoringskill takes precedence.
Persona: You are a Go refactoring engineer. You never change structure and behavior in the same step — you keep a green test net, prefer behavior-preserving tools over hand-edits, and land changes as small, reviewable PRs.
Thinking mode: Reason as thoroughly as possible for the planning/ordering step — mapping blast radius, sequencing PRs to avoid merge conflicts, and deciding where a refactor can safely go parallel all punish shallow reasoning, since a wrong ordering call surfaces as a broken build or a conflict-riddled merge, not as an obviously wrong plan. On Claude Code, use ultrathink to trigger extended thinking explicitly.
Details
- Repository
- github.com/samber/cc-skills-golang
- Categories
- Go, Code Review & Quality
- First seen
- Jul 14, 2026
Questions
What is the golang-refactoring skill for?
The golang-refactoring skill guides an agent through safe, at-scale restructuring of existing Go code without changing its behavior. It covers a coverage-based safety net, behavior-preserving transforms with gopls, breaking import cycles, and landing changes as small stacked PRs.
How do I install the golang-refactoring skill?
Run npx -y skills add samber/cc-skills-golang --skill golang-refactoring -y in your project. Once installed, the agent can plan and carry out multi-step Go refactors with sign-off gates before any edit.
Where does golang-refactoring rank among Go skills?
It sits in the Go category on Claude Marketplaces, in the top 50 of the category page. Its neighbors there include golang-code-style, golang-testing, golang-error-handling, golang-design-patterns and golang-concurrency, which cover narrower topics it defers to.
What does golang-refactoring need to run?
It needs gopls as its primary tool and git, and the skill metadata lists go and gopls as required binaries. Optional tools such as golangci-lint, benchstat, eg and gopatch add extra checks and transforms.
More from samber/cc-skills-golang
All 47- Golang Gopls13.7K
- Golang Code Style47.9K
- Golang Testing47.2K
- Golang Error Handling47.1K
- Golang Security45.9K
- Golang Design Patterns45.3K
- Golang Concurrency45.3K
- Golang Performance45.1K
- Golang Context44.3K
- Golang Database44K
- Golang Naming43.9K
- Golang Safety43.7K
- Golang Project Layout43.5K
- Golang Modernize43.3K
- Golang Lint43.3K
- Golang Documentation43.3K
- Golang Data Structures43.1K
- Golang Observability42.9K
- Golang Troubleshooting42.8K
- Golang Dependency Management42.7K
- Golang Structs Interfaces42.6K
- Golang Cli42.3K
- Golang Benchmark42.3K
- Golang Dependency Injection42.3K
Similar to Golang Refactoring
More Gorefactorgithub/awesome-copilot23K installsSurgical refactoring that improves maintainability in small steps while preserving existing behavior.
golang-lintsamber/cc-skills-golang43.3K installsConfiguration and workflow guidance for golangci-lint, covering linter selection, nolint suppression rules, and output interpretation.
golang-code-stylesamber/cc-skills-golang47.9K installsClear, opinionated Go style rules for line breaking, variable declarations, and control flow that linters cannot judge.
code-refactoring-refactor-cleansickn33/agentic-awesome-skills1.3K installsRefactoring playbook that analyzes code smells and applies incremental, behavior-preserving changes with test verification.
codebase-cleanup-refactor-cleansickn33/agentic-awesome-skills978 installsStructured refactoring workflow that plans cleanup steps, prioritizes targets, and sets verification gates before changes land.