Claude-skill-registry go-practices
Go conventions for hexagonal architecture, project structure, error handling, testing, and observability. Use when writing Go services.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/go-practices" ~/.claude/skills/majiayu000-claude-skill-registry-go-practices && rm -rf "$T"
manifest:
skills/data/go-practices/SKILL.mdsource content
go-practices
Quick Start
- Follow hexagonal architecture: business logic in
, adapters inpkg/api/business/pkg/api/adapters/ - Use snake_case for all Go files
- Wrap errors:
fmt.Errorf("%w: %w", ErrSentinelError, err) - Run tests with race detection:
go test -race ./...
Key Principles
- Business logic has NO external dependencies
- All external interactions through interfaces
- Composition via AppContext (composition root)
- Table-driven tests with
t.Parallel() - OpenTelemetry for observability
References
See rules.md for complete conventions.