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 rules/itamarzand88/awesome-agent-conventions/gogit clone --depth 1 https://github.com/ItamarZand88/awesome-agent-conventionsWrote 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/rules/itamarzand88/awesome-agent-conventions/go)<a href="https://agentmods.dev/rules/itamarzand88/awesome-agent-conventions/go"><img src="https://agentmods.dev/badge/rules/itamarzand88/awesome-agent-conventions/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.00321 | $0.00321 |
| Opus 5 | $0.00161 | $0.00161 |
| Sonnet 5 | $0.00064 | $0.00064 |
| Haiku 4.5 | $0.00032 | $0.00032 |
Grade A, and why
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 5d 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.
This is a copy
95% identical to go — 1 line differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
What it actually says
description: "Idiomatic Go rules. Explicit error handling, interface-based design, context-first concurrency." globs: **/*.go alwaysApply: false
Go Language Rules
Expert Go developer. Simple, explicit, idiomatic.
Error Handling
- Always handle errors — never assign to _
- fmt.Errorf("context: %w", err) for wrapping
- errors.Is() / errors.As() for checking
- Custom error types for structured errors
Naming
- Short for short-lived vars: i, n, err, ok
- No stuttering: user.UserID → user.ID
- Acronyms: userID, httpClient (not userId, httpClient)
- Interfaces: end in -er (Reader, Writer, Handler)
Interfaces
- Accept interfaces, return concrete types
- Define at call site, not implementation site
- Single-method interfaces preferred
Concurrency
- context.Context first param for blocking functions
- defer cancel() after context creation
- WaitGroup for goroutine groups
- Channels for communication, Mutex for state
Testing
- Table-driven: for _, tc := range testCases { t.Run(tc.name, ...) }
- Interface-based mocking
Forbidden
- No _ to ignore errors
- No init() for business logic
- No global mutable state
- No interface{} where generics work
- No goroutines without termination condition
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.
- 5d ago First seen · 44 lines · 321 tokens per session scan A 70c8f5ece2cf
go is a cursor rule published in the GitHub repository ItamarZand88/awesome-agent-conventions (30 stars, last pushed 1mo ago), licensed MIT. It adds 321 tokens to every session, about $0.0016 per session on Opus 5. A static security scan graded it A with 0 findings. It is 95% identical to go, differing in 1 line, and is treated as a copy.
Other cursor rules, from other repositories
rules-test-requirements
globs: "internal/transformer//.go,internal/runner//.go,internal/writer//.go,internal/parser//.go" description: 改 transformer / runner / writer / parser 必带 test.go 防回归.
go-backend-scalability-cursorrules-prompt-file
Cursor rules for Go development with backend scalability.
go-servemux-rest-api-cursorrules-prompt-file
Cursor rules for Go development with ServeMux REST API integration.
go
Idiomatic Go rules. Explicit error handling, interface-based design, context-first concurrency.
go-temporal-dsl-prompt-file
Cursor rules for Go development with Temporal DSL integration.
hatch3r-go-patterns
Go 1.23+ conventions covering modules, error wrapping, context propagation, generics, testing with table-driven tests, and the standard library net/http + log/slog.