skills/golang/golang-tooling/SKILL.md
Go developer toolchain — gopls LSP diagnostics, linting, formatting, and vet. Use when setting up Go tooling, running linters, or integrating gopls with Claude Code.
npx skillsauth add hoangnguyen0403/agent-skills-standard golang-toolingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
After writing or modifying Go code, run in order:
mcp__ide__getDiagnostics — gopls real-time errors and type warnings (requires gopls-lsp plugin)go vet ./... — catch printf mismatches, unreachable code, shadowed variablesgoimports -w . — organize imports and format in one passgolangci-lint run ./... — run full linter suite (if .golangci.yml present)| Tool | Purpose | When to Use |
|------|---------|------------|
| gopls | LSP: diagnostics, completion, hover | Always (IDE integration) |
| go vet | Static analysis — correctness bugs | After every edit |
| goimports | Import sorting + gofmt | Before commit |
| golangci-lint | Aggregated linters (errcheck, staticcheck, etc.) | CI / pre-commit |
| staticcheck | Advanced static analysis | Large codebases |
Configure via .golangci.yml at repo root. Recommended linters:
errcheck — enforce error handlingstaticcheck — bug detection beyond go vetgovet — shadow, compositesrevive — style enforcementgosec — security issuesSee golangci.yml example.
gopls powers mcp__ide__getDiagnostics. Install:
go install golang.org/x/tools/gopls@latest
gofmt alone: Use goimports — it formatting AND imports.goimports manage order.gofmt misses.//nolint comments.testing
Infer the requesting operator's technical fluency from message content (never ask directly) and adapt register — business, hybrid, or technical — across SDLC workflow output. Use when starting sdlc, brainstorm-feature, plan-feature, verify-work, publish-notes, or session-report, or whenever a request's phrasing signals a non-technical or cross-stack operator.
documentation
Define transaction boundaries, locking, and consistency guarantees for multi-step writes. Use when designing atomic operations, retries, idempotency, or concurrent write behavior.
development
Design relational or document schemas from access patterns, cardinality, and lifecycle. Use when modeling entities, choosing embed vs normalize, or shaping schema boundaries before implementation.
data-ai
Diagnose database latency with explain plans, index ownership, and query-shape review. Use when a query is slow, an index is missing, or scans and N+1 patterns appear.