
Go Style Core
Core Go style guidance covering clarity-first priorities, gofmt, early returns, and semicolon rules.
- skills.sh installs
- 1.3K
- GitHub stars
- 196
- last updated
- Aug 21, 2026
What it does
- Covers the five style principles in priority order: clarity, simplicity, concision, maintainability, and consistency
- Includes guidance on formatting with
gofmt, reducing nesting through early returns, and when naked returns are appropriate - Enforces opening braces on the same line as control structures to avoid lexer-inserted semicolons
- Acts as the fallback for Go style questions not covered by more specific skills such as go-naming or go-error-handling
Install
$ npx -y skills add cxuu/golang-skills --skill go-style-core -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Go Style Core Principles
Resource Routing
references/PRINCIPLES.md- Read when resolving conflicts between clarity, simplicity, concision, maintainability, and consistency.references/FORMATTING.md- Read when handling gofmt, line breaks, whitespace, comments, or semicolons.
Style Principles (Priority Order)
When writing readable Go code, apply these principles in order of importance:
Priority Order
- Clarity — Can a reader understand the code without extra context?
- Simplicity — Is this the simplest way to accomplish the goal?
- Concision — Does every line earn its place?
- Maintainability — Will this be easy to modify later?
- Consistency — Does it match surrounding code and project conventions?
Formatting
Run gofmt — no exceptions. There is no rigid line length limit, but Uber suggests a soft limit of 99 characters. Break by semantics, not length — refactor rather than just wrap.
Reduce Nesting
Handle error cases and special conditions first. Return early or continue the loop to keep the "happy path" unindented.
Details
- Repository
- github.com/cxuu/golang-skills
- Categories
- Go, Code Review & Quality
- First seen
- May 16, 2026
More from cxuu/golang-skills
All 20- Go Performance1.3K
- Go Context1.3K
- Go Naming1.3K
- Go Defensive1.3K
- Go Packages1.3K
- Go Functional Options1.3K
- Go Data Structures1.3K
- Go Control Flow1.3K
- Go Logging1.1K
- Go Functions1.1K
- Go Generics1.1K
- Go Declarations1.1K
- Go Code Review1.8K
- Go Testing1.4K
- Go Error Handling1.4K
- Go Concurrency1.4K
- Go Linting1.4K
- Go Interfaces1.4K
- Go Documentation1.3K
Similar to Go Style Core
More Go
go-code-reviewcxuu/golang-skills1.8K installsGo code review checklist covering formatting, errors, naming, concurrency, interfaces, and security checks with tooling.
go-control-flowcxuu/golang-skills1.3K installsGo conditionals, loops, and switch statements with guard clauses, scoped initialization, and blank identifier patterns.
golang-code-stylesamber/cc-skills-golang46.6K installsGo code style conventions for clarity: line breaking, variable declarations, control flow, and when comments help.
Effective Goopenshift/hypershift555 starsIdiomatic Go guidance drawn from the official Effective Go guide for writing, reviewing, and refactoring code.
golang-lintersamber/cc-skills-golang26.5K installsRuns Go linting checks directly in your Claude Code workflow, catching style issues, bugs, and code smells without leaving your editor. Given the 26.5K installs