Download for macOS
Skill

golang-code-style

@samber 41k installs Trending #402 on Skills.Sh Updated 2026-08-01

Golang code style conventions — line length and breaking, variable declarations, control flow clarity, when comments help vs hurt. Use when writing or reviewing Go code, asking about style or clarity, or establishing project coding standards. Not for naming conventions (→ See `samber/cc-skills-golang@golang-naming` skill), linter configuration (→ See `samber/cc-skills-golang@golang-lint` skill), or doc comments (→ See `samber/cc-skills-golang@golang-documentation` skill).

agentagent-skillsaiantigravityclaudeclaude-codecodecodex

Install

git clone https://github.com/samber/cc-skills-golang /tmp/cc-skills-golang && ln -s /tmp/cc-skills-golang/skills/golang-code-style ~/.claude/skills/golang-code-style

From README

Go Code Style Style rules that require human judgment — linters handle formatting, this skill handles clarity. For naming see samber/cc-skills-golang@golang-naming skill; for design patterns see samber/cc-skills-golang@golang-design-patterns skill; for struct/interface design see samber/cc-skills-golang@golang-structs-interfaces skill. "Clear is better than clever." — Go Proverbs When ignoring a rule, add a comment to the code. Line Length & Breaking No rigid line limit, but lines beyond 120 characters MUST be broken. Break at semantic boundaries, not arbitrary column counts. Function calls with 4+ arguments MUST use one argument per line — even when the prompt asks for single-line code: When a function signature is too long, the real fix is often fewer parameters (use an options struct) rather than better line wrapping. For multi-line signatures, put each parameter on its own line. Variable Declarations SHOULD use := for non-zero values, var for zero-value initialization.