Golang Patterns
Idiomatic Go patterns covering error handling, concurrency, and interface design for maintainable applications.
- CCM score
- 65 of 100
- skills.sh installs
- 18.1K
- GitHub stars
- 312.6K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers core principles, error wrapping, concurrency with worker pools and context, and interface design for Go code
- Includes runnable examples such as
errors.Is/errors.Aschecks,errgroupcoordination, and goroutine-leak-safe channel sends - Enforces rules like never ignoring errors, accepting interfaces while returning structs, and defining interfaces where they are used
- Designed for developers writing, reviewing, or refactoring Go code when idiomatic structure or conventions are in question
Install
$ npx -y skills add affaan-m/ecc --skill golang-patterns -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Go Development Patterns
Idiomatic Go patterns and best practices for building robust, efficient, and maintainable applications.
When to Activate
- Writing new Go code
- Reviewing Go code
- Refactoring existing Go code
- Designing Go packages/modules
Core Principles
1. Simplicity and Clarity
Go favors simplicity over cleverness. Code should be obvious and easy to read.
// Good: Clear and direct
func GetUser(id string) (*User, error) {
user, err := db.FindUser(id)
if err != nil {
return nil, fmt.Errorf("get user %s: %w", id, err)
}
return user, nil
}
// Bad: Overly clever
func GetUser(id string) (*User, error) {
return func() (*User, error) {
if u, e := db.FindUser(id); e == nil {
return u, nil
} else {
return nil, e
}
}()
}
2. Make the Zero Value Useful
Design types so their zero value is immediately usable without initialization.
// Good: Zero value is useful
type Counter struct {
mu sync.Mutex
count int // zero value is 0, ready to use
}
func (c *Counter) Inc() {
c.mu.Lock()
c.count++
c.mu.Unlock()
}
Details
- Repository
- github.com/affaan-m/ecc
- Categories
- Go, Code Review & Quality
- First seen
- Jul 14, 2026
Questions
What are the Go patterns and conventions that the golang-patterns skill teaches?
The golang-patterns skill covers idiomatic Go patterns, best practices, and conventions for building robust, efficient, and maintainable Go applications. It guides simplicity and clarity, useful zero values, accepting interfaces while returning structs, error wrapping, concurrency with worker pools and context, and interface design.
How do I install the golang-patterns skill?
Run npx -y skills add affaan-m/ecc --skill golang-patterns -y in your project to install it. Once installed, the agent can apply these Go patterns when you write, review, or refactor Go code and package structure.
Where does golang-patterns rank in the Go category on Claude Marketplaces?
The golang-patterns skill ranks in the top 50 of the Go category on Claude Marketplaces. Its own focus is broad Go idioms, covering structure and conventions alongside error handling and concurrency topics.
When should I use the golang-patterns skill?
Use it when writing new Go code, reviewing Go code, refactoring existing Go code, or designing Go packages and modules. It is most useful when idiomatic structure or conventions are in question.
More from affaan-m/ecc
All 257- Backend Patterns17.8K
- Coding Standards17.6K
- Frontend Patterns17.6K
- Docker Patterns16.8K
- Golang Testing16.5K
- Python Patterns15.6K
- Springboot Patterns15.5K
- Api Design15.3K
- Market Research15.3K
- Postgres Patterns15.2K
- Frontend Slides15.2K
- Django Patterns15.2K
- Tdd Workflow15K
- Rust Testing14.8K
- Prompt Optimizer14.5K
- Java Coding Standards14.5K
- Django Security14.4K
- Python Testing14.3K
- Laravel Security14.3K
- Android Clean Architecture14.3K
- Article Writing14.3K
- Cpp Coding Standards14.3K
- Springboot Security14.2K
- Liquid Glass Design14.2K
Similar to Golang Patterns
More Gogolang-design-patternssamber/cc-skills-golang44.8K installsIdiomatic Go design patterns covering constructors, error flow, lifecycle, and architecture choices for production code.
go-concurrency-patternssickn33/agentic-awesome-skills263 installsGo concurrency guidance covering goroutines, channels, sync primitives, and context for worker pools and race debugging.
golang-concurrencysamber/cc-skills-golang44.7K installsGo concurrency design guide covering goroutine lifecycles, channels, sync primitives, and worker pools.
go-concurrencycxuu/golang-skills1.4K installsGo concurrency guidance covering goroutine lifetimes, channel-versus-mutex choice, and safe shared state.
golang-concurrency-patternsbobmatnyc/claude-mpm-skills429 installsGo concurrency patterns for production services: context cancellation, errgroup, worker pools, and race avoidance.
error-handlingaffaan-m/ecc9.1K installsPatterns for typed errors, retries, circuit breakers, and user-facing failure messages across TypeScript, Python, and Go.