LabscoMCP early access ↗
samber avatar

golang-refactoring

Local tool required★ 3.4k on GitHub
part of samber/cc-skills-golangby samber

Restructures Go code without changing what it does, in small reviewable pull requests, with tests in place first and a pause for your sign-off before any risky move.

WHEN TO USE

SCOPE

USE FOR

  • Map everything a change would touch and agree an ordered plan before any edit.
  • Add tests around untested code before restructuring it.
  • Rename or inline code across many call sites with gopls instead of hand edits.
  • Move a type to another package while old callers keep working during the switch.
  • Break an import cycle with the least invasive fix first.
  • Review a refactoring pull request to confirm behaviour really did not change.

NOT FOR

  • Working code that nothing planned will touch again.
  • Critical production code that has no tests yet; build a test baseline first.
  • Work under a tight deadline; make the minimal safe change now and stage the rest later.
  • Refactoring with no clear purpose, such as no upcoming feature or flagged problem.