Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/parvez3019/go-swagger3npx agentmods add rules/parvez3019/go-swagger3/cursor_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/parvez3019/go-swagger3/cursor_rules)<a href="https://agentmods.dev/rules/parvez3019/go-swagger3/cursor_rules"><img src="https://agentmods.dev/badge/rules/parvez3019/go-swagger3/cursor_rules/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/parvez3019/go-swagger3/cursor_rules"><img src="https://agentmods.dev/badge/rules/parvez3019/go-swagger3/cursor_rules.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.00000 | $0.03386 |
| Opus 5.5 | $0.00000 | $0.01354 |
| Sonnet 5.5 | $0.00000 | $0.00677 |
| Haiku 4.5 | $0.00000 | $0.00339 |
Grade A, and why
cursor_rules 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 3mo 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 — 345 lines — stays where its author put it; the contents beside it link to each section on GitHub.
go-swagger3 — document existing Go APIs
Copy this file into your project as .cursor/rules/go-swagger3.mdc.
When the user asks to document an API, add Swagger/OpenAPI comments, or generate an OAS file: annotate existing Go code with go-swagger3 godoc @ tags and struct tags, then run the CLI. Prefer editing comments and tags over rewriting handlers.
Install
go install github.com/parvez3019/go-swagger3@latest
export PATH="$HOME/go/bin:$PATH"
# Docker alternative
docker run -t --rm -v $(pwd):/app -w /app parvez3019/go-swagger3:latest \
--module-path . --main-file-path ./cmd/api/main.go --output oas.json --schema-without-pkg
Workflow
- Confirm
go.modexists (Go modules only). - Put service annotations on the main/entry file (
@Titleand@Versionrequired). - Annotate each HTTP handler’s godoc (comments must sit directly above the func).
- Add
json+ OAS tags on request/response structs; add@Enum/@HeaderParameterstypes when needed. - Generate (pick the matching layout):
# main next to go.mod go-swagger3 --module-path . --output oas.json --schema-without-pkg # main elsewhere go-swagger3 --module-path . --main-file-path ./cmd/api/main.go --output oas.json --schema-without-pkg # only scan handlers under a path go-swagger3 --module-path . --main-file-path ./cmd/api/main.go --handler-path ./internal/handlers --output oas.json --schema-without-pkg # YAML go-swagger3 --module-path . --main-file-path ./cmd/api/main.go --output oas.json --schema-without-pkg --generate-yaml - Open the output, fix gaps, re-run with
--debugif needed. Use--strictwhen hardening.
CLI flags
| Flag | Purpose |
|---|---|
--module-path |
Module root to scan |
--main-file-path |
File with service-level annotations |
--handler-path |
Optional: only scan handlers under this path |
--output |
Output path (default oas.json) |
--schema-without-pkg |
Schema names without package prefix |
--generate-yaml |
Emit YAML (.json output becomes .yml) |
--exclude |
Comma-separated dirs to skip |
--quiet |
Reduce log noise |
--debug |
Debug logging |
--strict |
Treat parse warnings as 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.
- 3mo ago First seen · 345 lines · 0 tokens per session scan A 70de9abc843c
cursor_rules is a cursor rule published in the GitHub repository parvez3019/go-swagger3 (154 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,386 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.
cursor_rules compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| cursor_rulesparvez3019/go-swagger3 | Cursor rule | 154 | 2d ago | MIT | A | 0 | Cursor |
| backend0xJacky/nginx-ui | Cursor rule | 12k | today | AGPL-3.0 | A | 441 | Cursor |
| kotlin-springboot-rulesholtwood/awesome-cursorrules-zh | Cursor rule | 244 | 1mo ago | MIT | A | 0 | Cursor |
| fastapi-file-structureholtwood/awesome-cursorrules-zh | Cursor rule | 244 | 1mo ago | MIT | A | 4 | Cursor |
| fastapi-dependency-injectionholtwood/awesome-cursorrules-zh | Cursor rule | 244 | 1mo ago | MIT | A | 7 | Cursor |
| graphql-apollo-client-usageholtwood/awesome-cursorrules-zh | Cursor rule | 244 | 1mo ago | MIT | A | 0 | Cursor |
| springboot-jpa-best-practicesholtwood/awesome-cursorrules-zh | Cursor rule | 244 | 1mo ago | MIT | A | 0 | Cursor |