go-style
Go coding conventions, error handling, interface design, and idiomatic patterns.
Skill by els0r
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/els0r-go-style
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: design, writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/go-style
What's inside
- Skill name
go-style- Description
- Go coding conventions, error handling, interface design, and idiomatic patterns. Use when writing, reviewing, refactoring, or discussing Go code. Fires alongside coding-style — do not repeat cross-language rules.
- License
- MIT
- Instructions
- 132 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Go Coding Style
Cross-language principles (never-nesting, naming, restraint) live in `coding-style`. This file covers Go-specific idioms only.
## Never Nesting — Go Idiom
Guard clauses with early return. `continue` in loops. This is the Go spelling of the universal rule.
```go
// ✅
func checkA(str string) bool {
if str == "" {
return false
}
for _, char := range str {
if char == ' ' || char == '\t' || char == '\n' {
continue
}
if char == 'A' || char == 'a' {
return true
}
}
return false
}
```
## Error Handling
Handle all errors. Wrap with context using `%w`. No naked returns.
```go
// ✅ wrap with context
if err := repo.SaveUser(ctx, user); err != nil {
return fmt.Errorf("save user %s: %w", user.ID, err)
}
// ❌ context lost
if err := repo.SaveUser(ctx, user); err != nil {
return err
}
```
Sentinel errors for known conditions. Custom types when callers need structured data.
```go
var (
ErrNotFound = errors.New("resource not found")
ErrUnauthorized = errors.New("unauthorized")
)
// check with errors.Is / errors.As — never string matching
```
Acceptable exception: best-effort cleanup with explicit discard.
```go
_ = writer.Close()
```
## Zero-Value Design
Types must be usable at zero value. No constructor-required initialization.
```go
// ✅ zero value works
type Counter struct {
mu sync.Mutex
count int
}
// ❌ nil map panic
type BadCounter struct {
counts map[string]int
}
```
## Interface Design
- Accept interfaces, return structs.
- Single-method interfaces preferred. Compose when needed.
- Define interfaces at the consumer, not the implementor.
```go
// consumer owns the interface
package service
type UserStore interface {
GetUser(id string) (*User, error)
}
type Service struct {
store UserStore
}
```
## Functional Options
Use for constructors with optional configuration.
```go
type Option func(*Server)
func WithTimeout(d time.Duration) Option {
return func(s *Server) { s.timeout = d }
}
func NewServer(addr string, opts ...Option) *Server {
s := &Server{addr: addr, timeout: 30 * time.Second}
for _, opt := range opts {
opt(s)
}
return s
}
```
## Package Organization
- Short, lowercase names — no underscores.
- `internal/` for packages not intended for external import.From els0r/skills, MIT.
More from els0r/skills
- 0.547score
blast-radius
els0r
Produce a risk-ranked audit map of a codebase (especially AI-generated code the user hasn't read), so the human can spend limited reading time where failure…
SkillBFreshness: B★ 1Claude Code +9 - 0.497score
go-testing
els0r
Go testing standards: table-driven tests, testify/require, sentinel errors, mocking, fuzzing, race detection, and test file conventions.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
design-rubric
els0r
Use when critiquing, reviewing, or refining visual designs, wireframes, or UI layouts — especially for small/medium SPAs.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
go-instrumentation
els0r
Observability principles for Go services: structured logging, distributed tracing, metrics, context propagation, and HTTP service bootstrap.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
go-performance
els0r
Go performance analysis: memory allocation, CPU bottlenecks, concurrency contention, struct alignment, escape analysis, and benchmarking patterns.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
improve-go-architecture
els0r
Find deepening opportunities in a Go codebase, informed by the domain language in CONTEXT.md and the decisions in docs/adr/.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
autonomous-orchestration
els0r
Use when the user explicitly hands over multi-PR coordination — asking Claude to follow through on a user story, work bundle, or backlog scope autonomously…
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
coding-style
els0r
Use for all code generation, review, and refactoring regardless of language.
SkillCFreshness: C★ 1Claude Code +9 - 0.486score
Codebase Analyzer
els0r
Analyzes codebase implementation details.
SkillCFreshness: C★ 1Claude Code +9 - 0.486score
Codebase Locator
els0r
Locates files, directories, and components relevant to a feature or task.
SkillCFreshness: C★ 1Claude Code +9 - 0.472score
grill-with-docs
els0r
Grilling session that challenges your plan against the existing domain model, sharpens terminology, and updates documentation (CONTEXT.md, ADRs) inline as…
SkillCFreshness: C★ 1Claude Code +9 - 0.468score
diagnose
els0r
Disciplined diagnosis loop for hard bugs and performance regressions.
SkillCFreshness: C★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- May 20, 2026 (5 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/els0r/skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from els0r
- 0.547score
blast-radius
els0r
Produce a risk-ranked audit map of a codebase (especially AI-generated code the user hasn't read), so the human can spend limited reading time where failure…
SkillBFreshness: B★ 1Claude Code +9 - 0.497score
autonomous-orchestration
els0r
Use when the user explicitly hands over multi-PR coordination — asking Claude to follow through on a user story, work bundle, or backlog scope autonomously…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
design-rubric
els0r
Use when critiquing, reviewing, or refining visual designs, wireframes, or UI layouts — especially for small/medium SPAs.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
go-instrumentation
els0r
Observability principles for Go services: structured logging, distributed tracing, metrics, context propagation, and HTTP service bootstrap.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
go-performance
els0r
Go performance analysis: memory allocation, CPU bottlenecks, concurrency contention, struct alignment, escape analysis, and benchmarking patterns.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
improve-go-architecture
els0r
Find deepening opportunities in a Go codebase, informed by the domain language in CONTEXT.md and the decisions in docs/adr/.
SkillCFreshness: C★ 1Claude Code +9
Cite this page
go-style skill. Agent Mart. https://agentmart.dev/skills/els0r-go-style (last updated 2026-10-24)