Go Patterns

Go Patterns is a skill for Claude Code, Codex from AmariahAK/atlarix-skills. It costs 2 tokens per session (504 once invoked), scanned A, original, Apache-2.0.

A set of patterns for building Go services and command-line tools. It covers package layout, errors, cancellation, interfaces, concurrency, and tests.

In plain words
What is it for?
It helps structure Go projects, pass cancellation deadlines, wrap errors, limit concurrent tasks, and write table-driven tests.
Why use it?
It helps prevent hidden errors, runaway concurrent work, unclear package boundaries, and code that is hard to maintain.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It helps structure Go projects, pass cancellation deadlines, wrap errors, limit concurrent tasks, and write table-driven tests.

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

Made for: Claude Code, Codex.

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 Patterns

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/amariahak/atlarix-skills/go"><img src="https://agentmods.dev/badge/skills/amariahak/atlarix-skills/go.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 504 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.
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.00002 $0.00504
Opus 5 $0.00001 $0.00252
Sonnet 5 $0.00000 $0.00101
Haiku 4.5 $0.00000 $0.00050

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

Security

Grade A, and why

Go Patterns 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 9d 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/go/SKILL.md · 79 lines

What it actually says

Go Patterns

When to use this skill

Use this skill when building Go services/CLIs and you want practical patterns for package layout, error handling, concurrency, and testing that keep code readable and reliable.

Core patterns

Errors: wrap with context, don’t hide them

Use %w to wrap:

return fmt.Errorf("load config: %w", err)

Prefer returning errors over panics for expected failure modes.

Context propagation

For servers and clients:

  • accept context.Context as the first parameter
  • honor cancellation and deadlines

Interfaces: small and consumer-defined

Prefer:

  • defining interfaces at the point of use
  • small method sets

Avoid:

  • “god interfaces” shared across packages

Package structure

Common structure:

  • cmd/<app>/main.go
  • internal/... for private app packages
  • pkg/... only for truly reusable libs (optional)

Concurrency: start simple

Prefer:

  • a goroutine per independent unit of work
  • errgroup (or equivalent) for fan-out with cancellation
  • bounded concurrency via semaphores

Avoid:

  • unbounded goroutine creation
  • shared mutable state without clear ownership

Testing

Patterns:

  • table-driven tests
  • keep test data small and explicit
  • compare errors and output deterministically

Atlarix tool notes

  • Explore: locate entry points under cmd/ and critical packages under internal/ with grep/glob.
  • Build: make small edits and run go test ./....
  • Debug: reproduce with go test -run <name> -count=1 or run the binary with flags.
  • Review: check context cancellation, error wrapping, and package boundaries.

Common mistakes to avoid

  • Ignoring context cancellation in IO calls
  • Returning sentinel errors without context
  • Over-using interfaces (interface for everything)
  • Global variables holding state across requests

Mini-checklist

  • Errors wrapped with context
  • Context is propagated
  • Concurrency is bounded
  • Tests are table-driven where appropriate
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. 9d ago First seen · 79 lines · 2 tokens per session scan A 2294b5751c50

Subscribe to this mod's changes

Go Patterns is a skill published in the GitHub repository AmariahAK/atlarix-skills (2 stars, last pushed 5d ago), licensed Apache-2.0. It adds 2 tokens to every session and 504 once invoked, about $0.0000 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-09-03.

Related

Other skills, from other repositories

go-expert

Expert-level Go development with Go 1.22+ features, concurrency, standard library, and production-grade best practices. Use when the user mentions concurrency, microservices, or backend, or when the task involves idiomatic Go, goroutines and channels, context-based cancellation, or writing an HTTP server.

personamanagmentlayer/pcl · 65 tokens

functions-development

Build serverless Go or Python functions for Falcon Foundry apps. TRIGGER when user asks to "create a function", "write a serverless function", "build backend logic", runs foundry functions create, or needs help with FDK handler patterns, function testing, or collection integration from functions. Also TRIGGER when…

CrowdStrike/foundry-skills · 195 tokens

golang

Use when building Go backend services, implementing goroutines/channels, handling errors idiomatically, writing tests with testify, or following Go best practices for APIs/CLI tools.

MadAppGang/claude-code · 38 tokens

go-services

Build Go HTTP services with contextual cancellation, middleware, tests, and compact deployable binaries.

alivirgo/Major-AI-Skills · 21 tokens

go-docs

Go 1.26 — language specification, standard library, concurrency, modules, tools, testing, crypto, networking, database access, and idiomatic patterns.

pledgeandgrow/pledge-skills · 36 tokens

golang-testing

Production-ready Golang tests — table-driven tests, testify suites and mocks, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, code coverage, integration tests, idiomatic test naming. Use when writing or reviewing Go tests, choosing a testing approach, setting up Go test CI…

alexastrum/skl · 115 tokens