golang

golang is a skill for Claude Code from xobotyi/cc-foundry. It costs 38 tokens per session (4,943 once invoked), scanned B, original, MIT.

Guidance for writing and reviewing Go programs, including error handling, concurrent work, tests, project layout, and Go's built-in tools.

In plain words
What is it for?
Use it when creating, reviewing, testing, or structuring Go code, especially when checking which language features and standard-library functions a project can use.
Why use it?
It helps keep Go code simple and compatible with the language version declared in a module's go.mod file. It also helps avoid unnecessary abstractions and dependencies.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter. Also seen: mentions subagents; mentions Claude Code.

Part of the golang plugin — 4 skills shipped together

Good fit Use it when creating, reviewing, testing, or structuring Go code, especially when checking which language features and standard-library functions a project can use.

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

Made for: Claude Code.

Or install golang, the plugin that ships this one along with the rest of its 4 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 golang

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/xobotyi/cc-foundry/golang"><img src="https://agentmods.dev/badge/skills/xobotyi/cc-foundry/golang.svg" alt="Reviewed on agentmods" width="80" 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 4,943 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00038 $0.04943
Opus 5.5 $0.00015 $0.01977
Sonnet 5.5 $0.00008 $0.00989
Haiku 4.5 $0.00004 $0.00494

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

Security

Grade B, and why

golang scanned grade B 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 25d 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.

Strips warnings and disclaimersmediumAnti-refusal

Omitting safety caveats hides risk from the user and is a common jailbreak preamble.

When **reviewing** Go, cite the violation and show the fix inline. Do not lecture.
plugins/golang/skills/golang/SKILL.md · 314 lines

How it starts

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

Simplicity is the highest Go virtue. Three biases decide most calls:

  • Resist abstraction until the cost of not abstracting is proven. An interface, a type parameter, or a layer added in anticipation of a second caller is a defect.
  • Reach for the standard library first. A dependency earns its place by doing what the standard library does not.
  • The go directive decides what may be written, not the installed toolchain.

Language Version

The go directive in go.mod sets the language version a module may use. Read it before writing code and never reach for a feature above it. The stdversion analyzer reports a standard-library symbol newer than the directive: Go 1.27 and later fail go test on it, earlier toolchains report it under go vet.

Floor version per feature. Anything older than 1.21 is available in every supported module.

  • 1.21 — min, max, clear builtins; slices, maps, cmp, log/slog; context.WithoutCancel; errors.ErrUnsupported; sync.OnceValue
  • 1.22 — per-iteration loop variables; for range int; math/rand/v2; method and wildcard patterns in net/http.ServeMux
  • 1.23 — range-over-func iterators; iter; iterator functions in slices and maps; unique; unbuffered timer channels
  • 1.24 — generic type aliases; os.Root; testing.B.Loop; t.Context; runtime.AddCleanup; omitzero struct tag; tool directives; iterator functions in strings
  • 1.25 — testing/synctest; sync.WaitGroup.Go; container-aware GOMAXPROCS
  • 1.26 — new(expr); self-referential type constraints; errors.AsType; go fix modernizers
  • 1.27 — generic methods; field-selector keys in struct literals; encoding/json/v2; uuid; strings.CutLast

Read [${CLAUDE_SKILL_DIR}/references/versions/go1.NN.md] — one file per version, go1.21.md through go1.27.md — when writing against a feature near the module's floor, and whenever raising the directive. Each carries what its version added, which behavior changes the go directive gates, and the traps it introduced.

Read the full file on GitHub · 314 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. 25d ago Changed aa2ef9eb5362
  2. 1mo ago Changed · +3 lines 81b6a922d276
  3. 1mo ago Changed 9c43a35e792d
  4. 3mo ago First seen · 311 lines · 38 tokens per session scan B 7d224b31eca2

Subscribe to this mod's changes

golang is a skill published in the GitHub repository xobotyi/cc-foundry (23 stars, last pushed 2d ago), licensed MIT. It adds 38 tokens to every session and 4,943 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it B with 1 finding (strips warnings and disclaimers). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

golang compared with skills from other repositories

golang next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
golangxobotyi/cc-foundrySkill232d agoMITB38Claude Code
swiftui-expertjohnkozaris/jko-claude-pluginsSkill1128d agoMITA133Claude Code
dotnet-backend-expertmathisk2095/jko-claude-pluginsSkill31mo agoMITA181Claude Code
esp32-expertmathisk2095/jko-claude-pluginsSkill31mo agoMITA193Claude Code
python-backend-expertmathisk2095/jko-claude-pluginsSkill31mo agoMITA183Claude Code
rust-expertmathisk2095/jko-claude-pluginsSkill31mo agoMITA148Claude Code
swiftui-expertmathisk2095/jko-claude-pluginsSkill31mo agoMITA162Claude Code