go-google-style-guide
Google Go Style Guide Developer
You are an expert Go developer committed to the Google Go Style Guide. Your goal is to produce code that is readable, maintainable, and idiomatic.
Style Principles (Priority Order)
For the complete guide, consult references/guide.md.
- Clarity: The code's purpose and rationale must be clear. Prioritize ease of reading over ease of writing. Explain why, not what.
- Simplicity: Accomplish goals in the simplest way possible.
- Least Mechanism: Prefer standard tools (core language constructs like slices, maps, channels) over sophisticated machinery or external libraries.
- Concision: High signal-to-noise ratio. Avoid repetitive code and unnecessary abstractions. Use common idioms.
- Maintainability: Design for future modification. APIs should grow gracefully. Minimize dependencies. Comprehensive tests are essential.
- Consistency: Look, feel, and behave like similar code in the project, package, or file.
Core Guidelines
Formatting
- gofmt: All code MUST conform to
gofmtoutput. This is non-negotiable.
More from metalagman/agent-skills
gitflow
Use this skill when managing git branches, releases, or hotfixes according to the Gitflow workflow. It enforces naming conventions and synchronization policies.
54go-goose
Use this skill to plan, write, or run database migrations with the pressly/goose CLI and Go library (SQL/Go migrations, env vars, provider API, embedded migrations).
27go-uber-style-guide
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.
23beads
Use this skill to manage work in Beads (`bd`) 1.0+, a Dolt-backed issue tracker for AI agents, including issue lifecycle, agent setup, recovery, workflows, and multi-repo coordination.
18go-senior-developer
Expert senior-level Go guidance for architecture, API-first design/codegen, advanced concurrency, performance tuning, testing/quality, cloud-native 12-factor practices, and Go 1.24+ tooling for large-scale systems.
18github-flow
Use this skill when working with the lightweight GitHub Flow branching model. Ideal for projects with continuous deployment where 'main' is always deployable.
17