Codex skills for Go
With these skills Codex writes Go by Go's own conventions: errors wrapped once with %w, interfaces declared by their consumers, goroutines that always have an owner, and HTTP services on the Go 1.22+ standard ServeMux or Gin. Changes are proven with go test -race, goleak, table-driven tests and benchstat, and go.mod is handled as a release contract rather than edited by trial.
Start with these 3
- Go Idioms Go that reads like Go, not Java in disguise Codex applies Go's own conventions instead of patterns imported from other languages: errors wrapped once with context and inspected with errors.Is or errors.As, interfaces declared by their consumers, packages split by domain with names that read well at the call site, and useful zero values. Mechanical upgrades go through go fix and golangci-lint v2 before any hand edits.
- Go Concurrency Every goroutine has an owner and an exit Codex starts no goroutine without an owner that waits for it, threads context cancellation through every blocking call, and bounds fan-out with errgroup limits or fixed worker pools. It chooses mutex, atomic or channel per piece of state, reads goroutine dumps before guessing at hangs, and proves fixes with go test -race, goleak and synctest fake clocks.
- Go HTTP Services Stdlib routing, real timeouts, clean shutdown Codex builds Go web services on the standard library without reaching for a framework: method-prefixed ServeMux patterns with PathValue, one error-returning handler type, strict JSON decoding behind MaxBytesReader, and an http.Server with every timeout set. SIGTERM drains in-flight requests through Shutdown, and tests run the full mux through httptest.
5 more Go skills
-
Go Testing
Table tests, race-clean, runnable one case at a time -
Go pprof Profiling
Right profile, right line, benchstat proof -
Gin APIs in Go
Bind, validate and abort the way Gin expects -
Production Debugging
Find the fault in live systems without adding a new one -
Go Modules
Clean go.mod, honest versions, no laptop paths
General skills with Go guidance
Not built around Go, but they include steps or tools for it. Not part of the install-all command.
Every Go skill in one command
Installs these 8 into ~/.agents/skills/. Add --project after -- to install into the current repository instead.
The installer is a 104-line POSIX shell script. It fetches the skills you name from codexskills.dev and unpacks each into its own folder in your skills directory. No sudo, no telemetry, and every skill page shows the full SKILL.md first. Read install.sh
curl -fsSL codexskills.dev/install.sh | sh -s -- go-idioms go-concurrency go-http-services go-testing go-pprof go-gin-api production-debugging go-modules Go FAQ
Is there a Codex skill for finding goroutine leaks and data races in Go?
Go Concurrency gives every goroutine an owner that waits for it, threads context cancellation through blocking calls and bounds fan-out with errgroup.SetLimit or a fixed worker pool. It proves fixes with go test -race, go.uber.org/goleak and testing/synctest fake clocks, noting that WaitGroup.Go and stable synctest need Go 1.25. For leaks in a running service, Go pprof Profiling reads goroutine profiles alongside CPU, heap, block and mutex profiles.
Can Codex build a Go HTTP API without a framework like Gin or chi?
Yes. Go HTTP Services uses the standard library ServeMux with method and wildcard patterns, which needs the go directive at 1.22 or later, otherwise PathValue returns empty strings. It decodes JSON behind http.MaxBytesReader, sets every http.Server timeout, drains requests on SIGTERM and tests the full mux through httptest. If the project already uses Gin, Gin APIs in Go covers ShouldBind validation, trusted proxies and returning after Abort.
How does the Go pprof skill keep profiling endpoints off the public port?
Go pprof Profiling serves net/http/pprof on a separate loopback-only listener such as 127.0.0.1:6060 and reaches pods through kubectl port-forward, because importing net/http/pprof on DefaultServeMux publishes the endpoints publicly. It fixes one thing at a time, compares runs with -diff_base or benchstat, and considers PGO with a representative production CPU profile as the last step.
How do I install all 8 Go skills at once?
Pass every name to the installer in one command: curl -fsSL https://codexskills.dev/install.sh | sh -s -- go-idioms go-concurrency go-http-services go-testing go-pprof go-gin-api production-debugging go-modules. Add --project right after -- to put them in the current repository's .agents/skills/ so your team gets them too.
Which Go skill should I try first?
Go Idioms is the closest fit for most Go work. Mention it with $go-idioms in a prompt to load it on purpose; after that, Codex picks it up on its own whenever a task matches.