Tooluck logoTooluck
SKILL.md

golang-code-style

Agent skill fromsamber/cc-skills-golang

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).

How to install golang-code-style

install golang-code-style
# install the cc-skills-golang pack with the skills CLI
npx skills add samber/cc-skills-golang

# or add only this skill to Claude Code: copy the folder

skills/golang-code-style/

# into

~/.claude/skills/golang-code-style/ (all projects)

.claude/skills/golang-code-style/ (one project)

skills/golang-code-style/SKILL.md

MITFull file
1**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.
2
3> **Community default.** A company skill that explicitly supersedes `samber/cc-skills-golang@golang-code-style` skill takes precedence.
4
5# Go Code Style
6
7Style 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.
8
9> "Clear is better than clever." — Go Proverbs
10
11When ignoring a rule, add a comment to the code.
12
13## Line Length & Breaking
14
15No 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:
16
17```go
18// Good — each argument on its own line, closing paren separate
19mux.HandleFunc("/api/users", func(w http.ResponseWriter, r *http.Request) {
20 handleUsers(
21 w,
22 r,
23 serviceName,
24 cfg,
25 logger,
26 authMiddleware,
27 )
28})
29```
30…

Excerpt shown under the repository's MIT license.

More skills in cc-skills-golang

Keep exploring

Similar skill repositories

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates