Production-grade Go skills
Get focused guidance for writing, reviewing, testing, and improving Go code. Use 26 skills covering APIs, concurrency, databases, error handling, observability, performance, documentation, and idiomatic design.
Skills 26 in the ChatGPT listing
Go Clean Architecture Use when scaffolding or refactoring a Go service into a framework-agnostic clean (hexagonal) architecture: Domain, Usecase, Repository, Delivery layers, inward dependency rule, 'framework/database is a detail'. Go Code Review Invoke this skill to systematically review a Go change against community style standards before merging. Go Code Style Use when writing or reviewing Go code for clarity, formatting, control flow, variable declarations, switch usage, and function design. Go Concurrency Use when writing or reviewing concurrent Go code — goroutines, channels, select, mutexes, atomics, errgroup, singleflight, worker pools, or fan-out/fan-in pipelines. Go Context Use when designing, propagating, or debugging context.Context flow in Go — first-parameter placement, deadlines and cancellation, request-scoped values, WithoutCancel for fire-and-forget work, and key-collision-safe value patterns. Go Control Flow Use when writing conditionals, loops, switches, type switches, or blank-identifier patterns in Go. Go Data Structures Use when choosing or operating on Go slices, maps, arrays, strings, or container/* types — including slice internals, capacity growth, preallocation, map buckets, sets via map[T]struct{}, strings.Builder vs bytes.Buffer, generic containers, and the slices/maps standard packages (Go 1.21+). Go Database Use when writing, reviewing, or debugging Go code that talks to a SQL database (PostgreSQL, MySQL, MariaDB, SQLite). Go Declarations Use when declaring or initializing Go variables, constants, structs, or maps. Go Defensive Programming Use when hardening Go code at API boundaries: copy slices/maps on entry and return, defer cleanup, verify interface compliance at compile time, model time with time.Time/time.Duration, design enum zero values, prefer crypto/rand, and inject clocks for testability. Go Documentation Use when writing or reviewing Go documentation — godoc comments on packages, types, functions, methods, sentinel errors; runnable Example tests; README/CONTRIBUTING/CHANGELOG. Go Error Handling Use when writing, wrapping, inspecting, or logging Go errors. Go Functional Options Use when designing a Go constructor or factory with 3+ optional parameters, or an API expected to grow new options over time. Go Function Design Use when organising functions in a Go file, formatting signatures, designing return values, or naming Printf-style helpers. Go Generics Use when deciding whether to introduce Go generics, writing generic functions or types, composing type constraints, or choosing between type aliases and type definitions. Go GraphQL Use when building or reviewing a GraphQL API in Go. Go gRPC Use when implementing or reviewing gRPC servers/clients in Go. Go Interfaces Use when defining or implementing Go interfaces, composing types through embedding, designing dependency-injection seams, or deciding between pointer and value receivers. Go Linting Use when setting up linting for a Go project, configuring golangci-lint, picking a linter set, suppressing findings with //nolint, or wiring lint checks into CI. Go Logging Use when choosing a Go logger, configuring slog, writing structured log statements, picking log levels, or attaching request-scoped fields. Go Naming Use when naming any Go identifier — packages, types, functions, methods, receivers, variables, constants, errors, options. Go Observability Use when instrumenting Go services with metrics and distributed traces, or wiring exemplars and request-id propagation. Go Packages and Imports Use when creating Go packages, organizing imports, managing dependencies, or structuring a Go project. Go Performance Use when profiling, benchmarking, or optimizing Go code — includes the measure-first methodology, the pprof-driven decision tree (which symptom maps to which fix), allocation reduction, capacity hints, hot-path patterns (strconv vs fmt, repeated string→byte conversions, strings.Builder), and runtime tuning. Go Swagger and OpenAPI Use when adding or maintaining OpenAPI/Swagger documentation for a Go HTTP API. Go Testing Use when writing or fixing Go tests — table-driven cases, parallel safety, helpers, fakes, fuzzing, deterministic time (testing/synctest), goroutine leak detection (goleak), HTTP handlers.