From emmaly-skills
Go conventions, error handling, logging, project layout, and preferred libraries — use when working in Go code
How this skill is triggered — by the user, by Claude, or both
Slash command
/emmaly-skills:goThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- Never manually edit `go.mod` or `go.sum`. Use `go mod init github.com/emmaly/<project>` to initialize and `go mod tidy` to sync
go.mod or go.sum. Use go mod init github.com/emmaly/<project> to initialize and go mod tidy to syncgofmt and go vet often and before committingfmt.Errorf("doing something: %w", err)var ErrNotFound = errors.New("not found")) when callers need to check specific conditionslog/slog for structured logging. Avoid log or fmt.Println for operational outputcmd/, internal/, pkg/, etc; use only what the project requireschigorillasqlite preferred, postgres if neededgolang Docker images lag behind bleeding-edge Go releases. When building in containers, set go.mod to the latest Go version available as a container image (check Docker Hub golang tags), not the locally installed versiongo version locally and check available container images before choosing the go directive in go.modgo testnpx claudepluginhub emmaly/emmaly --plugin emmaly-skillsIdiomatic Go patterns for concurrency (goroutines, errgroup, channels), error handling (sentinel, wrapping, custom types), project structure (mod, workspace, vendor), and testing (table-driven tests).
Guides idiomatic Go patterns, best practices, and error handling. Activated when writing, reviewing, or refactoring Go code to ensure robust and maintainable applications.