golang-design-patterns
The golang-design-patterns skill provides a set of idiomatic Go design patterns and best practices for production-ready code, including functional options, constructor design, resource management, and architectural guidance.
Is golang-design-patterns safe to install?
Safe to install: our audit of golang-design-patterns's source files found 0 shell commands, 0 external URLs, file reads and writes (low risk). Every command and URL listed appears verbatim in the skill's source. The skill reads local files to provide architectural advice and code reviews but does not execute shell commands or make network requests.
How we audit skills: our security review methodology.
Who is this skill for?
Go developers and architects using AI coding agents to implement or review Go codebases.
What can you do with it?
- Designing constructor APIs using functional options
- Implementing graceful shutdown and resource management
- Applying resilience patterns like timeouts and retries
- Choosing between architectural patterns like clean or hexagonal architecture
- Auditing existing code for design issues like init function abuse or unbounded resources
How good is this skill?
Quality score: 5/10. The skill provides clear, actionable, and idiomatic Go advice with specific code examples and references to related skills.
What does the skill file contain?
**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...
Frequently asked questions
When should I use functional options in a constructor?
Use functional options when you need to scale APIs as they evolve, as they allow adding options without breaking existing function signatures.
Why does the skill recommend avoiding init functions?
Init functions run implicitly, cannot return errors, make testing unpredictable due to side effects, and create hidden dependencies.
How should I handle external calls in Go?
Every external call should have a timeout to prevent slow upstream services from hanging goroutines indefinitely.
Related skills
simple
221.4KDevelopers and project managers who need a fast, lightweight decision-making process for feature design or component creation
A structured brainstorming framework for architectural and creative tasks that guides users from discovery to decision-making through a defined process flow.
convex-create-component
82.5KConvex developers building modular backend logic, reusable integrations, or component-based architectures
This skill guides the creation of reusable Convex components by defining isolated tables, schemas, and backend functions. It enforces architectural boundaries by requiring authentication, environment variables, and HTTP routing to remain in the parent application.
golang-performance
33.6KGo developers and performance engineers using AI coding agents to identify and resolve performance bottlenecks in Go projects
The golang-performance skill provides a structured methodology and pattern library for optimizing Go applications. It emphasizes data-driven performance engineering through profiling, iterative benchmarking, and specific optimization patterns for memory, CPU, I/O, and runtime tuning.
golang-error-handling
33.6KGo developers and reliability engineers using Claude Code or similar AI coding agents
This skill provides a framework for idiomatic Go error handling, including creation, wrapping, inspection, and structured logging. It defines best practices for maintaining debuggable, production-ready code and includes instructions for auditing codebases using parallel sub-agents.