Agent skill

golang-patterns

Idiomatic Go patterns, best practices, and conventions for building robust, efficient, and maintainable Go applications.

mturacgithub.com/mturacGitHub ↗
codexcopilotcursorMIT
Install
npx skills add mturac/everything-openai-codex --skill golang-patterns --agent codex

Same command for any agent — swap --agent for claude-code, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 14 KB
Bundled scripts: none
Path: skills/golang-patterns/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 84
Language: JavaScript

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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. ```go // 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. ```go // 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() } // Good: bytes.Buffer works with zero value var buf bytes.Buffer buf.WriteString("hello") // Bad: Requires initialization type BadCounter struct { coun

What's inside
Steps it walks through
  1. When to Activate
  2. Core Principles
  3. 1. Simplicity and Clarity
  4. 2. Make the Zero Value Useful
  5. 3. Accept Interfaces, Return Structs
  6. Error Handling Patterns
  7. Error Wrapping with Context
  8. Custom Error Types
  9. Error Checking with errors.Is and errors.As
  10. Never Ignore Errors
  11. Concurrency Patterns
  12. Worker Pool
  13. Context for Cancellation and Timeouts
  14. Graceful Shutdown
Commands it runs
Build and run
go build ./...
go run ./cmd/myapp
Testing
go test ./...
go test -race ./...
go test -cover ./...
Static analysis
go vet ./...
staticcheck ./...
More from everything-openai-codex
All skills →
About this skill
What does the golang-patterns skill do?

Idiomatic Go patterns, best practices, and conventions for building robust, efficient, and maintainable Go applications.

How do I install it?

Run `npx skills add mturac/everything-openai-codex --skill golang-patterns --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From mturac/everything-openai-codex, a repository with 84 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going