What a Go SME Agent Skill contains and when to invoke it - ten examples for teams using AI assistants on Go 1.26.x. These pages document skills, not application code. A skill is a SKILL.md playbook your agent reads before acting.
An Agent Skill is a structured instruction file - typically SKILL.md - that tells an AI assistant what to do, what to ask for, and what not to do on a Go task.
Skill artifact
Purpose
SKILL.md
Trigger phrases, inputs, outputs, guardrails
references/
Optional deep links to internal ADRs or runbooks
examples/
Invocation prompts that passed review
Skills are not feature tutorials - they are operational contracts for assisted development
Skills should be Go-pinned - agents hallucinate pre-1.22 routing without explicit version context
One skill = one decision domain (concurrency review, module audit, API design, operator RBAC)
Every Go skill should open with the same skeleton:
# Go API Design Review Skill## What this skill doesReviews net/http handlers for context, errors, and status codes.## When to invoke- Before merging handler changes- When scaffolding a new REST package- When agent drafts middleware chains## Inputs (required)- go.mod, affected packages, team error-handling ADR- Router choice: stdlib ServeMux vs chi/gin## Outputs- Review checklist with file:line findings- Suggested fixes (no auto-merge)- Verification: go test ./..., golangci-lint run## Guardrails- Never remove context deadlines on outbound calls- Never return 500 for validation errors- Never disable linters without ADR exception## Stack pinGo 1.26.x · golangci-lint · net/http (ADR-014)## Example promptsSee §10 below.
Inputs prevent the agent from guessing module path or skipping ADR links
Outputs must be verifiable - commands, not prose
Guardrails are the highest-value section - agents over-refactor without them
## Guardrails (Go 1.26)1. Use `go get` with team MVS policy - never blind `go get -u ./...`.2. Propagate `r.Context()` to all outbound I/O (DB, HTTP, gRPC).3. Return typed errors; map to HTTP status in one layer only.4. Run `go test -race` when skill touches goroutines or shared state.5. Run `govulncheck ./...` before suggesting dependency merges.6. Do not disable golangci-lint rules without ADR exception.7. Operator changes require RBAC manifest review before apply.
Guardrails convert agent enthusiasm into engineering discipline
# Unit and race gatego test ./...go test -race ./internal/...# Static analysisgo vet ./...golangci-lint run# Security (before dependency merges)govulncheck ./...
Check
Catches
go test -race
Data races, bad goroutine shutdown
golangci-lint run
Style, errcheck, context leaks per team config
govulncheck
Known vulns in module graph
go vet
Common mistakes (printf, struct tags)
Treat skill output like a junior engineer PR - review before merge
Use the Go API Design Review skill. Stack: Go 1.26, stdlib ServeMux.Inputs: PR diff for internal/api/handlers.go attached.Review context propagation, error mapping, and status codes.Guardrails: no auto-merge; output checklist with line refs.
Concurrency audit:
Use the Go Concurrency Review skill.Package: ./internal/worker/...Check goroutine lifecycle, channel close rules, and context cancel.Include go test -race command for affected packages.
Module security sweep:
Use the Go Module & Security Audit skill.Run govulncheck ./... and summarize actionable CVEs.Propose go get pins only - human approves before merge.
Profiling workflow:
Use the Go Performance Profiling skill.Symptom: p99 latency doubled on /api/orders.Inputs: CPU pprof from staging attached.Give measure-profile-optimize steps; no premature micro-opts.
Operator review:
Use the Go Kubernetes Operator Review skill.Review reconciler diff: finalizers, owner refs, RBAC markers.Flag any cluster-scoped RBAC without ADR approval.
Are Agent Skills the same as go generate directives?
No. go generate runs build-time tools. Agent Skills instruct AI assistants how to perform team workflows safely. You may invoke a review skill to audit generated code - different layers.
Should skills live in the module repo or a central registry?
Module repo for project-specific go.mod and handler conventions. Central registry for org-wide module policy and incident playbooks. Always pin Go version in both.
Can one SKILL.md cover the entire Go stack?
Avoid it. Split by decision domain so guardrails stay sharp. A monolithic skill dilutes concurrency boundaries and produces unsafe dependency bumps.
Do skills replace on-call runbooks?
No. Skills accelerate drafting checklists and commands. Human runbooks in Production Troubleshooting Basics own production authority.
How often should we refresh skills?
Every Go minor bump, every golangci-lint config change, and after any postmortem that reveals a missed guardrail. Run verification commands in the skill on refresh.
Stack versions: This page was written for Go 1.26.x (Green Tea GC default, go fix modernizers - verify patch at build), chi (latest - verify at build), gin (latest - verify at build), echo (latest - verify at build), google.golang.org/grpc (latest - verify at build), sigs.k8s.io/controller-runtime (latest - verify at build), kubebuilder (latest - verify at build), tinygo (latest - verify board targets at build), wazero (latest - verify at build), and golangci-lint (latest - verify linter set at build). 49454e4f4d5f434e4f5904434556494d43451e1f1f56181a181c1a1d
Reviewed by Chris St. John·Last updated Jul 19, 2026