go-project-structure

go-project-structure is a cursor rule for Cursor from dstotijn/mcp-cbs-cijfers-open-data. It costs 0 tokens per session (702 once invoked), scanned A, a copy of go-project-structure, Apache-2.0.

A set of rules for arranging Go projects, a programming language, into familiar folders such as application entry points, private code, shared libraries, and API definitions.

In plain words
What is it for?
Use it when organizing or reviewing a Go codebase, especially when deciding where to place applications, reusable packages, internal code, configuration, scripts, and tests.
Why use it?
It gives developers a consistent way to find code as a project grows. This reduces confusion about where new files and packages belong.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/. Also seen: mentions Cursor.

Good fit Use it when organizing or reviewing a Go codebase, especially when deciding where to place applications, reusable packages, internal code, configuration, scripts, and tests.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/dstotijn/mcp-cbs-cijfers-open-data/go-project-structure
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/dstotijn/mcp-cbs-cijfers-open-data

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-project-structure

README.md
[![agentmods](https://agentmods.dev/badge/rules/dstotijn/mcp-cbs-cijfers-open-data/go-project-structure/github.svg)](https://agentmods.dev/rules/dstotijn/mcp-cbs-cijfers-open-data/go-project-structure)
Your own site
<a href="https://agentmods.dev/rules/dstotijn/mcp-cbs-cijfers-open-data/go-project-structure"><img src="https://agentmods.dev/badge/rules/dstotijn/mcp-cbs-cijfers-open-data/go-project-structure/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-project-structure

Your own site · 80×15
<a href="https://agentmods.dev/rules/dstotijn/mcp-cbs-cijfers-open-data/go-project-structure"><img src="https://agentmods.dev/badge/rules/dstotijn/mcp-cbs-cijfers-open-data/go-project-structure.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 702 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 86% copy Near-identical to another mod 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.00702
Opus 5 $0.00000 $0.00351
Sonnet 5 $0.00000 $0.00140
Haiku 4.5 $0.00000 $0.00070

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

Security

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 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.

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.

Origin

This is a copy

86% identical to go-project-structure — 16 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.cursor/rules/go-project-structure.mdc · 101 lines

How it starts

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

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:

Directory Structure

  1. Use the standard Go project layout:

    • /cmd - Main applications for this project
    • /internal - Private application and library code
    • /pkg - Library code that's ok to use by external applications
    • /api - API definitions, protocol buffers, OpenAPI/Swagger specs
    • /web - Web application specific components
    • /configs - Configuration file templates or default configs
    • /scripts - Scripts to perform various build, install, analysis, etc. operations
    • /test - Additional external test apps and test data
  2. Place main application entry points in /cmd/<appname> directories

  3. Keep internal code that shouldn't be imported by other projects in /internal

  4. Place shared libraries that can be imported by other projects in /pkg

Package Organization

  1. Organize packages by functionality, not by type
  2. Keep package names short, clear, and descriptive
  3. Avoid package name collisions with standard library
  4. Use singular form for package names (e.g., store, not stores)
  5. Avoid deeply nested package hierarchies

Dependency Management

  1. Use Go modules for dependency management
  2. Pin dependencies to specific versions in go.mod
  3. Regularly update and audit dependencies
  4. Minimize the number of external dependencies
  5. Prefer standard library solutions when available

Configuration

  1. Use environment variables for configuration
  2. Support configuration files as an alternative
  3. Provide sensible defaults for all configuration options
  4. Validate configuration at startup

Testing

  1. Place tests in the same package as the code they test
  2. Use _test.go suffix for test files
  3. Place integration tests in a separate integration package
  4. Store test fixtures in testdata directories

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

Read the full file on GitHub · 101 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 · 101 lines · 702 tokens per session scan A ce7ac4d2fca9

Subscribe to this mod's changes

go-project-structure is a cursor rule published in the GitHub repository dstotijn/mcp-cbs-cijfers-open-data (8 stars, last pushed 1y ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 702 tokens. A static security scan graded it A with 0 findings. It is 86% identical to go-project-structure, differing in 16 lines, and is treated as a copy.