go-google-best-practices

Installation
SKILL.md

Google Go Best Practices Expert

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.

Core Best Practices

For the complete guide, consult references/best-practices.md.

Naming Conventions

  • Avoid Repetition: Do not repeat package names in functions (e.g., user.User -> user.Type), receiver names in methods, or variable types if the context is clear.
  • Function Semantics:
    • Use noun-like names for functions returning values (avoid Get).
    • Use verb-like names for functions performing actions.
    • For type-specific variations, append the type name (e.g., ParseInt, ParseInt64).
  • Test Doubles:
    • Package: Append test to the original package (e.g., creditcardtest).
    • Stubs: Name concisely (Stub) or by behavior (AlwaysCharges).
    • Variables: Prefix with the double type (e.g., spyCC, mockDB).
  • Package Names: Avoid generic names like util, helper, or common. Use descriptive names that reflect the package's content and purpose.
Related skills
Installs
16
GitHub Stars
13
First Seen
Feb 8, 2026