Skip to content
Skill

Go coding standards

Applies Go style and formatting conventions to code you write or review

Go coding standards is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
90
Last commit
License
MIT
Listing updated

Similar skills

About Go coding standards

This skill gives the agent a set of Go style rules to follow while writing or reviewing code. It covers import grouping, how to declare variables, struct literal rules, early returns to reduce nesting, declaration ordering, line length, defer usage, enum zero values, time.Duration handling, receiver consistency and struct tag hygiene.

The skill points the agent to goimports, go vet and staticcheck or golangci-lint as checks that code should pass. Naming, architecture, concurrency and performance are handled by separate skills, and the skill notes that a project-level rule can override it.

It relies on the Go toolchain being installed. Two reference files hold longer material on file organization and receiver and tag examples, which the agent reads only when needed.

When your agent uses it

Go coding standards and style conventions grounded in Effective Go, Go Code Review Comments, and production-proven idioms. Use when writing or reviewing Go code for import ordering, variable declarations, struct initialization, nesting, receivers, struct tags, or formatting rules. Trigger examples: "check Go style", "fix formatting", "Go conventions", "struct initialization". Not for: naming (go-naming), architecture (go-architecture-review), concurrency (go-concurrency-review), performance tuning (go-performance-review).

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 3 files (11 KB) on GitHub on 3 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

Download the skill folder from https://github.com/eduardo-sl/go-agent-skills and copy it into your agent's skills folder.

What it does

Import grouping rules
Orders imports into standard library, external and project groups, and bans dot imports.
Declaration and literal style
Guides when to use var versus short declarations and requires field names in struct literals.
Control flow cleanup
Favors guard clauses and early returns to keep the happy path unindented.
Receiver and tag consistency
Keeps one receiver kind per type and requires explicit, checked struct tags on serialized fields.
Time and enum conventions
Uses time.Duration instead of raw integers and reserves zero values for Unknown sentinels.
Pre-completion checklist
Ends with a verification list covering vet, lint, imports and receiver consistency.

Good for

  • Review this Go file for style and formatting issues
  • Fix import ordering across a Go package
  • Clean up deeply nested error handling in a Go function
  • Make struct literals use field names throughout a module
  • Check that struct tags are complete before a JSON API change

Go coding standards FAQ

What does Go coding standards need to run?

It requires the Go toolchain. golangci-lint is optional.

Does Go coding standards overlap with naming or performance review?

No. Naming, architecture, concurrency and performance tuning are assigned to separate skills.

Can a project override these rules?

Yes. A project skill or agent-config rule that explicitly supersedes it takes precedence.

Does Go coding standards run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Go coding standards?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Go coding standards?

The closest alternatives to Go coding standards are Go code review, Go naming, Go defensive coding, Go documentation and Go architecture review.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from eduardo-sl/go-agent-skills

  1. Guides Go agents in designing HTTP REST APIs, handlers, middleware and shutdown

    • Open source
    • 90 GitHub stars
    • Developer tools
  2. Reviews Go project structure, dependency direction and module boundaries

    • Open source
    • 90 GitHub stars
    • Developer tools
  3. Guides an AI agent to build Go command-line tools with clean flags, streams and exit codes

    • Open source
    • 90 GitHub stars
    • Developer tools
  4. Guides Go code toward constructor injection, explicit wiring and no global state

    • Open source
    • 90 GitHub stars
    • Developer tools
  5. Guides Go code toward idiomatic design patterns like functional options and factories

    • Open source
    • 90 GitHub stars
    • Developer tools
  6. Guides building Go GraphQL servers with gqlgen, covering N+1 batching and query limits

    • Open source
    • 90 GitHub stars
    • Developer tools