eser

go-practices

@eser/go-practices
eser
83
4 forks
Updated 1/6/2026
View on GitHub

Go conventions for hexagonal architecture, project structure, error handling, testing, and observability. Use when writing Go services.

Installation

$skills install @eser/go-practices
Claude Code
Cursor
Copilot
Codex
Antigravity

Details

Repositoryeser/stack
Path.claude/skills/go-practices/SKILL.md
Branchmain
Scoped Name@eser/go-practices

Usage

After installing, this skill will be available to your AI coding assistant.

Verify installation:

skills list

Skill Instructions


name: go-practices description: Go conventions for hexagonal architecture, project structure, error handling, testing, and observability. Use when writing Go services.

go-practices

Quick Start

  1. Follow hexagonal architecture: business logic in pkg/api/business/, adapters in pkg/api/adapters/
  2. Use snake_case for all Go files
  3. Wrap errors: fmt.Errorf("%w: %w", ErrSentinelError, err)
  4. 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.