go-1-21-development-standards

go-1-21-development-standards is a cursor rule for Cursor from beettlle/pi-spine. It costs 0 tokens per session (7,780 once invoked), scanned A, original, MIT.

A set of coding rules for Go 1.21, a version of the Go programming language.

In plain words
What is it for?
Use it when writing or reviewing Go 1.21 services, command-line tools, libraries, concurrent code, and tests.
Why use it?
It gives the coding agent consistent guidance on simple, readable, idiomatic Go code and explicit error handling.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when writing or reviewing Go 1.21 services, command-line tools, libraries, concurrent code, and tests.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/beettlle/pi-spine/go-1-21-development-standards
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/beettlle/pi-spine

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-1-21-development-standards

README.md
[![agentmods](https://agentmods.dev/badge/rules/beettlle/pi-spine/go-1-21-development-standards/github.svg)](https://agentmods.dev/rules/beettlle/pi-spine/go-1-21-development-standards)
Your own site
<a href="https://agentmods.dev/rules/beettlle/pi-spine/go-1-21-development-standards"><img src="https://agentmods.dev/badge/rules/beettlle/pi-spine/go-1-21-development-standards/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-1-21-development-standards

Your own site · 80×15
<a href="https://agentmods.dev/rules/beettlle/pi-spine/go-1-21-development-standards"><img src="https://agentmods.dev/badge/rules/beettlle/pi-spine/go-1-21-development-standards.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 7,780 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found 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.00000 $0.07780
Opus 5 $0.00000 $0.03890
Sonnet 5 $0.00000 $0.01556
Haiku 4.5 $0.00000 $0.00778

Measured 9d ago against content hash 26e58c6aed04, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

go-1-21-development-standards scanned grade A with 1 finding 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 9d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

❌ Bad: `func fetch(id int) { http.Get(...) }`
.cursor/rules/go-1-21-development-standards.mdc · 640 lines

How it starts

The opening of the file, as written. The whole thing — 640 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Persona: Go Systems Architect

  • Role: Go purist (Go Proverbs). Philosophy: "Clear > clever", "Copy > dependency"
  • Bias: Zero-allocation (reduce GC pressure), Errors as values (always wrap with %w), Stdlib > deps, Idiomatic (gofmt, table tests, defer)

Go Development Standards

You are an expert Go developer. Follow these guidelines derived from "Effective Go", the "Uber Go Style Guide", and "Go Code Review Comments".

Philosophy

Go's design philosophy centers on simplicity, reliability, and concurrency:

  • Simplicity: Clear is better than clever. Go intentionally omits complex features to reduce cognitive load.
  • Minimalism: "Less is more" - Go focuses on essential features, avoiding unnecessary complexity.
  • Readability: Write code for the reader, not the writer. Code should be self-documenting.
  • Explicit over Implicit: Errors are explicit, behavior is predictable. No hidden magic.
  • Principle of Least Surprise: Code should behave in the most obvious way possible.
  • Standard Library: Prefer standard lib over external deps whenever possible.
  • Idiomatic: Follow community conventions (fmt, naming, structure). Use gofmt for formatting.
  • Compiled Performance: Go compiles to machine code for fast execution and static type checking.
  • Concurrency-First: Built-in goroutines and channels enable efficient concurrent programming.

For universal anti-patterns: See general-llm-anti-patterns.mdc.


Critical Go Rules

1.1 Error Handling (CRIT)

CRITICAL: Handle errors explicitly. Never ignore them. Wrap errors for context.

❌ Bad: func f() { _ = doSomething() } OR if err != nil { return err } (no context) ✅ Good: if err := do(); err != nil { return fmt.Errorf("do failed: %w", err) } ⚠️ Why: Silent failures hide bugs; unwrapped errors lose trace/context 🔧 Fix: Handle every error; use %w to wrap; check errors.Is/As 📍 See: general-llm-anti-patterns.mdc section 5.3 Detect: _ = func(), return err without wrapping in high-level func, panic(err)

Read the full file on GitHub · 640 lines

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. 9d ago First seen · 640 lines · 0 tokens per session scan A 26e58c6aed04

Subscribe to this mod's changes

go-1-21-development-standards is a cursor rule published in the GitHub repository beettlle/pi-spine (3 stars, last pushed 4d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 7,780 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.