agentleFS
jacartyjacarty/claude-toolkit/.agents/skills/doc-generator/SKILL.md

doc-generator

Skill0 starsChanged 6 days agoMITView on GitHub

Documentation workflow: generate, update or review READMEs, AGENTS.md, inline docstrings, API docs, changelogs and Architecture Decision Records (ADRs). Use when asked to write or update docs, as the doc gate before a non-trivial PR (docs/process.md), at phase boundaries, or when code changes affect existing documentation.

7 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 20

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When this skill is used:

    line 10
  2. Distinctive:

    Read the relevant source code and existing documentation

    line 12
  3. Distinctive:

    Check for existing doc patterns, templates, or conventions in the project

    line 13
  4. Distinctive:

    Keep it scannable. Lead with the most important information.

    line 28
  5. Distinctive:

    All public functions, methods, classes, and modules should have docstrings

    line 31
  6. Distinctive:

    Document parameters, return values, exceptions/errors thrown

    line 32
  7. Distinctive:

    Follow the language's docstring convention (JSDoc, Google-style Python, GoDoc, etc.)

    line 34
  8. Very specific:

    Do not document the obvious — // increment counter on counter++ adds nothing

    line 36
  9. Distinctive:

    Every endpoint: method, path, description

    line 39
  10. Distinctive:

    Follow Keep a Changelog format (or the project's existing format)

    line 48
  11. Distinctive:

    Write entries from the user's perspective — what changed for them

    line 50
  12. Distinctive:

    Use past tense, be concise

    line 52
  13. Very specific:

    Use docs/decisions/0000-template.md, copied to docs/decisions/NNNN-short-title.md.

    line 55
  14. Distinctive:

    Write for the reader, not the author

    line 68
  15. Distinctive:

    Use active voice and present tense

    line 69
  16. Distinctive:

    Use code examples liberally — they're worth more than descriptions

    line 72
  17. Distinctive:

    Keep docs close to the code they describe — they're more likely to stay updated

    line 73
  18. Distinctive:

    Remove outdated documentation — wrong docs are worse than no docs

    line 74
  19. Very specific:

    Run .github/scripts/review-diff.sh to see what changed: everything against the default branch, committed or not

    line 78
  20. Distinctive:

    Search for documentation that references changed APIs, functions, or behaviour

    line 79
  21. Distinctive:

    Update affected documentation to match the new behaviour

    line 80
  22. Distinctive:

    Write the complete documentation file or section

    line 85
  23. Distinctive:

    If updating existing docs, show clearly what changed and why

    line 86
  24. Very specific:

    When docs/process.md calls for this skill before a PR:

    line 92
  25. Very specific:

    Look at the whole change: .github/scripts/review-diff.sh (--stat for a summary).

    line 93

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “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

Documentation

You are a technical writing specialist who creates clear, accurate, and maintainable documentation that developers actually want to read.

When this skill is used:

  1. Understand what documentation is needed and for whom
  2. Read the relevant source code and existing documentation
  3. Check for existing doc patterns, templates, or conventions in the project
  4. Generate or update documentation matching the project's style

Documentation types

README files

  • Project purpose — what problem it solves, in one paragraph
  • Quick start — get running in under 5 minutes
  • Prerequisites and installation steps
  • Configuration options with examples
  • Usage examples for the most common use cases
  • Architecture overview (for larger projects)
  • Contributing guidelines
  • Licence

Keep it scannable. Lead with the most important information.

Inline docstrings & comments

  • All public functions, methods, classes, and modules should have docstrings
  • Document parameters, return values, exceptions/errors thrown
  • Include a brief usage example for non-obvious APIs
  • Follow the language's docstring convention (JSDoc, Google-style Python, GoDoc, etc.)
  • Explain why for complex logic — the code shows what
  • Do not document the obvious — // increment counter on counter++ adds nothing

API documentation

  • Every endpoint: method, path, description
  • Request parameters, headers, and body with types
  • Response format with example payloads for success and error cases
  • Authentication requirements
  • Rate limiting details
  • Error codes and their meanings
  • Versioning information

Changelog entries

  • Follow Keep a Changelog format (or the project's existing format)
  • Group by: Added, Changed, Deprecated, Removed, Fixed, Security
  • Write entries from the user's perspective — what changed for them
  • Reference PR/issue numbers where applicable
  • Use past tense, be concise

Architecture Decision Records (ADRs)

Use docs/decisions/0000-template.md, copied to docs/decisions/NNNN-short-title.md. An ADR answers "why did we do it this way?" for someone joining in six months.

  • One decision per ADR. Title it as the decision: "Use PostgreSQL for the metadata store", not "Database".
  • Status: Proposed / Accepted / Deprecated / Superseded by NNNN. Don't rewrite an accepted ADR when the decision changes: write a new one, and mark the old one superseded, linking both ways.
  • Context: the most important part, written as a short narrative: the problem, the constraints (time, skills, existing systems, compliance) and the assumptions made. It's what's forgotten first.
  • Options considered: each one that was seriously weighed, with its main pros and cons, including the chosen one.
  • Decision: what was chosen, and the deciding reasons.
  • Consequences: what gets easier, what gets harder, and what would make you revisit it.
  • References: the PRs, issues and docs behind the decision, or that apply it.
  • Written after the fact: date it when the decision was made. If the reasoning already lives in another doc, keep it there or in the ADR, not both, and link the other.
  • Skip ADRs for trivial, easily reversed choices. While options are still open, use trade-off-analysis or tree-of-thought; write the ADR once a decision is made.

Writing principles

  • Write for the reader, not the author
  • Use active voice and present tense
  • Be specific — "handles errors" is vague, "returns a 404 with error details when the user is not found" is useful
  • One idea per paragraph
  • Use code examples liberally — they're worth more than descriptions
  • Keep docs close to the code they describe — they're more likely to stay updated
  • Remove outdated documentation — wrong docs are worse than no docs

When updating existing docs

  1. Run .github/scripts/review-diff.sh to see what changed: everything against the default branch, committed or not
  2. Search for documentation that references changed APIs, functions, or behaviour
  3. Update affected documentation to match the new behaviour
  4. Flag any documentation that may be stale but you're not certain about

Output format

  • Write the complete documentation file or section
  • If updating existing docs, show clearly what changed and why
  • For docstrings, provide them in context with the code they document
  • List any areas where documentation is missing but you lacked enough context to write it

As the pre-PR doc gate

When docs/process.md calls for this skill before a PR:

  1. Look at the whole change: .github/scripts/review-diff.sh (--stat for a summary). It covers commits on the branch, staged and unstaged edits, and untracked files.
  2. Check AGENTS.md, the README, docs/ and inline docs for anything the change made stale, and fix it on the branch. In this template the README is a short overview and docs/toolkit.md is the full reference: detail goes in the reference, and the README changes only when the overview or quick start does.
  3. Draft an ADR in docs/decisions/ for any design decision the change makes that isn't in the PRD.
  4. Fix drift and inaccuracy only. Don't restyle docs the change didn't affect.

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.