golang

golang is a skill for Claude Code, Codex from MadAppGang/claude-code. It costs 38 tokens per session (8,182 once invoked), scanned A, original, MIT.

A practical guide to building Go software, including backend services, command-line tools, error handling, concurrency, and tests. Go is a programming language designed for simple code and safe parallel work.

In plain words
What is it for?
Use it when building Go APIs or command-line tools, working with goroutines and channels, handling errors, writing tests with testify, or applying Go conventions.
Why use it?
It helps avoid common Go mistakes and keeps code readable, predictable, and easier to maintain.

Skill for Claude CodeCodex

Part of the dev plugin — 47 skills, 12 commands, 14 agents shipped together

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.

agentmods
npx agentmods add skills/madappgang/claude-code/golang
Any agent
npx skills add MadAppGang/claude-code --skill golang
Clone the repo
git clone --depth 1 https://github.com/MadAppGang/claude-code

Made for: Claude Code, Codex.

Or install dev, the plugin that ships this one along with the rest of its 47 skills, 12 commands, 14 agents.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/madappgang/claude-code/golang.svg)](https://agentmods.dev/skills/madappgang/claude-code/golang)
Your own site
<a href="https://agentmods.dev/skills/madappgang/claude-code/golang"><img src="https://agentmods.dev/badge/skills/madappgang/claude-code/golang.svg" alt="Measured on agentmods" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 8,182 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00038 $0.08182
Opus 5 $0.00019 $0.04091
Sonnet 5 $0.00008 $0.01636
Haiku 4.5 $0.00004 $0.00818

Measured 2d ago against content hash bd222fd0d39a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

golang 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 2d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • golang — 92% identical, 19 lines differ
plugins/dev/skills/backend/golang/SKILL.md · 1,523 lines

How it starts

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

Go Development Best Practices

Version: 2.0.0 Purpose: Comprehensive Go development patterns covering idioms, error handling, concurrency, testing, and quality Scope: Backend development with Go - API services, CLI tools, system software Prerequisites: Basic Go syntax knowledge

Overview

Go (Golang) is designed for simplicity, explicit error handling, and safe concurrent programming. This skill covers production-ready patterns validated by the Go community, official documentation, and industry standards (Uber Engineering, Google).

Core Philosophy:

  • Simplicity: "Clear is better than clever" - favor readable code over abstractions
  • Explicit over implicit: No exceptions, no hidden control flow, visible errors
  • Composition over inheritance: Interfaces and embedding, not class hierarchies
  • Built-in concurrency: Goroutines and channels as first-class primitives
  • Tooling-first: Format, vet, test, and benchmark built into the language

Key Design Principles:

  1. Small interfaces (1-3 methods ideal)
  2. Consumer-side interface placement
  3. Error values, not exceptions
  4. Happy path at left margin
  5. Goroutines must have explicit termination

1. Idiomatic Go Patterns

1.1 Naming Conventions

Package Names:

// ✅ GOOD: Package names are single lowercase identifiers
// Import path: "net/url" → package name: url
// Import path: "encoding/json" → package name: json
package url      // from "net/url"
package json     // from "encoding/json"
package strings

// ❌ BAD
package urls            // No plural
package encodingjson    // Don't smash words together
package stringutils     // Too verbose

Getters and Setters:

type Account struct {
    balance int
}

// ✅ GOOD: No "Get" prefix
func (a *Account) Balance() int {
    return a.balance
}

func (a *Account) SetBalance(amount int) {
    a.balance = amount
}

// ❌ BAD: Java-style getters
func (a *Account) GetBalance() int {
    return a.balance
}

Read the full file on GitHub · 1,523 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. 2d ago First seen · 1,523 lines · 38 tokens per session scan A bd222fd0d39a

Subscribe to this mod's changes

golang is a skill published in the GitHub repository MadAppGang/claude-code (279 stars, last pushed 5mo ago), licensed MIT. It adds 38 tokens to every session and 8,182 once invoked, about $0.0002 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.