
Golang Code Style
Enforces Go code style decisions that linters miss: semantic line breaking at 4+ arguments, early returns to reduce nesting, default-then-override instead of else-if chains, and named booleans for complex conditions. Built by samber to work alongside the naming and design patterns skills in the same collection. The line breaking rules are strict (one argument per line even when prompts ask for single-line code), which feels heavy-handed until you're reviewing diffs on a team. Focuses on readability over cleverness, with practical guidance on when to use var versus :=, how to handle nil slices in JSON responses, and why blank imports belong in main packages only. Includes parallelization hints for reviewing large codebases.
- install copies · 90 days. Times the install command was copied on this site in the last 90 days, bots filtered.
- 27
- skills.sh installs
- 46.1K
- GitHub stars
- 3.8K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add samber/cc-skills-golang --skill golang-code-style --agent claude-codeInstalls into .claude/skills of the current project.
Files
Orchestration mode: Fan out the sub-agents described in the "Parallelizing Code Style Reviews" section, each covering an independent style concern, when reviewing code style across a large codebase, and merge their findings. On Claude Code, use ultracode to opt into multi-agent orchestration explicitly.
Community default. A company skill that explicitly supersedes
samber/cc-skills-golang@golang-code-styleskill takes precedence.
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:
Sponsors
Details
- Repository
- github.com/samber/cc-skills-golang
- Categories
- Documentation, Code Review & Quality, Go
- First seen
- Apr 16, 2026
More from samber/cc-skills-golang
All 47- Golang Testing45.4K
- Golang Error Handling45.3K
- Golang Security44.2K
- Golang Design Patterns43.8K
- Golang Performance43.6K
- Golang Concurrency43.6K
- Golang Context42.7K
- Golang Naming42.5K
- Golang Database42.5K
- Golang Safety42.2K
- Golang Project Layout42.1K
- Golang Documentation42K
- Golang Modernize42K
- Golang Lint41.9K
- Golang Data Structures41.8K
- Golang Troubleshooting41.6K
- Golang Observability41.5K
- Golang Dependency Management41.4K
- Golang Structs Interfaces41.3K
- Golang Cli41.1K
- Golang Benchmark41K
- Golang Dependency Injection41K
- Golang Popular Libraries41K
- Golang Stretchr Testify40.9K