golang-design-guide

Define and apply structured Go library design patterns for scalable, maintainable modules.

23|2|Updated Jun 9, 2025
One-click install
npx skills add https://github.com/kaptinlin/gozod --skill golang-design-guide
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-design-guide
Source: https://github.com/kaptinlin/gozod/tree/main/.agents/skills/golang-design-guide
Command: npx skills add https://github.com/kaptinlin/gozod --skill golang-design-guide

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Comprehensive architecture design guide for Golang libraries that helps teams design maintainable, scalable packages by standardizing architecture, API patterns, and documentation.

Core Features & Use Cases

  • Clear design philosophy (KISS, DRY, YAGNI)
  • API design patterns (Functional Options, Builder, Interface Segregation, Fluent API)
  • Documentation templates (DESIGN.md, CLAUDE.md) and usage guidance
  • Testing patterns and error-handling strategies
  • Real-world pattern references and examples (go-fsm, go-cache, go-config)

Quick Start

Review the DESIGN.md and CLAUDE.md templates to begin documenting a new Go library with standardized design patterns.

Frequently Asked Questions about golang-design-guide

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

FAQPage Schema
What are the best practices for Golang library architecture and API design?

Core Golang library design patterns include Functional Options, Builder, Interface Segregation, and Fluent API. These patterns enforce maintainable, scalable packages by standardizing architecture, error handling, and two-phase construction across Go modules.

How do I document a Go library architecture using DESIGN.md and CLAUDE.md templates?

Document Go library architecture using DESIGN.md and CLAUDE.md templates to standardize design philosophy, API patterns, and testing strategies. This guide provides structured templates for documenting Go modules with consistent architectural conventions.

When should I use Functional Options vs Builder pattern in Go?

Functional Options and Builder patterns in Go serve distinct API design needs. This guide differentiates applying both patterns alongside Interface Segregation and Fluent API to structure scalable Go libraries, ensuring flexible and maintainable module construction.

Does this Go design guide support Go 1.20 through 1.26 features for infrastructural packages?

This Go design guide supports Go 1.20 through 1.26 features for infrastructural packages, framework-agnostic modules, and core Go libraries. It applies standardized design patterns, error handling, and testing strategies across these specific Go versions.

How to implement two-phase construction and error handling strategies for Go modules?

Implement two-phase construction and error handling strategies for Go modules by following structured design patterns. This guide enforces these practices alongside KISS, DRY, and YAGNI principles to ensure scalable, maintainable Go library architecture.