agentleFS
rkalievrkaliev/eng-kit/skills/writing-documentation/SKILL.md

writing-documentation

Skill1 starsChanged 13 days agoMITView on GitHub

Use when writing or updating a README, project docs, an architecture decision record, a changelog, API docs or code comments, publishing docs as a site, or when a change alters behavior, setup or commands that docs describe

16 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use authoring-issues-prs, config-contract and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • pvliesdonkSkill

    authoring-issues-prs

    Use when filing a bug, opening or creating a GitHub issue, drafting an epic or ticket, writing up a finding or review observation worth tracking, sizing a change before coding, or opening a pull request for this repository. Routes the change to the right repo first (library / template / domain), picks the right issue form, sizes the change to one PR, links epic children as native sub-issues, and applies CONTRIBUTING.md before anything is posted.

    Also in 3 projects that use this

  • pvliesdonkSkill

    config-contract

    Use when adding a domain configuration field, env var, Dockerfile extension, mcpb install-screen entry, or release-manifest stamp: the sentinel-based config and customization contract.

    Also in 3 projects that use this

  • zpower426Skill

    roadmapping

    Communicate the product evolution timeline and key milestones, balancing long-term goals with short-term delivery.

    Also in 3 projects that use this

  • quocldSkill

    logging-standard

    Use when writing or reviewing code that logs, when creating or changing a logger, request or job correlation, or log redaction, and when the user says "setup log", "setup logger", "thêm log", "chuẩn hoá log", "log bị lộ token", "log quá nhiều", "review log".

    Also in 3 projects that use this

  • MicrosoftSkill

    writing-release-notes

    Generates release notes and changelog entries for the DocumentDB extension for Visual Studio Code, and announces releases on GitHub Discussions. Use when preparing version releases, creating patch update notes, writing changelog entries, documenting new features and fixes, or posting a release or patch release announcement to Discussions. Handles both major/minor versions (new file) and patch updates (append to existing file).

    Also in 3 projects that use this

  • jordanhubbardSkill

    releasing

    Cut a NanoLang release. Defines the ordered gates, and indexes the child skills that own each one. Use before running make release, make release-minor, or make release-major, and whenever a release is being prepared by hand.

    Also in 3 projects that use this

  • +6 more from pvliesdonk

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 15 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read what the repo has: README, docs/, decision records or RFCs, CONTRIBUTING, the changelog style.

    line 12
  2. Distinctive:

    Present tense, current state: No history ("previously", "was changed to"), no ticket IDs, no "new" or "now".

    line 32
  3. Distinctive:

    No commented-out code, no author or date stamps, no TODO without an issue or owner.

    line 43
  4. Distinctive:

    Before calling the change done, check what it made stale:

    line 48
  5. Distinctive:

    Run every command you wrote or changed, from a clean checkout where it matters, and read the output.

    line 57
  6. Distinctive:

    Check that each link and path resolves (a link checker if the repo has one, otherwise open them).

    line 58
  7. Very specific:

    Update the index (docs/README.md, the README docs section, llms.txt if the repo keeps one).

    line 60

“Common” is measured: kept by at least 6 in 10 of the 15 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

Writing documentation

Docs are part of the change. They ship in the same commit or PR as the code they describe, and they describe the system as it is now. A wrong doc is worse than none: readers and agents act on it.

Follow the project first

Read what the repo has: README, docs/, decision records or RFCs, CONTRIBUTING, the changelog style. Extend that structure, in the language using-skills sets, even where older docs use another; use the layout below only where nothing exists, and say so.

Where each thing goes

DocumentAnswersPlace
READMEWhat is this, how do I run it, where is the restrepo root (and one per package in a monorepo)
Topic docsHow does X work todaydocs/NN-topic.md, one topic per file, indexed in docs/README.md
Decision recordWhich rule holds, and whydocs/decisions/NNNN-slug.md, one topic each, cited by number; rewritten in place or deleted, never superseded
CHANGELOGWhat changed for users in each versionCHANGELOG.md, Keep a Changelog sections, grouped from Conventional Commits
Agent manifestCommands, rules and boundaries for AI agentsCLAUDE.md / AGENTS.md: short, links to docs instead of copying them
API referenceExact contract of an interfacegenerated from the source of truth (OpenAPI from schemas or code, typedoc, KDoc, DocC); never hand-maintained in parallel
Code commentsWhy this code is the way it isnext to the code

Working documents (task files in docs/tasks/) live on the work branch and are deleted when the work is done; only the system documents above reach the base branch. First move what lasts: behavior into the topic chapter, decisions into decision records. Personal notes go in agent memory, not the repo.

Templates: references/templates.md. A site from docs/: references/docs-site.md.

Prose

  • Present tense, current state. No history ("previously", "was changed to"), no ticket IDs, no "new" or "now". History lives in git and the changelog.
  • Say it once. Link to the single source instead of restating it. Versions, ports and limits are pointers to the file that sets them (.nvmrc, libs.versions.toml, config), not copied numbers.
  • Write for the reader who will act. Lead with the task. Short sentences, one idea per paragraph, one name per concept.
  • Draw what prose can't show plainly (calls, failure paths, states): Mermaid, named as in the code (references/diagrams.md).
  • Real examples only. Commands, paths and snippets are copied from something that ran. Mark placeholders clearly (<project-dir>).
  • Links resolve. In-repo links are relative Markdown links to files that exist; references to code name the file (and symbol), not a line number that will move.

Code comments

  • An exported function, type or module gets 1–3 lines: what it guarantees and when to use it. Skip parameters the signature already explains; document units, ranges, errors and side effects.
  • Inside a body, comment only the why: a constraint, a workaround with its reason, a non-obvious invariant. Never narrate what the next line does.
  • No commented-out code, no author or date stamps, no TODO without an issue or owner.
  • A comment that contradicts the code is a bug: fix one of them.

When code changes

Before calling the change done, check what it made stale:

  • setup, commands or environment variables → README and the agent manifest;
  • behavior of a documented flow → its topic doc;
  • a choice between real alternatives with lasting consequences → the decision record for that topic, new or updated in place;
  • anything a user or integrator notices → a changelog entry;
  • an interface → regenerate the API reference.

Verify before saying "docs updated"

  1. Run every command you wrote or changed, from a clean checkout where it matters, and read the output.
  2. Check that each link and path resolves (a link checker if the repo has one, otherwise open them).
  3. Compile or run the snippets, or copy them from tests that do.
  4. Update the index (docs/README.md, the README docs section, llms.txt if the repo keeps one).
  5. Re-read as the target reader: can they do the task with only this page?

Report which of these you did. To enforce these rules mechanically, propose checks from references/checks.md.

Red flags

ThoughtReality
"I'll update the docs later"Later means never; the next reader acts on the stale version.
"I'll copy that section here too"Two copies drift. Link to one.
"Describe how it will work"Docs describe what exists. Plans go in the task file.

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.