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/nedcodes-ok/cursor-doctor/documentationgit clone --depth 1 https://github.com/nedcodes-ok/cursor-doctorWhat 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.00814 | $0.00814 |
| Opus 5 | $0.00407 | $0.00407 |
| Sonnet 5 | $0.00163 | $0.00163 |
| Haiku 4.5 | $0.00081 | $0.00081 |
Grade A, and why
documentation 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 yesterday.
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 — 39 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Documentation Rules
Code Documentation
- Document public APIs: what it does, parameters, return type, thrown exceptions, and a usage example. If the function is non-trivial, the example is the most important part
- Document non-obvious behavior: "Returns cached result if called within 5 minutes" or "Blocks until connection is established" — things the type signature doesn't tell you
- Don't document the obvious:
/** Gets the user */ function getUser()wastes everyone's time. Document what's surprising, not what's self-evident - Update docs when code changes or delete them. Stale docs are actively harmful — a developer follows outdated instructions, wastes hours, and loses trust in all your docs
- JSDoc/TSDoc/Javadoc/docstrings for libraries and shared code. Internal-only functions can have lighter docs — audience matters
README
- First line answers "what is this and why would I care" in one sentence. Not a mission statement, not a history lesson — what does it do
- Quick start that actually works: clone → install → run in under 60 seconds. Test your own quick start on a clean machine — broken quickstarts are the #1 reason people bounce
- Examples are copy-pasteable and produce the shown output. If the example requires unstated prerequisites, it's broken documentation
- Configuration section: every env var, config file option, CLI flag with its default value and what it does. Undocumented config = hidden config
- Badges (build status, version, license) only if they're accurate and maintained. A broken CI badge at the top of your README says "this project is abandoned"
Architecture Decision Records (ADRs)
- Record significant decisions in
docs/adr/ordocs/decisions/: title, context, decision, consequences. Format:NNNN-title.md - ADRs answer "why did we choose X over Y?" six months later when nobody remembers — they're not for today, they're for future-you and new team members
- Include what was rejected and why: "We chose PostgreSQL over MongoDB because our data is relational and we need transactions. MongoDB was faster to prototype but we'd fight the data model long-term"
- ADRs are immutable — if a decision is reversed, write a new ADR referencing the old one. Don't edit history
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.
- yesterday First seen · 39 lines · 814 tokens per session scan A f88450d86421
documentation is a cursor rule published in the GitHub repository nedcodes-ok/cursor-doctor (9 stars, last pushed 5mo ago), licensed MIT. It adds 814 tokens to every session, about $0.0041 per session on Opus 5. 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-31.
Other cursor rules, from other repositories
angular
Angular: signals, standalone components, RxJS patterns.
django
Django: models, views, ORM best practices.
java
Modern Java: records, sealed classes, streams, virtual threads.
javascript
Modern JavaScript: ES2023+, async patterns, common traps.
rust
Rust patterns: ownership, Result types, iterators.
accessibility
Accessibility: semantic HTML, ARIA, keyboard navigation, testing.