Skip to main content
Run any Skill in Manus
with one click

golang-patterns

Stars2
Forks0
UpdatedJuly 9, 2026 at 00:38

Idiomatic Go engineering discipline: writing, reviewing, and refactoring Go so it stays boring, predictable, and easy to maintain. Covers the core Go proverbs (clear over clever, accept interfaces return structs, useful zero values), error-handling contracts (wrap with %w, sentinel + typed errors, errors.Is / errors.As, never silently drop), concurrency safety (worker pools, context-driven cancellation and timeout, errgroup, goroutine-leak avoidance, graceful shutdown), interface and package design (small consumer-side interfaces, no package-level mutable state, dependency injection), struct ergonomics (functional options, embedding), allocation-aware performance (preallocation, strings.Builder, sync.Pool), and the standard tooling gate (go vet, staticcheck, golangci-lint, race detector, gofmt/goimports). Use when authoring a new .go file, reviewing a Go pull request, designing a package or module boundary, wiring goroutines and channels, shaping an error path, or picking a lint gate.

Installation

Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.

SKILL.md
readonly