go

go is a cursor rule for Cursor from ItamarZand88/awesome-agent-conventions. It costs 321 tokens per session, scanned A, a copy of go, MIT.

A set of coding rules for Go, a programming language commonly used for services and command-line tools.

In plain words
What is it for?
Use it when editing Go files so the agent follows idiomatic conventions such as explicit errors, context-aware blocking functions, and table-driven tests.
Why use it?
It gives an agent consistent guidance for error handling, naming, interfaces, concurrency, testing, and avoiding unsafe or unclear patterns.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it when editing Go files so the agent follows idiomatic conventions such as explicit errors, context-aware blocking functions, and table-driven tests.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/itamarzand88/awesome-agent-conventions/go
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.

Clone the repo
git clone --depth 1 https://github.com/ItamarZand88/awesome-agent-conventions

Made for: Cursor.

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 go

README.md
[![agentmods](https://agentmods.dev/badge/rules/itamarzand88/awesome-agent-conventions/go/github.svg)](https://agentmods.dev/rules/itamarzand88/awesome-agent-conventions/go)
Your own site
<a href="https://agentmods.dev/rules/itamarzand88/awesome-agent-conventions/go"><img src="https://agentmods.dev/badge/rules/itamarzand88/awesome-agent-conventions/go/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 go

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 321 This file is loaded in full into every session.
When invoked 321 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 95% copy Near-identical to another mod 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.00321 $0.00321
Opus 5.5 $0.00128 $0.00128
Sonnet 5.5 $0.00064 $0.00064
Haiku 4.5 $0.00032 $0.00032

Measured 2mo ago against content hash 70c8f5ece2cf, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 2mo 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

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.

conventions/agent-rules/examples/awesome-cursorrules-go/go.mdc · 44 lines

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
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. 2mo ago First seen · 44 lines · 321 tokens per session scan A 70c8f5ece2cf

Subscribe to this mod's changes

go is a cursor rule published in the GitHub repository ItamarZand88/awesome-agent-conventions (36 stars, last pushed 3mo ago), licensed MIT. It adds 321 tokens to every session, about $0.0013 per session on Opus 5.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.

Related

go compared with cursor rules from other repositories

go next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
goItamarZand88/awesome-agent-conventionsCursor rule363mo agoMITA321Cursor
go-backend-scalability-cursorrules-prompt-filePatrickJS/awesome-cursorrulesCursor rule41k5mo agoCC0-1.0A1,200Cursor
go-servemux-rest-api-cursorrules-prompt-filePatrickJS/awesome-cursorrulesCursor rule41k5mo agoCC0-1.0A389Cursor
goPatrickJS/awesome-cursorrulesCursor rule41k5mo agoCC0-1.0A290Cursor
go-temporal-dsl-prompt-filePatrickJS/awesome-cursorrulesCursor rule41k5mo agoCC0-1.0A25Cursor
hatch3r-go-patternshatch3r/hatch3rCursor rule261mo agoMITA0Cursor
go-developmentmadebyaris/rakitui-aiCursor rule59mo agoMITA0Cursor