go-code-style
Use when writing or reviewing Go code for clarity, formatting, control flow, variable declarations, switch usage, and function design. Covers the priority order (clarity > simplicity > concision > maintainability > consistency), gofmt rules, early-return / no-else patterns, switch over if-else chains, slice/map initialization, and value-vs-pointer choices. Apply proactively to every Go change, even when the user has not asked about style.
- Version
- 0.1.0
- License
- MIT
- Compatibility
- Designed for Claude Code or similar AI coding agents. Works on any Go version supported by gofmt; range-over-int requires Go 1.22+.
Pinned to revision 121b47cd4371, so it is the text this page describes rather than whatever the author pushed since.
Pre-approved tools experimental
Experimental field. Support varies between clients, so this list is what the author declared, not what your client will enforce.
- Read
- Edit
- Write
- Glob
- Grep
- Bash(go:*)
- Bash(golangci-lint:*)
Files
- skills/go-code-style/SKILL.md
- skills/go-code-style/references/control-flow.md
- skills/go-code-style/references/formatting-and-layout.md
- skills/go-code-style/references/function-and-data-init.md
Every link opens the file at its source, pinned to the revision this page describes.