From pr-review-toolkit
Go architecture skill — idiomatic Go 1.22+ patterns, error handling, concurrency (goroutines, channels, errgroup), testing with table-driven tests and testify/mockery, HTTP patterns (net/http, Gin), and project structure. Current as of Go 1.26 (February 2026). Use as quality baseline for development, code review and analysis of Go projects.
How this skill is triggered — by the user, by Claude, or both
Slash command
/pr-review-toolkit:arch-goThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Knowledge base for modern idiomatic Go architecture and patterns.
Knowledge base for modern idiomatic Go architecture and patterns.
Used as a baseline by the explorer, dev-go and review-go agents.
[Inference] for unverified contentReference: references/go/idioms.md
Mandatory patterns:
NewXxx() returns struct or pointercontext.Context always as the first parameteriter.Seq[V] / iter.Seq2[K,V] for lazy sequences with for rangeReference: references/go/error-handling.md
if err != nil on every function return that can failfmt.Errorf("context: %w", err)var ErrNotFound = errors.New(...)) for comparisonUnwrap() for errors with contexterrors.Is() and errors.As() for inspecting error chains_, _ = ...)Reference: references/concurrency/goroutines-channels.md
time.Sleep for synchronizationReference: references/http/http-patterns.md
writeJSON, writeError, decodeJSONsignal.NotifyContext and srv.Shutdowngo-playground/validator for struct validation with tagsReference: references/testing/testing-patterns.md
[]struct + t.Runassert for verifications, require for fatal preconditionshttptest.NewRequest + httptest.NewRecorder for handlerstime.Sleep-race flag mandatory in CIReference: references/architecture/project-structure.md
Mandatory separation:
cmd/ -> Entry point, wiring
internal/
handler/ -> HTTP handlers (input layer)
service/ -> Business logic (domain)
repository/-> Data access
domain/ -> Domain entities
dto/ -> Request/Response structs
config/ -> Configuration
platform/ -> Shared infrastructure (database, cache)
pkg/ -> Public reusable code
slog.Info(), slog.Warn(), slog.Error() with key-value attributesfmt.Println() or log.Println() in production| Category | Tool | Purpose | Command |
|---|---|---|---|
| Build | go build | Compilation | go build ./... |
| Test | go test | Test framework | go test ./... |
| Test | testify | Assertions + mocks | (via dependency) |
| Mock | mockery | Mock generation | mockery |
| Lint | golangci-lint | Aggregated linter | golangci-lint run |
| Vet | go vet | Built-in static analysis | go vet ./... |
| Format | gofmt/goimports | Mandatory formatting | gofmt -w . |
| Deps | go mod | Module management | go mod tidy |
| Race | go test -race | Data race detector | go test -race ./... |
| Vuln | govulncheck | Vulnerability scanner | govulncheck ./... |
| Docs | godoc | Documentation | go doc |
DESIGN -> TYPE (interfaces) -> TEST -> IMPLEMENT -> VALIDATE -> REVIEW
go test -race ./... + golangci-lint runreferences/go/idioms.md — Naming, interfaces, constructors, context, zero valuesreferences/go/error-handling.md — Error wrapping, sentinel errors, errors.Is/Asreferences/concurrency/goroutines-channels.md — Goroutines, channels, errgroup, sync primitivesreferences/http/http-patterns.md — net/http, handlers, middleware, Gin, graceful shutdownreferences/testing/testing-patterns.md — Table-driven tests, testify, mockery, httptestreferences/architecture/project-structure.md — cmd/internal/pkg, layers, manual DIProvides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
npx claudepluginhub olimpus-soft/olimpus-claude-skills --plugin pr-review-toolkit