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/parvez3019/go-swagger3/cursor_rulesgit clone --depth 1 https://github.com/parvez3019/go-swagger3What 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.03386 |
| Opus 5 | $0.00000 | $0.01693 |
| Sonnet 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 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.
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.
- 2d 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 (149 stars, last pushed 1mo 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.
Other cursor rules, from other repositories
readme-best-practices
README Best Practices - enforces high-quality README patterns when creating or editing README files.
css-styling
CSS architecture, tokens, and styling rules for this Docusaurus site. Apply when creating or modifying components, styles, layouts, or any UI-facing code.
state-management
Use the following stack. Do not introduce or recommend Redux or React Context for shared/global state.
write
Writing style guide with AI detection avoidance. For tweets, LinkedIn, blogs, READMEs, commits. Activate with @write.
performance
Remember: Premature optimization is the root of all evil. Profile first, optimize what matters, and keep solutions maintainable.
080-creative-phase-metrics
description: WHEN entering a creative phase ENSURE comprehensive exploration and validation globs: ["/.md", "/.mdc"] alwaysApply: true.