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/dstotijn/go-mcp/go-project-structuregit clone --depth 1 https://github.com/dstotijn/go-mcpWrote 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/dstotijn/go-mcp/go-project-structure)<a href="https://agentmods.dev/rules/dstotijn/go-mcp/go-project-structure"><img src="https://agentmods.dev/badge/rules/dstotijn/go-mcp/go-project-structure.svg" alt="Measured on agentmods" 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 | $0.00000 | $0.00520 |
| Opus 5 | $0.00000 | $0.00260 |
| Sonnet 5 | $0.00000 | $0.00104 |
| Haiku 4.5 | $0.00000 | $0.00052 |
Grade A, and why
go-project-structure 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 4d 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
2 near-identical copies found in the catalogue:
- go-project-structure — 100% identical, 0 lines differ
- go-project-structure — 86% identical, 16 lines differ
What it actually says
Description
This rule ensures that Go projects follow a consistent and idiomatic structure, making the codebase easier to navigate, maintain, and scale.
Rule
When organizing a Go project:
Package Organization
- Organize packages by functionality, not by type
- Keep package names short, clear, and descriptive
- Avoid package name collisions with standard library
- Use singular form for package names (e.g.,
store, notstores) - Avoid deeply nested package hierarchies
Dependency Management
- Use Go modules for dependency management
- Pin dependencies to specific versions in go.mod
- Regularly update and audit dependencies
- Minimize the number of external dependencies
- Prefer standard library solutions when available
Configuration
- Use environment variables for configuration
- Support configuration files as an alternative
- Provide sensible defaults for all configuration options
- Validate configuration at startup
Testing
- Place tests in the same package as the code they test
- Use
_test.gosuffix for test files - Place integration tests in a separate
integrationpackage - Store test fixtures in
testdatadirectories
Implementation
- The Cursor IDE will enforce this rule by:
- Suggesting appropriate locations for new files
- Highlighting structural issues
- Providing refactoring options to improve project organization
Benefits
- Consistent, navigable project structure
- Clear separation of concerns
- Better code reusability
- Easier onboarding for new team members
- Alignment with Go community standards
Examples
✅ Correct Project Structure:
myproject/
├── cmd/
│ └── myapp/
│ └── main.go
├── internal/
│ ├── auth/
│ │ └── auth.go
│ └── database/
│ └── database.go
├── pkg/
│ └── validator/
│ └── validator.go
├── api/
│ └── openapi.yaml
├── configs/
│ └── config.yaml
├── scripts/
│ └── setup.sh
└── go.mod
❌ Incorrect Project Structure:
myproject/
├── main.go
├── auth.go
├── database.go
├── validator.go
└── go.mod
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.
- 4d ago First seen · 85 lines · 520 tokens per session scan A 2c406ea6ff84
go-project-structure is a cursor rule published in the GitHub repository dstotijn/go-mcp (18 stars, last pushed 1y ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 520 tokens. 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
cursorrules
AGENTS.md.
miro-best-practices
MCP server for controlling Miro whiteboards with AI assistants.
go-handler
Patterns for Go handler layer files — HTTP request handling, validation, routing.
go-service
Patterns for Go service layer files — business logic, DB access, auth checks.
best-practices
Go Best Practices - enforces current best practices when working with Go code.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.