golang-design-patterns
Idiomatic Golang design patterns — functional options, constructor APIs, init() and global-state avoidance, enums, panic vs error decisions, resource management and lifecycle, graceful shutdown, timeouts and retries, streaming and iterators, and architecture styles (clean, hexagonal, DDD, flat). Apply when choosing between architectural patterns, implementing functional options, designing constructor APIs, setting…
- installs 8w
- 4,947
- 30-day movement
- starts with the next reading
- Related entries
- 1
- Connections
- 1
A SKILL.md that loads idiomatic Go design-pattern guidance into an AI coding agent, covering functional options, constructor APIs, init() and global-state avoidance, enums, panic-vs-error decisions, resource lifecycle, graceful shutdown, timeouts and retries, streaming/iterators, and architecture styles (clean, hexagonal, DDD, flat). It bundles reference files on architecture, clean architecture, hexagonal architecture, DDD, data handling, and resource management, and explicitly defers DI, error wrapping, and database topics to sibling skills.
Reach for it when you need the agent to apply idiomatic Go patterns rather than inventing non-idiomatic structure while writing or refactoring Go code.
Use it to
- Implement functional options for a constructor API
- Set up graceful shutdown with timeouts and retries
- Decide between panic and returning an error
- Choose between clean, hexagonal, DDD, or flat architecture
- Stream large datasets with Go 1.23+ iterators
For Go developers using Claude Code, Codex, or similar agents
- Host repository
- samber/cc-skills-golang
- Version
- 1.2.1
- Installs, lifetime
- 39k
- Installs, 8 weeks
- 4,947
- Allowed tools
- Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*) Agent AskUserQuestion
- Compatible with
- Designed for Claude Code, Codex or similar harness, and for projects using Golang.
- Licence
- MIT
- Invocable by
- user
- Host stars
- 3,261
- Host language
- Go