Golang Code Style
Clear, opinionated Go style rules for line breaking, variable declarations, and control flow that linters cannot judge.
- CCM score
- 69 of 100
- install copies · 90 days. Times the install command was copied on this site in the last 90 days, bots filtered.
- 9
- skills.sh installs
- 47.9K
- GitHub stars
- 4K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers line length and breaking, variable declarations, slice and map initialization, and composite literals
- Includes control-flow guidance: early returns, eliminating
else, named boolean conditions, and switch over if-else chains - Enforces explicit slice and map initialization and field names in composite literals, since nil maps panic and positional fields break
- Designed for reviewing Go code or setting project standards; naming, lint config, and doc comments are covered by sibling skills
Install
$ npx -y skills add samber/cc-skills-golang --skill golang-code-style -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
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:
Details
- Repository
- github.com/samber/cc-skills-golang
- Categories
- Go, Code Review & Quality
- First seen
- Apr 16, 2026
Questions
What does the golang-code-style skill cover?
The golang-code-style skill covers Go style conventions that need human judgment, such as line length and breaking, variable declarations, control flow clarity, and when comments help or hurt. It is meant for writing or reviewing Go code and for setting project coding standards.
How do I install the golang-code-style skill?
Run npx -y skills add samber/cc-skills-golang --skill golang-code-style -y in your project. Once installed, the agent can apply these Go style rules when writing or reviewing code.
Is golang-code-style the best Go skill for code style?
It ranks first in the Go category on Claude Marketplaces, ahead of skills such as golang-testing, golang-error-handling, golang-design-patterns, golang-concurrency and golang-performance. It sets itself apart by focusing on clarity rules that linters cannot check, while naming, linter setup and doc comments are handled by separate skills.
More from samber/cc-skills-golang
All 47- Golang Testing47.2K
- Golang Error Handling47.1K
- Golang Security45.9K
- Golang Design Patterns45.3K
- Golang Concurrency45.3K
- Golang Performance45.1K
- Golang Context44.3K
- Golang Database44K
- Golang Naming43.9K
- Golang Safety43.7K
- Golang Project Layout43.5K
- Golang Modernize43.3K
- Golang Lint43.3K
- Golang Documentation43.3K
- Golang Data Structures43.1K
- Golang Observability42.9K
- Golang Troubleshooting42.8K
- Golang Dependency Management42.7K
- Golang Structs Interfaces42.6K
- Golang Cli42.3K
- Golang Benchmark42.3K
- Golang Dependency Injection42.3K
- Golang Popular Libraries42.2K
- Golang Stretchr Testify42.1K
Similar to Golang Code Style
More Gogolang-lintSkillsamber/cc-skills-golang43.3K installsConfiguration and workflow guidance for golangci-lint, covering linter selection, nolint suppression rules, and output interpretation.
golang-refactoringSkillsamber/cc-skills-golang14.1K installsBehavior-preserving Go refactoring workflow with a coverage-gated safety net, gopls-driven transforms, and small stacked PRs.
go-style-coreSkillcxuu/golang-skills1.4K installsCore Go style guidance covering clarity-first priorities, gofmt, early returns, and semicolon rules.
Effective GoSkillopenshift/hypershift399 installsIdiomatic Go guidance drawn from the official Effective Go guide for writing, reviewing, and refactoring code.
go-code-reviewSkillcxuu/golang-skills1.9K installsGo code review checklist covering formatting, errors, naming, concurrency, interfaces, and security checks with tooling.
go-style-guidePluginrobbyt/claude-skills42 starsReview Go code for adherence to Go Style Guide. Use when the user requests a code review of completed work, pull requests, or feature branches in Go projects.