golang-style

golang-style is a skill for Claude Code from fredrikaverpil/dotfiles. It costs 23 tokens per session (731 once invoked), scanned A, original, MIT.

A set of project-specific rules for writing and editing Go code. Go is a programming language, and the rules cover error handling, supported Go versions, and checking the local toolchain before coding.

In plain words
What is it for?
Use it before changing Go files to guide error checks, error wrapping, sentinel errors, and version-aware use of the standard library.
Why use it?
It keeps generated Go code consistent with the project's conventions and prevents compatibility problems caused by targeting the wrong Go version.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it before changing Go files to guide error checks, error wrapping, sentinel errors, and version-aware use of the standard library.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fredrikaverpil/dotfiles/golang-style
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 fredrikaverpil/dotfiles --skill golang-style
Clone the repo
git clone --depth 1 https://github.com/fredrikaverpil/dotfiles

Made for: Claude Code.

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 golang-style

README.md
[![agentmods](https://agentmods.dev/badge/skills/fredrikaverpil/dotfiles/golang-style/github.svg)](https://agentmods.dev/skills/fredrikaverpil/dotfiles/golang-style)
Your own site
<a href="https://agentmods.dev/skills/fredrikaverpil/dotfiles/golang-style"><img src="https://agentmods.dev/badge/skills/fredrikaverpil/dotfiles/golang-style/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 golang-style

Your own site · 80×15
<a href="https://agentmods.dev/skills/fredrikaverpil/dotfiles/golang-style"><img src="https://agentmods.dev/badge/skills/fredrikaverpil/dotfiles/golang-style.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 731 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00023 $0.00731
Opus 5 $0.00012 $0.00365
Sonnet 5 $0.00005 $0.00146
Haiku 4.5 $0.00002 $0.00073

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

Security

Grade A, and why

golang-style scanned grade A with 1 finding 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 11d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s "https://pkg.go.dev/v1beta/symbols/slices?version=v1.21.0"
stow/shared/.claude/skills/golang-style/SKILL.md · 80 lines

How it starts

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

Go conventions

Where this author deviates from, or tightens, idiomatic Go defaults.

Errors and control flow

  • Structure functions so the happy path flows straight down: handle each error and return early, then continue with the main logic. Main logic never nests inside an if err == nil branch.
  • Only wrap errors with %w if the underlying error should be exposed.
  • Define expected error conditions as package-level sentinel errors (var ErrNotFound = errors.New("not found")) and check them with errors.Is, not == or string matching.

Go version

Your idea of "current Go" is frozen at your training cutoff and is usually out of sync with the project in both directions. Before writing code, read the go directive in go.mod and check go version, and target the lower of the two.

That drift cuts both ways:

  • Newer than you know: a helper you are about to hand-roll may already exist in slices, maps, cmp, testing, or a package you have never heard of.
  • Older than you assume: a feature you treat as ordinary may postdate the go directive and simply not build.

go doc <pkg> answers both, but only for the toolchain installed here. To ask about the version the module actually targets, use the pkg.go.dev API — no auth, GET only (announcement, spec at https://pkg.go.dev/v1beta/openapi.yaml):

# Which symbols does a stdlib package have at a specific Go version?
curl -s "https://pkg.go.dev/v1beta/symbols/slices?version=v1.21.0"

# Current Go release, and any release candidate in flight.
curl -s "https://pkg.go.dev/v1beta/versions/std"

# Third-party: latest version, and the symbols it declares.
curl -s "https://pkg.go.dev/v1beta/module/github.com/google/go-cmp"
curl -s "https://pkg.go.dev/v1beta/symbols/github.com/google/go-cmp/cmp"

Release notes are not in the API — fetch https://go.dev/doc/go1.N for a release's changes, or https://go.dev/doc/devel/release for the index.

Formatting

Read the full file on GitHub · 80 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. 11d ago First seen · 80 lines · 23 tokens per session scan A e39188bc85fb

Subscribe to this mod's changes

golang-style is a skill published in the GitHub repository fredrikaverpil/dotfiles (258 stars, last pushed today), licensed MIT. It adds 23 tokens to every session and 731 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

gsl-status

Query and configure the gsl (Go Status Line) that renders a powerline-style status bar in Claude Code and Antigravity CLI.

sfc-gh-eraigosa/dotfiles · 31 tokens

spatie-guidelines

Spatie's PHP, Laravel, JavaScript and Vue coding guidelines and conventions. Use when writing or reviewing PHP, Laravel, JavaScript, or Vue code for Spatie projects or packages. Covers code style, type declarations, docblocks, control flow, naming, routing, controllers, Blade, validation, comments, testing (Pest)…

freekmurze/dotfiles · 113 tokens

spatie-package-skeleton

Guide for creating PHP and Laravel packages using Spatie's package-skeleton-laravel and package-skeleton-php templates. Use when the user wants to create a new PHP or Laravel package, scaffold a package. Also use when building customizable packages — covers proven patterns for extensibility (events, configurable…

freekmurze/dotfiles · 78 tokens

speeding-up-laravel-tests

Use when Laravel/Pest test suites are slow, CI duration is growing, individual tests take seconds, or the user asks to speed up, optimize, or profile tests. Covers factories, fakes, config caching, XDebug/pcov, BCRYPTROUNDS, LazilyRefreshDatabase, and stray HTTP requests.

freekmurze/dotfiles · 72 tokens

livewire-4

Build Livewire 4 components and applications. Use when creating reactive Laravel interfaces, single-file components, multi-file components, page components, forms, actions, or any Livewire-based UI. Triggers include "Livewire component", "wire:model", "wire:click", building interactive Laravel UIs, or working with…

freekmurze/dotfiles · 75 tokens

scaffold-go

Scaffold a complete Go project with CI/CD, release pipeline, Makefile, sr.yaml, .envrc, and standard files. Uses go toolchain and make as the native build system. Loads on top of scaffold-project (run that first for cross-language standard files). Use when creating a new Go CLI, service, or module, or when the user…

urmzd/dotfiles · 116 tokens