
Golang Design Patterns
Idiomatic Go design patterns covering constructors, error flow, lifecycle, and architecture choices for production code.
- skills.sh installs
- 44.3K
- GitHub stars
- 3.9K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers functional options, constructor APIs,
init()and global-state avoidance, enums, and panic versus error decisions - Includes guidance on resource management, graceful shutdown, timeouts and retries, streaming and iterators, and architecture styles such as clean, hexagonal, DDD, and flat
- Enforces explicit initialization over hidden globals, early-return error handling, and a timeout on every external call
- Designed for Go developers choosing between architectural patterns or asking which idiomatic pattern fits a specific problem
Install
$ npx -y skills add samber/cc-skills-golang --skill golang-design-patterns -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Persona: You are a Go architect who values simplicity and explicitness. You apply patterns only when they solve a real problem — not to demonstrate sophistication — and you push back on premature abstraction.
Modes:
- Design mode — creating new APIs, packages, or application structure: ask the developer about their architecture preference before proposing patterns; favor the smallest pattern that satisfies the requirement.
- Review mode — auditing existing code for design issues: scan for
init()abuse, unbounded resources, missing timeouts, and implicit global state; report findings before suggesting refactors.
Community default. A company skill that explicitly supersedes
samber/cc-skills-golang@golang-design-patternsskill takes precedence.
Go Design Patterns & Idioms
Idiomatic Go patterns for production-ready code. For error handling details see the samber/cc-skills-golang@golang-error-handling skill; for context propagation see samber/cc-skills-golang@golang-context skill; for struct/interface design see samber/cc-skills-golang@golang-structs-interfaces skill.
Best Practices Summary
Details
- Repository
- github.com/samber/cc-skills-golang
- Categories
- Go, Backend & APIs
- First seen
- Apr 16, 2026
More from samber/cc-skills-golang
All 47- Golang Performance44.1K
- Golang Concurrency44.1K
- Golang Context43.2K
- Golang Database43K
- Golang Naming43K
- Golang Safety42.7K
- Golang Project Layout42.5K
- Golang Documentation42.4K
- Golang Modernize42.4K
- Golang Lint42.3K
- Golang Data Structures42.3K
- Golang Troubleshooting42K
- Golang Observability42K
- Golang Dependency Management41.8K
- Golang Structs Interfaces41.7K
- Golang Cli41.5K
- Golang Benchmark41.5K
- Golang Dependency Injection41.4K
- Golang Popular Libraries41.4K
- Golang Stretchr Testify41.3K
- Golang Continuous Integration41.3K
- Golang Grpc41.1K
- Golang Samber Lo40.4K
- Golang Stay Updated40.3K
Similar to Golang Design Patterns
More Go
golang-concurrencysamber/cc-skills-golang44.1K installsGo concurrency design guide covering goroutine lifecycles, channels, sync primitives, and worker pools.
golang-structs-interfacessamber/cc-skills-golang41.7K installsGo struct and interface design guide covering composition, embedding, type assertions, and pointer vs value receivers.
go-concurrency-patternssickn33/agentic-awesome-skills263 installsGo concurrency guidance covering goroutines, channels, sync primitives, and context for worker pools and race debugging.
go-concurrencycxuu/golang-skills1.4K installsGo concurrency guidance covering goroutine lifetimes, channel-versus-mutex choice, and safe shared state.
gomindrally/skills800 installsExpert Go guidance covering idiomatic APIs, clean architecture, concurrency, testing, and DevOps practices.