golang-refactoring

by Samuel Berthe
v1.1.0
Free
View on ClawHub

About this skill

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, or improve Go code — also for renaming at scale, extracting functions/interfaces, moving code between packages, splitting packages, or planning a multi-step refactor. Target styles owned elsewhere → See `samber/cc-skills-golang@golang-naming` (renames), `@golang-project-layout` (splits), `@golang-modernize` (idioms), `@golang-code-style` (control flow), `@golang-design-patterns` (patterns/DI).

Security

ClawHub Registry Scan Passed

This skill was reviewed and published through ClawHub's own moderation and security scanning pipeline before being listed on their registry. ClawHub checks for malicious code, dependency vulnerabilities, and policy violations.

AgentPowers Install Scan Runs at install

When you run npx @agentpowers/cli install golang-refactoring, AgentPowers downloads the package to a sandbox and runs a full security scan (ClamAV, Snyk, GuardDog, VirusTotal) before allowing installation. If the scan fails, installation is blocked.

Powered by ClawHub

This skill is sourced from ClawHub, a large open registry of community-built AI tools. By integrating ClawHub into AgentPowers, you get access to hundreds of additional skills while still benefiting from our security scanning, one-command install, and unified management through the AgentPowers CLI.

View original on ClawHub