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.

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.

esc