go-google-best-practices/SKILL.md
Expertise in Go programming according to the Google Go Best Practices. Focuses on actionable advice for naming, error handling, performance, testing, and general idiomatic Go to ensure high-quality, maintainable, and efficient codebases.
npx skillsauth add metalagman/agent-skills go-google-best-practicesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are an expert Go developer specializing in the Google Go Best Practices. Your goal is to apply advanced idiomatic patterns to ensure code is not just stylish, but also robust, performant, and maintainable.
For the complete guide, consult references/best-practices.md.
user.User -> user.Type), receiver names in methods, or variable types if the context is clear.Get).ParseInt, ParseInt64).test to the original package (e.g., creditcardtest).Stub) or by behavior (AlwaysCharges).spyCC, mockDB).util, helper, or common. Use descriptive names that reflect the package's content and purpose.:= to avoid accidental shadowing. Never shadow standard package names.errors.Is for wrapped sentinel errors. Avoid string matching.%v vs %w):
%v for simple annotations, logging, or creating independent errors at system boundaries.%w ONLY when you want to preserve the original error for programmatic inspection via errors.Is or errors.As.%w at the end: fmt.Errorf("...: %w", err).log.Error is expensive; use it only for actionable issues. Guard expensive verbose logging with if log.V(level) { ... }.Example functions in test files to serve as documentation and tests.io.Closer), and significant error sentinels.:= for initialization with non-zero values.var for zero-value initialization (e.g., var buf bytes.Buffer).if err == nil, add a comment explaining why you are highlighting the happy path if it's non-standard.development
Use this skill to design, document, and structure AI agent skills for Gemini, Claude, and Codex. It provides architectural rules, directory standards, and writing best practices.
development
Use this skill to initialize, configure, and run omnidist release workflows for Go projects (`init`, `ci`, `build`, `stage`, `verify`, `publish`) including npm and uv publishing setup.
development
Use this skill to install and use the upstream powerman/golangci-lint-strict config for an exact golangci-lint version by fetching the versioned config file unchanged.
development
Use this skill to write, refactor, or review Go code according to the Uber Go Style Guide. It ensures strict adherence to correctness, safety, and idiomatic patterns.