go-best-practices

Installation
SKILL.md

Go Best Practices

Type-First Development

Types define the contract before implementation. Follow this workflow:

  1. Define data structures - structs and interfaces first
  2. Define function signatures - parameters, return types, and error conditions
  3. Implement to satisfy types - let the compiler guide completeness
  4. Validate at boundaries - check inputs where data enters the system

Make Illegal States Unrepresentable

Use Go's type system to prevent invalid states at compile time.

Structs for domain models:

// Define the data model first
type User struct {
Related skills
Installs
1
GitHub Stars
109
First Seen
Jan 30, 2026