What problem does it solve?
Navigating and refactoring Go code with plain text search misses types, call graphs, and interface relationships, and manual renames or edits risk breaking the build. This Skill gives an agent semantic code intelligence through gopls, the official Go language server, so questions about the resolved build are answered by meaning rather than by grep.
Core Features & Use Cases
- Semantic Navigation: Go-to-definition, find references, call and implementation hierarchy, workspace symbol search, and package API discovery via gopls's MCP server, the native LSP tool, or the gopls CLI.
- Diagnostics & Safety: Compiler and analyzer diagnostics after every edit, plus an on-demand go_vulncheck reachability check for the current build.
- Safe Refactoring: Rename with interface-satisfaction checks, extract/inline refactors, fill struct/switch, organize imports, formatting, and generated table-driven tests.
- Use Case: Before renaming a method on a widely used interface, run go_symbol_references to gauge the blast radius, apply the rename with go_rename_symbol, then confirm with go_diagnostics and targeted go test runs.
Quick Start
Ask the agent to use gopls to find every reference to a Go function before renaming it and to run diagnostics on the changed files afterward.