golang-design-patterns

Apply idiomatic Golang design patterns to improve code quality and maintainability.

Updated May 30, 2026
One-click install
npx skills add https://github.com/ozan-fn/mqtt-capture --skill golang-design-patterns-ozan-fn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-design-patterns
Source: https://github.com/ozan-fn/mqtt-capture/tree/main/.agents/skills/golang-design-patterns
Command: npx skills add https://github.com/ozan-fn/mqtt-capture --skill golang-design-patterns-ozan-fn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps developers understand and apply idiomatic Golang patterns, leading to cleaner, more maintainable code that is easier to test and less prone to bugs.

Core Features & Use Cases

  • Idiomatic Patterns: Offers guidance on functional options, constructors, error handling, resource management, graceful shutdown, resilience, architecture, dependency injection, data handling, streaming, and more.
  • Design Mode: Assists in creating new APIs, packages, or application structure by suggesting the smallest pattern that satisfies the requirement.
  • Review Mode: Audits existing code for design issues, such as init() abuse, unbounded resources, missing timeouts, and implicit global state.

Quick Start

Apply the golang-design-patterns skill to analyze your current project's design patterns.

Frequently Asked Questions about golang-design-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I apply idiomatic Golang design patterns to improve code maintainability?

Idiomatic Golang design patterns improve maintainability by guiding functional options, constructors, error handling, and resource management. This Skill audits existing code for design issues and suggests the smallest pattern satisfying architectural requirements.

What is the best way to handle errors and resources in Golang applications?

Handling errors and resources in Golang requires idiomatic patterns for graceful shutdown and resilience. This Skill provides guidance on functional options and resource management to ensure cleaner code that is easier to test and less prone to bugs.

How do I audit my Go code for unbounded resources and missing timeouts?

Auditing Go code for unbounded resources and missing timeouts is handled by Review Mode, which detects design issues like init() abuse and implicit global state. It analyzes your current project's design patterns to pinpoint structural weaknesses.

Do I need prior knowledge of Golang best practices to use this design pattern guidance?

Prior knowledge of Golang best practices is required to apply this design pattern guidance effectively. The Skill focuses on architectural patterns, dependency injection, and data handling, requiring developers to understand Golang idioms.

When should I use functional options and dependency injection in Golang?

Functional options and dependency injection in Golang should be used when creating new APIs, packages, or application structures. Design Mode assists by suggesting the smallest idiomatic pattern that satisfies your specific structural requirement.