What problem does it solve? Text-based find-and-replace with sed or regular expressions often produces false matches and partial replacements that silently break code. This Skill guides refactoring through Abstract Syntax Tree (AST) transformations that understand Go syntax, so symbol renames, pattern conversions, and package moves stay correct. ## Core Features & Use Cases - AST-Based Tooling: Uses gorename for safe symbol renaming, gofmt -r for pattern-based transformations, and gomv for package moves with automatic reference updates. - Refactoring Patterns: Provides concrete before/after examples for Extract Function and Extract Interface patterns to improve testability and single-responsibility design. - Safe Procedure: Enforces a test-first workflow — verify tests are GREEN, refactor, re-run tests, lint, then commit — and forbids mixing behavior changes with refactoring in one commit. - Use Case: When renaming a widely used Go function across a monorepo, apply gorename instead of sed so only true symbol references change, then confirm the test suite stays green. ## Quick Start Ask the agent to rename a Go function or extract an interface using AST-based refactoring while keeping all tests passing.