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/golid-ai/golid/codebase-standardsgit clone --depth 1 https://github.com/golid-ai/golidWhat 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.02001 | $0.02001 |
| Opus 5 | $0.01001 | $0.01001 |
| Sonnet 5 | $0.00400 | $0.00400 |
| Haiku 4.5 | $0.00200 | $0.00200 |
Grade A, and why
codebase-standards 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.
How it starts
The opening of the file, as written. The whole thing — 117 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Codebase Standards
Thesis: Universal guardrails that apply regardless of which file you're editing — the principles that every other rule assumes you follow.
Core Guardrails
One-line reminders of the highest-consequence rules. Domain-specific rules (go-service, solidjs-pages, etc.) have full explanations and examples.
- Module spec mapping — before modifying a module, read its spec at
docs/modules/{module}/spec.md. Folders:auth,users,feature. Multi-file auth:auth_password,auth_verify→authspec. - Parameterized queries only — never
fmt.Sprintfwith values into SQL. Use$Nplaceholders for values; write literal SQL per call site for identifiers. apperrorfor all errors — neverecho.NewHTTPError. Useapperror.BadRequest,.Forbidden,.NotFound,.Validation,.Internal.batch()signal updates after everyawait— put user-visible state likesetLoading(false)inside bothtryandcatch, wrapped inbatch().finallyis only okay for independent re-entry locks that do not need to batch with success/error UI.Switch/Matchfor content states — never nested<Show>for loading/error/empty/data states.onMount+ signals for data fetching — nevercreateResource. Usealiveguard andloadRequestIDfor param refetches. Seesolidjs-data-fetching.- Never early-return route components before reactive setup — move auth/access guards into JSX with
<Show when={...} fallback={...}>. - Never discard errors — no
_ = fn(). Log withlogger.Errorat minimum. - Resource membership, not just role — verify the specific user belongs to the specific resource, not just
userType. - Config over hardcoded values — if you'd change it per environment, it belongs in
Configor named constants. - Request body size limit —
middleware.BodyLimit("1M")is configured instack.go. - SSE uses one-time ticket auth (not JWT in URL) — see
handler/sse.goandservice/sse/sse.go. - Command lookup before shell work — before running nontrivial local, test, deploy, GCP, Git, or contract-validation commands, read
common-commands/docs/cli-reference.md, use known-good repo commands, and diagnose the first concrete failure instead of probing equivalent tools.
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 · 117 lines · 2,001 tokens per session scan A 2092844776a5
codebase-standards is a cursor rule published in the GitHub repository golid-ai/golid (40 stars, last pushed 2mo ago), licensed MIT. It adds 2,001 tokens to every session, about $0.0100 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.
Other cursor rules, from other repositories
adapter-features
Database-specific features must be implemented in the specialized adapter only. Base adapters (postgres, mysql, etc.) must remain database-agnostic.
unit-tests-tdd
TDD required for behavior changes; ≥80% package coverage on touched packages; unit-test conventions.
backend
You are an expert in Go, Gin, Gorm, Gen, Cosy (https://cosy.uozi.org/) with a deep understanding of best practices and performance optimization techniques in these technologies.
version-management
Automatically commit and push changes after completing any feature, bug fix, or significant addition.
architecture
Feature-first architecture boundaries for enjoyplayer.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.