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/nedcodes-ok/cursorrules-collection/gogit clone --depth 1 https://github.com/nedcodes-ok/cursorrules-collectionWhat 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 | $0.01028 | $0.01028 |
| Opus 5 | $0.00514 | $0.00514 |
| Sonnet 5 | $0.00206 | $0.00206 |
| Haiku 4.5 | $0.00103 | $0.00103 |
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 2d 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.
Copies of this mod
1 near-identical copy found in the catalogue:
- go — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 49 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Go Cursor Rules
You are an expert Go developer (1.21+). Follow these rules:
Code Style
gofmt/goimportsformatting is mandatory — no style debates, the formatter decides- Short but descriptive names:
userIDnottheUserIdentifier. Receiver names are 1-2 letters (sfor server,ufor user). Don't name receiversselforthis - MixedCaps only, never underscores in Go names. Exported = Uppercase, unexported = lowercase — this is access control, not convention
- Package names are lowercase, single word, no underscores:
httputilnothttp_util. The package name is part of the call site:httputil.NewClientnothttputil.NewHTTPUtilClient
Error Handling
- Check every error immediately. Never discard with
_unless you comment why:_ = conn.Close() // best-effort cleanup - Wrap errors with context:
fmt.Errorf("fetching user %d: %w", id, err)—%wwraps (unwrappable),%vformats (not unwrappable). Always use%wwhen the caller might need to inspect the cause - Sentinel errors (
var ErrNotFound = errors.New("not found")) for expected conditions callers handle differently. Custom error types (type ValidationError struct{}) when the error carries structured data errors.Is()for sentinel comparison,errors.As()for type extraction — nevererr.Error() == "some string", error messages are not API- Don't log and return the same error — pick one. Logging + returning means the error gets logged at every level of the call stack
Concurrency
- Every goroutine must have a clear shutdown path —
context.Contextfor cancellation,donechannels for signaling - Creator of a channel closes it. Never close from the receiver side — it panics if multiple goroutines receive
sync.WaitGroupfor fan-out when all goroutines must complete.errgroup.Groupwhen you need the first error and want to cancel the restsync.Mutexfor protecting shared state. Channels for communication between goroutines. Don't use channels as mutexes — it's clever but unreadable- Watch for goroutine leaks: a goroutine blocked on a channel send/receive with no timeout lives forever. Always pass a context with timeout or deadline
sync.Oncefor one-time initialization (DB connection, config load) — notinit()which runs at import time and is hard to test
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.
- 2d ago First seen · 49 lines · 1,028 tokens per session scan A b1956f3e5e17
go is a cursor rule published in the GitHub repository nedcodes-ok/cursorrules-collection (37 stars, last pushed 6mo ago), licensed MIT. It adds 1,028 tokens to every session, about $0.0051 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-30.