documentation

documentation is a cursor rule for Cursor from nedcodes-ok/cursor-doctor. It costs 814 tokens per session, scanned A, a copy of documentation, MIT.

Rules for writing and maintaining developer documentation, including API comments, README files, architecture decisions, and examples. They focus on explaining behavior that users need but might not infer from the code.

In plain words
What is it for?
Use them when documenting public APIs, updating a README after code changes, recording design decisions, or adding working quick-start examples.
Why use it?
They help prevent outdated or unusable documentation and make it easier for someone new to install, understand, and use a project.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use them when documenting public APIs, updating a README after code changes, recording design decisions, or adding working quick-start examples.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/nedcodes-ok/cursor-doctor/documentation
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/nedcodes-ok/cursor-doctor

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 documentation

README.md
[![agentmods](https://agentmods.dev/badge/rules/nedcodes-ok/cursor-doctor/documentation/github.svg)](https://agentmods.dev/rules/nedcodes-ok/cursor-doctor/documentation)
Your own site
<a href="https://agentmods.dev/rules/nedcodes-ok/cursor-doctor/documentation"><img src="https://agentmods.dev/badge/rules/nedcodes-ok/cursor-doctor/documentation/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 documentation

Your own site · 80×15
<a href="https://agentmods.dev/rules/nedcodes-ok/cursor-doctor/documentation"><img src="https://agentmods.dev/badge/rules/nedcodes-ok/cursor-doctor/documentation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 814 This file is loaded in full into every session.
When invoked 814 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% 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.00814 $0.00814
Opus 5.5 $0.00326 $0.00326
Sonnet 5.5 $0.00163 $0.00163
Haiku 4.5 $0.00081 $0.00081

Measured 1mo ago against content hash f88450d86421, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 1mo 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

100% identical to documentation — 0 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.

pro-kit/templates/practices/documentation.mdc · 39 lines

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/ or docs/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

Read the full file on GitHub · 39 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. 1mo ago First seen · 39 lines · 814 tokens per session scan A f88450d86421

Subscribe to this mod's changes

documentation is a cursor rule published in the GitHub repository nedcodes-ok/cursor-doctor (9 stars, last pushed 7mo ago), licensed MIT. It adds 814 tokens to every session, about $0.0033 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to documentation, differing in 0 lines, and is treated as a copy.