go-coding-standards

go-coding-standards is a skill for Claude Code from eduardo-sl/go-agent-skills. It costs 99 tokens per session (2,177 once invoked), scanned A, original, MIT.

Rules for writing and reviewing idiomatic Go code, covering names, imports, declarations, formatting, and common project conventions. Idiomatic means code that follows the patterns Go developers normally expect.

In plain words
What is it for?
Use it when creating or reviewing Go code, arranging imports, choosing names, initializing structs, and checking code with goimports, go vet, staticcheck, or golangci-lint.
Why use it?
It makes code easier to read and helps catch style, correctness, and static-analysis problems before they reach review or production.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Claude Code.

Part of the go-agent-skills plugin — 33 skills shipped together

Good fit Use it when creating or reviewing Go code, arranging imports, choosing names, initializing structs, and checking code with goimports, go vet, staticcheck, or golangci-lint.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/eduardo-sl/go-agent-skills/go-coding-standards
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add eduardo-sl/go-agent-skills --skill go-coding-standards
Clone the repo
git clone --depth 1 https://github.com/eduardo-sl/go-agent-skills

Made for: Claude Code.

Or install go-agent-skills, the plugin that ships this one along with the rest of its 33 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for go-coding-standards

README.md
[![agentmods](https://agentmods.dev/badge/skills/eduardo-sl/go-agent-skills/go-coding-standards/github.svg)](https://agentmods.dev/skills/eduardo-sl/go-agent-skills/go-coding-standards)
Your own site
<a href="https://agentmods.dev/skills/eduardo-sl/go-agent-skills/go-coding-standards"><img src="https://agentmods.dev/badge/skills/eduardo-sl/go-agent-skills/go-coding-standards/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for go-coding-standards

Your own site · 80×15
<a href="https://agentmods.dev/skills/eduardo-sl/go-agent-skills/go-coding-standards"><img src="https://agentmods.dev/badge/skills/eduardo-sl/go-agent-skills/go-coding-standards.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 99 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,177 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00099 $0.02177
Opus 5 $0.00049 $0.01089
Sonnet 5 $0.00020 $0.00435
Haiku 4.5 $0.00010 $0.00218

Measured 10d ago against content hash d4d663f680b3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

go-coding-standards scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/(code-quality)/go-coding-standards/SKILL.md · 320 lines

How it starts

The opening of the file, as written. The whole thing — 320 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Go Coding Standards

Idiomatic Go conventions grounded in Effective Go, Go Code Review Comments, and production-proven idioms. All code MUST pass goimports, go vet, and staticcheck (or golangci-lint run) without errors.

1. Import Ordering

Group imports in this order, separated by blank lines:

import (
    // 1. Standard library
    "context"
    "fmt"
    "net/http"

    // 2. External packages
    "github.com/gorilla/mux"
    "log/slog"

    // 3. Internal/project packages
    "github.com/myorg/myproject/internal/service"
)

NEVER use dot imports. Use aliasing only to resolve conflicts.

2. Naming Conventions

Packages

  • Short, lowercase, single-word names. No underscores, no camelCase.
  • Name should describe what the package provides, not what it contains.
  • Avoid generic names: util, common, helpers, misc, base.

Functions & Methods

  • MixedCaps (exported) or mixedCaps (unexported). No underscores except in test files.
  • Getters: use Name(), NOT GetName(). Setters: use SetName().
  • Constructors: NewFoo() returns *Foo. If only one type in package: New().

Variables

  • Short names in tight scopes: i, n, err, ctx.
  • Descriptive names for wider scopes: userCount, retryTimeout.
  • Prefix unexported package-level globals with _: var _defaultTimeout = 5 * time.Second.
  • Do NOT shadow built-in identifiers (error, len, cap, new, make, close).

Interfaces

  • Single-method interfaces: method name + -er suffix (Reader, Writer, Closer).
  • Define interfaces where they are consumed, not where they are implemented.

3. Variable Declarations

Top-level

Use var for top-level declarations. Do NOT specify type when it matches the expression:

// ✅ Good
var _defaultPort = 8080
var _logger = slog.Default()

// ❌ Bad — redundant type
var _defaultPort int = 8080

Local

  • Prefer := for local variables.
  • Use var only when zero-value initialization is intentional and meaningful.

Read the full file on GitHub · 320 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 320 lines · 99 tokens per session scan A d4d663f680b3

Subscribe to this mod's changes

go-coding-standards is a skill published in the GitHub repository eduardo-sl/go-agent-skills (71 stars, last pushed 22d ago), licensed MIT. It adds 99 tokens to every session and 2,177 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.