
Description
golang-refactoring is an agent skill from the samber/cc-skills-golang collection, listed on skills.sh. It guides a coding agent through safe, large-scale restructuring of existing Go code. The skill's central rule is that structure and behavior are never changed in the same step. It keeps a green test net, prefers behavior-preserving tools such as gopls Rename and Extract over hand edits, and lands changes as small, reviewable pull requests. It has four modes. Plan mode is a mandatory gate before any edit: the agent maps the blast radius with gopls, builds an inventory of refactorings, sets their order and waits for explicit sign-off. Execute mode runs one sub-agent per atomic change in its own worktree and branch, in parallel only when the files do not overlap. Simple-sweep mode applies one mechanical transform across the tree. Review mode checks that a refactoring PR separates structural and behavioral changes. The skill asks for approval at each checkpoint through the question tool, not in passing prose. It depends on gopls, which you install with go install golang.org/x/tools/gopls@latest. A skill is a SKILL.md file of instructions that an AI agent loads only when a task calls for it.…
Highlights
- Behavior-preserving refactors with gopls
- Plan gate with sign-off before any edit
- One branch and PR per atomic change
- Review mode for refactoring pull requests
- Keeps a green test net throughout
Ratings & Reviews
No ratings yet
Be the first to rate golang-refactoring.
People also visit

refactor-plan
Detailed multi-file refactor planning with safety checks and rollback guidance
golang-refactoring FAQ
What does the golang-refactoring skill do?
It guides an agent through restructuring Go code safely, one behavior-preserving change at a time, with a plan and sign-off before any edit.
How do I install it?
Run npx skills add https://github.com/samber/cc-skills-golang --skill golang-refactoring. Install gopls too, with go install golang.org/x/tools/gopls@latest.
Will it change behavior and structure together?
No. The skill says it never changes structure and behavior in the same step, and it keeps tests green as it goes.
Does it make changes without asking?
No. Plan mode is a gate, and each mid-refactor checkpoint is an approval the skill asks for.
Is it free?
Yes. The skill is listed on skills.sh as free.
What are the best golang-refactoring alternatives?
Popular alternatives to golang-refactoring include orch-refine-code, golang-modernize and refactor-plan. See all golang-refactoring alternatives








