samber avatar

Golang Refactoring

A systematic approach to restructuring Go code without breaking it. Built around gopls-driven transforms (Rename, Inline, Extract) and a coverage-gated safety net that forces you to write tests for blast radius before touching anything. The workflow is deliberate: map dependencies with gopls, add characterization tests if coverage is weak, apply one mechanical change, verify green, land as a small PR. Handles the annoying stuff like breaking import cycles and moving types across packages with type aliases. Explicitly separates planning (use ultrathink) from execution (human-in-the-loop, one worktree per atomic change). Opinionated about never mixing structural and behavioral changes in the same commit. Useful when a codebase has grown messy and you need to clean it up without introducing regressions.

skills.sh installs
12.9K
GitHub stars
3.8K
last updated
Aug 21, 2026

Install

$ npx -y skills add samber/cc-skills-golang --skill golang-refactoring --agent claude-code

Installs into .claude/skills of the current project.

Files

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: 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.

Sponsors

Details

Repository
github.com/samber/cc-skills-golang
Categories
Frontend Development, Testing & QA, Git & Pull Requests, Code Review & Quality, Productivity & Planning, Automation & Workflows, Go, Design & UI/UX
First seen
Jul 14, 2026

More from samber/cc-skills-golang

All 47
1backnotprop avatarplannotator-compoundbacknotprop/plannotatorAnalyze a user's Plannotator plan archive to extract denial patterns, feedback taxonomy, evolution over time, and actionable prompt improvements — then produce 12.8Kskills.sh installs
2yusukebe avatarhonoyusukebe/hono-skillUse when building Hono web applications or when the user asks about Hono APIs, routing, middleware, JSX, validation, testing, or streaming. TRIGGER when code im12.6Kskills.sh installs
3github avatarwebapp-testinggithub/awesome-copilotToolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing br12.5Kskills.sh installs
4wshobson avatarunity-ecs-patternswshobson/agentsMaster Unity ECS (Entity Component System) with DOTS, Jobs, and Burst for high-performance game development. Use when building data-oriented games, optimizing p12.5Kskills.sh installs
5callstackincubator avatargithub-actionscallstackincubator/agent-skillsGitHub Actions workflow patterns for React Native iOS simulator and Android emulator cloud builds with downloadable artifacts. Use when setting up CI build pipe12Kskills.sh installs
6amazonappdev avatarvega-multi-tv-migrationamazonappdev/devices-agent-skillsMigrate Vega OS (Amazon Fire TV) applications to multi-platform React Native monorepo supporting Android TV, Apple TV, and other platforms. Covers analysis, imp11.2Kskills.sh installs