agentleFS
HermeticOrmusHermeticOrmus/auto-docs-skills/skills/auto-docs/SKILL.md

auto-docs

Skill0 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 after refactors. Use when a project has no docs, has docs that drifted from the code, or when a new contributor cannot get it running from the existing docs.

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    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
  1. Distinctive:

    Read the project before writing anything.

    line 13
  2. Distinctive:

    Do not document what you have not read.

    line 19
  3. Distinctive:

    When install is more than one command: prerequisites, step-by-step from clone to running, an environment-variable table (name, controls, …

    line 35
  4. Distinctive:

    Document the public API (exports, routes, CLI commands, config keys, environment variables), how to install and run and test, architecture …

    line 43
  5. Distinctive:

    Test for a doc: would a new contributor be slower without it?

    line 45

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Auto Docs

A protocol for generating and maintaining project documentation from the code. Docs rot because they live apart from the code that defines them. This protocol treats docs as derived: 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. A guessed API reference is worse than none.

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. Use the actual install and usage commands. Update the sections that drifted; 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 and whether required, return or response shape, one usage example reflecting a real call site, and known errors. Document the public surface; skip private helpers.

4. Write architecture notes

For any non-trivial system: component responsibilities, data flow from input to output, relationships as a list or a markdown diagram, and the non-obvious design decisions with the constraint behind each.

5. Write setup docs

When install is more than one command: prerequisites, step-by-step from clone to running, an environment-variable table (name, controls, required, example, never a real secret), and how to verify the setup worked.

6. Keep docs in sync with code

This protocol is meant to be re-run. On re-run, diff the current 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. The value is in the second run and every run after.

What to document vs skip

Document the public API (exports, routes, CLI commands, config keys, environment variables), how to install and run and test, architecture and data flow, and non-obvious design decisions. Skip private helpers, self-evident code, generated files, and prose that restates a function name.

Test for a doc: would a new contributor be slower without it? If not, the doc is noise.

On committing

Generating docs and committing them are separate steps. Write the files, summarize what changed, and let the human decide when to commit. Do not auto-commit unless explicitly asked.


See full content at https://github.com/HermeticOrmus/auto-docs-skills.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

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.