Go Refactor banner
dsjacobsen dsjacobsen

Go Refactor

Code Quality community

Description

--- name: go-refactor description: Refactor Go code to improve structure and readability --- Refactor the Go code in context to improve quality: Use the `go-refactor` agent. Before refactoring: 1. **Verify tests exist** - Don't refactor without tests 2. **Run tests** - Ensure passing baseline **Common refactorings:** - **Extract function** - Break up long functions - **Extract interface** - Create abstractions for testing - **Simplify conditionals** - Use early returns - **Remove duplicatio

Installation

Installs to ~/.claude/commands/dsjacobsen-agent-resources-go-refactor.md

Terminal
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/dsjacobsen/agent-resources/HEAD/.claude/commands/go-refactor.md -o ~/.claude/commands/dsjacobsen-agent-resources-go-refactor.md

Restart Claude Code, or start a new session, for it to be picked up.

Full documentation available on GitHub

View Source Repository