Golang tooling

From HoangNguyen0403/agent-skills-standard · View interactive version

Golang tooling is an AI agent skill from the GitHub repository HoangNguyen0403/agent-skills-standard. Go developer toolchain — gopls LSP diagnostics, linting, formatting, and vet. Use when setting up Go tooling, running linters, or integrating gopls with Claude Code.

How to use this skill

Skill file

Golang Tooling Standards

**Priority: P1 (HIGH)**

Verification Workflow (Mandatory)

After writing or modifying Go code, run in order:

  1. mcp__ide__getDiagnostics — gopls real-time errors and type warnings (requires gopls-lsp plugin)
  2. go vet ./... — catch printf mismatches, unreachable code, shadowed variables
  3. goimports -w . — organize imports and format in one pass
  4. golangci-lint run ./... — run full linter suite (if .golangci.yml present)

Tool Overview

| 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 |

golangci-lint Setup

Configure via .golangci.yml at repo root. Recommended linters:

See golangci.yml example.

gopls Integration

gopls powers mcp__ide__getDiagnostics. Install:

go install golang.org/x/tools/gopls@latest

Anti-Patterns

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.