Skip to content
Back to skills

Go Practices

ASecurity

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

  • 666 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added February 8, 2026
developmentgotestingapi

Works with

  • api

Security analysis

A100/100

Scanned February 10, 2026

npx -y skills add majiayu000/claude-skill-registry --skill go-practices --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Go Practices?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Go Practices
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-go-practices/badge)](https://www.skillsdirectory.com/skills/majiayu000-go-practices)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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](references/rules.md) for complete conventions.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.