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/vahiiiid/go-rest-api-boilerplateWrote 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/vahiiiid/go-rest-api-boilerplate/grab)<a href="https://agentmods.dev/rules/vahiiiid/go-rest-api-boilerplate/grab"><img src="https://agentmods.dev/badge/rules/vahiiiid/go-rest-api-boilerplate/grab.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.1 | $0.01787 | $0.01787 |
| Opus 5 | $0.00894 | $0.00894 |
| Sonnet 5 | $0.00357 | $0.00357 |
| Haiku 4.5 | $0.00179 | $0.00179 |
Grade A, and why
grab scanned grade A with 1 finding 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 7d 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
| Health check | `curl localhost:8080/health` | How it starts
The opening of the file, as written. The whole thing — 281 lines — stays where its author put it; the contents beside it link to each section on GitHub.
GRAB Development Rules for Cursor
Version: v2.0.0 Last Updated: 2025-12-10 Purpose: Developer guidelines for building APIs with GRAB (Go REST API Boilerplate)
Core Principles
1. Clean Architecture
Every domain follows: Handler → Service → Repository
- No business logic in handlers
- No HTTP concerns in services
- Repository only talks to database
2. Docker-First Development
Developers run make on host, Makefile detects Docker and executes commands automatically:
make up # Start containers
make test # Run tests (in container if available)
make lint # Run linting (in container if available)
make lint-fix # Auto-fix linting issues
make swag # Generate Swagger docs
3. Migration Naming Pattern
Format: YYYYMMDDHHMMSS_verb_noun_table
Examples:
20251025225126_create_users_table20251028000000_create_refresh_tokens_table20251210120000_add_avatar_to_users_table
Commands:
make migrate-create NAME=create_todos_table
make migrate-up
make migrate-down
make migrate-status
4. Version Checking
Never hardcode versions. Show how to check:
go version # Check Go version
docker --version # Check Docker
make exec-db # Enter DB container
psql --version # Check PostgreSQL
Domain Structure
internal/<domain>/
├── model.go # GORM models
├── dto.go # API contracts (request/response)
├── repository.go # Database layer
├── service.go # Business logic
├── handler.go # HTTP handlers (Gin)
└── *_test.go # Tests
Example: See internal/user/ for complete reference implementation.
Adding New Entities
- Create directory:
mkdir -p internal/<domain> - Define model with GORM tags
- Create DTOs for request/response validation
- Implement repository interface and methods
- Implement service with business logic
- Create handler with Swagger annotations
- Generate migration:
make migrate-create NAME=create_<table>_table - Register routes in
internal/server/router.go - Write tests for all layers
- Run:
make migrate-up && make test && make lint && make swag
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.
- 7d ago First seen · 281 lines · 1,787 tokens per session scan A 1c40ea89601e
grab is a cursor rule published in the GitHub repository vahiiiid/go-rest-api-boilerplate (65 stars, last pushed 20d ago), licensed MIT. It adds 1,787 tokens to every session, about $0.0089 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). 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
go-api-handlers
Use authorization functions for apps.
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.
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.
shared-libraries
Shared libraries - condition framework, inventory containers, file-backed DB, itinerary, references.
go-grpc-service-rule
A set of Chinese-language rules for implementing gRPC services in Go. gRPC is a way for software services to communicate using defined messages and procedures.