auto-docs-skills / rules
Cursor rule0 starsChanged 5 months agoMITView on GitHub
Generate and maintain project documentation from the code (README, API reference, architecture notes, setup docs). Re-runnable to keep docs in sync as the code changes.
We split this auto-docs.mdc into the rules it gives an agent
4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Read the project before writing anything.
- Distinctive: line 18
Do not document what you have not read.
- Distinctive: line 42
Document the public API, how to install and run, architecture and data flow, and non-obvious design decisions.
- Distinctive: line 46
Write the files and summarize what changed.
≈ “Common” is an estimate: at least 1 in 5 of the 6,350 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
--- description: Generate and maintain project documentation from the code (README, API reference, architecture notes, setup docs). Re-runnable to keep docs in sync as the code changes. alwaysApply: false --- # Auto Docs A protocol for generating and maintaining project documentation from the code. Treat docs as derived from the codebase: generate them from what is actually there, regenerate the parts that drifted, and skip the parts that maintain themselves. ## 1. Analyze project structure Read the project before writing anything. - Detect project type from manifests (`package.json`, `pyproject.toml`, `go.mod`, `Cargo.toml`, `pom.xml`). - Identify entry points and the public surface: exports, routes, CLI commands, config keys, environment variables. - Locate existing docs and the install, build, test, and start commands. Do not document what you have not read. ## 2. Generate or update the README Answer four questions in order: what is this, how do I run it, how do I use it, where do I go next. Update drifted sections; leave hand-tuned prose alone. ## 3. Generate the API reference For each public export, route, or command: name and signature, one-sentence purpose, parameters with types, return shape, a real usage example, and known errors. Document the public surface; skip private helpers. ## 4. Write architecture notes For any non-trivial system: component responsibilities, data flow, relationships as a list or markdown diagram, and the non-obvious design decisions with the constraint behind each. ## 5. Write setup docs Prerequisites, step-by-step install, an environment-variable table (name, controls, required, example, never a real secret), and how to verify it worked. ## 6. Keep docs in sync with code On re-run, diff the code surface against what the docs describe. Regenerate the sections whose source changed, leave the rest, and flag docs that reference code that no longer exists. ## What to document vs skip Document the public API, how to install and run, architecture and data flow, and non-obvious design decisions. Skip private helpers, self-evident code, generated files, and prose that restates a function name. ## On committing Write the files and summarize what changed. Let the human decide when to commit; do not auto-commit unless asked.
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 3,978 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

