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.
npx agentmods add skills/typefox/agent-skills/idiomatic-gonpx skills add TypeFox/agent-skills --skill idiomatic-gogit clone --depth 1 https://github.com/TypeFox/agent-skillsWrote 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.
[](https://agentmods.dev/skills/typefox/agent-skills/idiomatic-go)<a href="https://agentmods.dev/skills/typefox/agent-skills/idiomatic-go"><img src="https://agentmods.dev/badge/skills/typefox/agent-skills/idiomatic-go.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00137 | $0.05139 |
| Opus 5 | $0.00068 | $0.02570 |
| Sonnet 5 | $0.00027 | $0.01028 |
| Haiku 4.5 | $0.00014 | $0.00514 |
Grade A, and why
idiomatic-go 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 6d 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.
How it starts
The opening of the file, as written. The whole thing — 260 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Idiomatic Go
The conventions here come from Effective Go and Go Code Review Comments — the documents that codify what Go reviewers reject pull requests over. The content is filtered to the rules that strong models still slip on, so basic syntax, gofmt usage, and well-known mechanics (LIFO defer, new vs make, channel basics) are not repeated here.
The guiding principle is clear is better than clever (Rob Pike's phrasing, elaborated in Dave Cheney's article of the same name). When choosing between a concise/clever construction and an explicit/plain one, pick the explicit one. Code is decoded, not skimmed, and it outlives the person who wrote it.
APIs that require Go 1.22 or later are called out inline below. Older stable symbols (errors.Is, fmt.Errorf with %w, slices.Clone, and similar) are not annotated.
Reference files
Load these as needed — don't read them upfront. This file has the rules and decision points; the references hold the long tail.
references/naming.md— the full initialism table with the awkward cases (OAuth,IPv4,gRPC,IDs,HTTPSProxy), worked naming examples, deeper package-naming guidance (whyutil/common/misccollect garbage and how to split them), import grouping, and file naming with build constraints. Read this when naming anything exported or organizing a new package.references/interfaces-and-errors.md— interface placement worked end-to-end, embedding, compile-time satisfaction checks; sentinel errors vs custom error types vsfmt.Errorf; theerrors.Is/As/Joinmodel and when not to wrap; structured errors;panic/recoverdiscipline. Read this when designing an API, writing a non-trivial error type, or wrapping errors across abstraction boundaries.references/concurrency-patterns.md— thecontext.Contextcontract end-to-end, the four ways a goroutine exits, thefor selectskeleton, channel-direction signatures, semaphore and leaky-buffer patterns,sync.Once/WaitGroup/errgroupdecisions, channel-closing rules, idempotent shutdown against concurrent registration (a coordinator's shutdown safe to call twice and race-free against concurrent subscriber registration), and the anti-patterns (sleeping in tests, polling, fire-and-forget goroutines). Read this when starting a goroutine, designing a cancellable operation, or reviewing concurrent code.references/language-engineering.md— patterns specific to Go tools for programming languages (parsers, language servers/LSP, type checkers, validators, DSLs) that go beyond baseline idiomatic Go: nil-safe AST navigation, callback-vs-iterator traversal, optional capability interfaces, non-nil empty sentinels, typed source coordinates and UTF-16 columns, editor-overlay text handles, lazy scope chains, typed/untyped references and once-only resolution with cycle detection, phased incremental builds and the write-to-read lock downgrade, keeping the domain free of the LSP protocol, and completion as a parser capability. Read this when working on a language implementation, a DSL, or a toolkit built on a Go language framework — not for ordinary application code.
What ships with it
16 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- evals/evals.json 23 KB
- evals/files/ast-navigation/ast.go 1.6 KB
- evals/files/ast-navigation/go.mod 62 B
- evals/files/concurrency-poller/go.mod 66 B
- evals/files/concurrency-poller/poller.go 2.4 KB
- evals/files/interfaces-errors/go.mod 65 B
- evals/files/interfaces-errors/orders/orders.go 717 B
- evals/files/interfaces-errors/userstore/userstore.go 1.2 KB
- evals/files/reference-resolution/go.mod 68 B
- evals/files/reference-resolution/types.go 2.0 KB
- evals/files/typescript-port/accounts.go 3.5 KB
- evals/files/typescript-port/go.mod 63 B
- references/concurrency-patterns.md 17 KB
- references/interfaces-and-errors.md 11 KB
- references/language-engineering.md 18 KB
- references/naming.md 9.0 KB
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.
- 6d ago First seen · 260 lines · 137 tokens per session scan A 6dffd42be3bc
idiomatic-go is a skill published in the GitHub repository TypeFox/agent-skills (5 stars, last pushed 3d ago), licensed MIT. It adds 137 tokens to every session and 5,139 once invoked, about $0.0007 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-31.
Other skills, from other repositories
golang-testing
Go testing best practices including table-driven tests, test helpers, benchmarking, race detection, coverage analysis, and integration testing patterns. Use when writing or improving Go tests.
golang-patterns
Go-specific design patterns and best practices including functional options, small interfaces, dependency injection, concurrency patterns, error handling, and package organization. Use when working with Go code to apply idiomatic Go patterns.
ast-grep
Guide for writing ast-grep rules to perform structural code search and analysis. Use when users need to search codebases using Abstract Syntax Tree (AST) patterns, find specific code structures, or perform complex code queries that go beyond simple text search. This skill should be used when users ask to search for…
gen-test
Generate idiomatic tests for Go packages and handlers in the Meshery project.
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…
golang-uber-fx
Golang application framework using uber-go/fx — fx.New, fx.Provide, fx.Invoke, fx.Module, fx.Lifecycle hooks, fx.Annotate (name/group/As), fx.Decorate, fx.Supply, fx.Replace, fx.WithLogger, and signal-aware Run(). Apply when using or adopting uber-go/fx, when the codebase imports go.uber.org/fx, or when wiring…