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.
git clone --depth 1 https://github.com/Lay4U/awesome-ai-rulesWrote 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/lay4u/awesome-ai-rules/cursorrules)<a href="https://agentmods.dev/rules/lay4u/awesome-ai-rules/cursorrules"><img src="https://agentmods.dev/badge/rules/lay4u/awesome-ai-rules/cursorrules/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.
<a href="https://agentmods.dev/rules/lay4u/awesome-ai-rules/cursorrules"><img src="https://agentmods.dev/badge/rules/lay4u/awesome-ai-rules/cursorrules.svg" alt="Reviewed on agentmods" width="80" 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.00466 | $0.00466 |
| Opus 5.5 | $0.00186 | $0.00186 |
| Sonnet 5.5 | $0.00093 | $0.00093 |
| Haiku 4.5 | $0.00047 | $0.00047 |
Grade A, and why
cursorrules 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 1mo 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 — 48 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Cursor Go Rules
IDE-First Defaults
- Always format on save with
gofmt(orgoimportswhen available). - Never accept code that is unformatted; formatting is non-negotiable.
- Organize imports automatically; avoid manual import micromanagement.
- Keep editor diagnostics on for
go vetandgolangci-lint.
Go Code Style
- Prefer small packages with focused responsibilities.
- Package names must be short, lowercase, and without underscores.
- Prefer composition over inheritance-style embedding chains.
- Avoid
init(); use explicit constructors and setup functions. - Keep exported APIs minimal and stable.
Error Handling
- Use explicit error returns; Go has no exceptions for normal control flow.
- Return early on errors and keep happy-path unindented.
- Wrap errors with
%wwhen adding context. - Compare with
errors.Is/errors.Asinstead of string matching. - Do not swallow errors; either handle, wrap, or return them.
Interfaces and API Design
- Prefer small interfaces (1-3 methods) near the consuming package.
- Accept interfaces in function parameters when behavior is needed.
- Return concrete structs from constructors for better discoverability.
- Avoid exporting interfaces prematurely.
Concurrency and Context
- Pass
context.Contextas the first parameter for request-scoped work. - Never store
context.Contextinside structs. - Use goroutines only with a clear lifecycle and cancellation path.
- Prefer channels for coordination, not as a replacement for all state.
- Close channels only from the sender side.
- Guard shared mutable state with
sync.Mutex/sync.RWMutex.
Testing in the Editor Loop
- Use table-driven tests for branch-heavy logic.
- Run
go test ./...before finalizing changes. - Use
testify/requirefor must-stop assertions andassertfor continued checks. - Keep tests deterministic; avoid sleeps when synchronization primitives are possible.
- Add race checks (
go test -race ./...) when touching concurrency.
Modules and Dependencies
- Use Go modules and keep
go.mod/go.sumin sync. - Prefer standard library packages before adding new dependencies.
- Add dependencies deliberately; remove unused ones promptly.
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.
- 1mo ago First seen · 48 lines · 466 tokens per session scan A 1e53d9a50f51
cursorrules is a cursor rule published in the GitHub repository Lay4U/awesome-ai-rules (5 stars, last pushed 7mo ago), licensed MIT. It adds 466 tokens to every session, about $0.0019 per session on Opus 5.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-31.
Other cursor rules, from other repositories
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.
pyspark-etl-best-practices-cursorrules-prompt-file
Cursor rules for PySpark ETL development with code style, joins, window functions, map operations, and Iceberg patterns.
kotlin-ktor-development-cursorrules-prompt-file
Cursor rules for Kotlin development with Ktor integration.