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 skills add tmj-90/gaffer --skill go-conventionsgit clone --depth 1 https://github.com/tmj-90/gafferWrote 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/tmj-90/gaffer/go-conventions)<a href="https://agentmods.dev/skills/tmj-90/gaffer/go-conventions"><img src="https://agentmods.dev/badge/skills/tmj-90/gaffer/go-conventions.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.00084 | $0.01141 |
| Opus 5 | $0.00042 | $0.00571 |
| Sonnet 5 | $0.00017 | $0.00228 |
| Haiku 4.5 | $0.00008 | $0.00114 |
Grade A, and why
go-conventions 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 7d 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 — 75 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Write idiomatic Go
Add Go that reads as idiomatic, handles every error explicitly, and matches the repo's existing patterns — simple and correct, the Go way.
Steps
- Read the lore first. Call
search_lore(Memory MCP) for the repo's Go conventions and respectgo.mod(module path, Go version), the linter config (golangci-lint), and any architecture ADRs. Keep packages cohesive and named for what they provide. - Find a sibling package and copy its patterns — package layout, error handling, how interfaces are defined and consumed, and how tests are organised.
- Handle every error explicitly. Never discard an
errorwith_unless it is genuinely ignorable and commented why. Wrap with context usingfmt.Errorf("doing X: %w", err)so the chain is inspectable witherrors.Is/errors.As. Return early on error; avoid deep nesting. - Keep interfaces small and define them at the consumer, not the producer. Accept interfaces, return concrete types. Don't add an interface speculatively.
- Pointer-receiver rules: be consistent within a type. Use a pointer receiver when the method mutates the receiver, the struct is large, or any method needs a pointer receiver (so the method set stays consistent); use value receivers for small immutable value types.
- Concurrency with care. Pass
context.Contextas the first argument to anything that blocks or spans a request; never store aContextin a struct. Guard shared state; prefer channels/syncprimitives over data races. Always have a defined goroutine exit. - Idioms:
deferfor cleanup, zero-value-useful structs, no naked returns in long functions, no stuttering names (http.HTTPServer→http.Server). Rungofmt/goimports. - Test table-driven. Use sub-tests (
t.Run) over a[]structof cases; cover error paths; run with-race. Uset.Helper()in assertion helpers. - Verify + evidence. Run
go vet,go build, andgo test -race ./..., recordtest_outputvia therecord-evidenceskill, and submit for review.
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.
- 7d ago First seen · 75 lines · 84 tokens per session scan A c7d40143c69c
go-conventions is a skill published in the GitHub repository tmj-90/gaffer (2 stars, last pushed 6d ago), licensed Apache-2.0. It adds 84 tokens to every session and 1,141 once invoked, about $0.0004 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
sota-golang
State-of-the-art Go engineering rules (2026 baseline, Go 1.25+) that Claude applies when writing new Go code or auditing existing Go code. Covers error handling, interface/package design, goroutine and channel correctness, net/http hardening, security (SQL, exec, path traversal, CSPRNG, TLS, supply chain), performance…
concurrency-patterns-go
Apply safe, idiomatic Go concurrency patterns with goroutines and channels. Use when the user works with goroutines, channels, sync primitives, context cancellation, worker pools, fan-in/fan-out, select statements, or asks about concurrent Go programming and avoiding race conditions.
error-handling-go
Implement robust Go error handling with wrapping, sentinel errors, and custom types. Use when the user handles errors in Go, creates custom error types, wraps errors with fmt.Errorf and %w, uses errors.Is/As, or asks about Go error best practices and error propagation strategies.
idiomatic-go
Write clean, idiomatic Go following community conventions and effective patterns. Use when the user writes Go code, designs packages, defines interfaces, uses struct embedding, writes receiver methods, organizes Go projects, or asks about Go best practices and conventions.
golang-expert
Go programming expert for goroutines, channels, interfaces, modules, and concurrency patterns.
ax-go-gen
Use when writing Go code with github.com/ax-llm/ax/packages/go for AxGen programs, forward calls, indexed multi-sampling, result pickers, streaming, tools, assertions, traces, usage, and output parsing.