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/showcase-gig-platform/cursor-rules-initializer/go-guidelinesgit clone --depth 1 https://github.com/showcase-gig-platform/cursor-rules-initializerWhat 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.00991 | $0.00991 |
| Opus 5 | $0.00495 | $0.00495 |
| Sonnet 5 | $0.00198 | $0.00198 |
| Haiku 4.5 | $0.00099 | $0.00099 |
Grade A, and why
go-guidelines 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.
What it actually says
Go コーディングガイドライン
Go のコーディング規則
- フォーマット:
make lintを実行し、goimportsによるフォーマットとgo vetによる静的解析をパスすること。golangci-lintもCIで実行される。 - 命名規則:
- パッケージ名:
lowercaseまたはsnake_case(例:user,order_repository) - 型名 (struct, interface):
PascalCase - 変数名:
camelCase(スコープに応じて説明的な長さに) - 関数・メソッド名: 公開は
PascalCase, 非公開/メソッドはcamelCase。動詞で始める。 - 定数名:
PascalCase。関連する定数は接頭辞でグループ化 (例:OrderStatePending,OrderStateCompleted)。 - エラー変数: 公開は
ErrXxx(例:ErrOrderNotFound), 非公開はerrXxx。 - ファイル名:
snake_case.go(例:order_entity.go,user_service.go)
- パッケージ名:
- エラーハンドリング:
- エラーは適切にチェックし、無視しない。
- エラーをラップする場合は
fmt.Errorfと%wを使用し、コンテキストを追加する。 - Sentinel Error (
ErrXxx形式の公開エラー変数) またはカスタムエラー型を適切に使い分ける。 - ユースケース層でのエラーは
app/usecase/error.goで定義されたエラー型を使用することを検討する。
- インターフェース:
- 利用側で定義する (Consumer-defined interfaces)。
- 必要最小限のメソッドを持つように設計する (
if neededベース)。 - インターフェース名は能力を表すようにする (例:
OrderReader,PaymentProcessor)。
- Context:
- リクエストスコープの処理やキャンセル伝播のために
context.Contextを第一引数として渡す。 - Contextからの値の取得は
context.Valueを直接使うのではなく、型安全なヘルパー関数を用意する。
- リクエストスコープの処理やキャンセル伝播のために
- 依存性注入: DIコンテナやwireなどのツールを使用して依存関係を管理する。
- ゼロ値: 構造体のフィールドは可能な限りゼロ値が意味を持つように設計する。ポインタ型は
nilが有効な状態を表す場合にのみ使用する。 - 並行処理:
- Goroutineを使用する場合は、リソースリークやレースコンディションに注意する。
syncパッケージ (Mutex, WaitGroupなど) を適切に使用する。- Channelを使ったコミュニケーションを検討する。
- コメント:
- 公開される型、関数、定数、変数には godoc コメントを記述する。
- 複雑なロジックや、自明でないコードには説明コメントを追加する。
- TODOコメントには担当者やIssue番号を含めることが望ましい。
- テスト: test-rule.mdc の規則に従う。
エラーハンドリングとロギング
- エラーの種類に応じて適切なログレベルを使用する:
- Info: 通常の操作情報
- Warn: 警告(重大ではないが注意が必要)
- Error: 重大なエラー(サービスの一部機能に影響)
- Fatal: 致命的なエラー(サービス全体に影響)
- ユーザーに表示するエラーメッセージと内部ログは分離する。
- 外部サービス連携時のエラーは適切にラップし、必要に応じてリトライロジックを実装する。
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 · 991 tokens per session scan A 986075df7aa1
go-guidelines is a cursor rule published in the GitHub repository showcase-gig-platform/cursor-rules-initializer (7 stars, last pushed 9mo ago), licensed MIT. It adds 991 tokens to every session, about $0.0050 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-31.
Other cursor rules, from other repositories
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
cli-error-handling
CLI command error handling patterns.
prefer-direct-imports-over-module-mocks
Prefer extracting a testable core over vi.mock / vi.resetModules when unit tests need to reach production logic entangled with config, env, or singletons.
control-plane-descriptors
Control plane descriptor and instance implementation patterns.
family-instance-domain-actions
Family instance domain action implementation patterns.