Agent skill · Testing & QA

golang-refactoring

Golang refactoring — the safe, at-scale process for restructuring existing Go code: a coverage-adaptive safety net, tool-driven behavior-preserving transforms (gopls Rename/Inline/Extract, `gofmt -r`, `eg`, `gopatch`, `go/analysis` fixers), the Fowler catalog mapped to Go, breaking import cycles, moving types across packages, and a human-in-the-loop workflow of small stacked PRs on a refactoring branch. Apply when code is hard to maintain, a function/type has grown too large, a code smell needs fixing, adding a feature is blocked by the current structure, or the user asks to clean up, refactor

sambergithub.com/samberGitHub ↗
claude-codecodexcopilotcursorcan modify filesMIT
Install
npx skills add samber/cc-skills-golang --skill golang-refactoring --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 6
SKILL.md size: 15 KB
Bundled scripts: none
Version: 1.0.0
Declared author: samber
Allowed tools: ReadEditWriteGlobGrepBash(go:*)Bash(golangci-lint:*)Bash(git:*)Bash(gh:*)Bash(gopls:*)Bash(benchstat:*)LSP
Requires: Designed for Claude Code or similar AI coding agents, and for projects using Golang. Requires gopls and git.
Path: skills/golang-refactoring/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 2,847
Language: Go
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

> **Community default.** A company skill that explicitly supersedes `samber/cc-skills-golang@golang-refactoring` skill 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:** Use `ultrathink`

More from cc-skills-golang
All skills →
About this skill
What does the golang-refactoring skill do?

Golang refactoring — the safe, at-scale process for restructuring existing Go code: a coverage-adaptive safety net, tool-driven behavior-preserving transforms (gopls Rename/Inline/Extract, `gofmt -r`, `eg`, `gopatch`, `go/analysis` fixers), the Fowler catalog mapped to Go, breaking import cycles, moving types across packages, and a human-in-the-loop workflow of small stacked PRs on a refactoring branch. Apply when code is hard to maintain, a function/type has grown too large, a code smell needs fixing, adding a feature is blocked by the current structure, or the user asks to clean up, refactor

How do I install it?

Run `npx skills add samber/cc-skills-golang --skill golang-refactoring --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From samber/cc-skills-golang, a repository with 2,847 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going