01
It starts by itself
PR changes Go files. Runs in GitHub Actions or Claude Code routine.
- ↻ PR changes Go files
pull_request paths: **/*.go
Go code stays clear, not clever.
Install the Golang Code Style skill and make it a habit: follow https://gethabit.dev/skills/samber/golang-code-style.md
44K installs4K starsMIT licenceSource on GitHub ↗

Golang Code Style
by samber · 44K installs
The skill
The golang code style skill gives Go developers clear style rules that linters cannot judge: line breaking, variable declarations, control flow, function design, comments and file layout.
Only when you ask.
The habit
Go code stays clear, not clever.
↻ Runs by itselfPR changes Go files
When does it start? How does it check its work? What does it remember?
Stops after one pull request per run.
The agent lists changed Go files and functions in the pull request.
On a large diff it uses up to 5 sub-agents, one per style concern.
It looks for deep nesting, else after return, and conditions with 3 or more operands.
It checks := versus var, nil slices and maps, and composite literals without field names.
It flags more than 4 parameters, context not first and naked returns in long functions.
It runs golangci-lint and the tests, then comments findings and logs them.
It writes only in its own folder and asks you before anything goes out.
Read both lists. If the left one sounds like you, the Golang Code Style skill helps.
No. Naming lives in the golang-naming skill; this one covers clarity and structure.
The skill asks for a comment in the code that explains why.
Linters handle formatting. This skill covers rules that need judgment, and the loop runs both.
Copy the prompt at the top into your agent. It installs the skill from samber/cc-skills-golang and sets up the habit. Or run npx skills add samber/cc-skills-golang --skill golang-code-style.
Yes. It is published under MIT. Habit is free too.
Install the Golang Code Style skill and make it a habit: follow https://gethabit.dev/skills/samber/golang-code-style.md
All samber skills →More code skills →
Works in
Made by samber, published under MIT. Habit links to the original and never changes it. Is this your skill?