agentleFS
velonxvelonx/agent-skills/skills/code-documentation/SKILL.md

code-documentation

Skill1 starsChanged 2 months agoMITView on GitHub

Write or update docstrings, READMEs and API docs that match what the code actually does, verified by reading the implementation. Use when the user asks to document code, write a README, explain a module, or fix out-of-date docs.

13 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use changelog-generator and web-design-guidelines.

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.
  • ArogyaReddySkill

    changelog-generator

    Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.

    Also in 3 projects that use this

  • VercelSkill

    web-design-guidelines

    Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 11 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before open-sourcing a project or handing it over.

    line 25
  2. Very specific:

    Mark uncertainty: If behaviour is ambiguous, leave a TODO(docs): note rather than guessing.

    line 33
  3. Distinctive:

    Keep diffs limited to docs unless asked to change code.

    line 34
  4. Distinctive:

    Does not generate API reference sites.

    line 45

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

Code Documentation

Overview

Documentation that is accurate first and complete second. The agent reads the implementation, traces behaviour, and documents what the code does — including edge cases and errors — in the style already used by the project.

When to Use

  • "Document this function / module / API", "write a README", "our docs are out of date"
  • Before open-sourcing a project or handing it over.

Usage

  1. Detect conventions. Find existing docstrings and docs; match their format (JSDoc, Google/NumPy docstrings, rustdoc…), tone and heading structure. If none exist, use the language's most common convention.
  2. Read the code path, not just the signature: inputs, outputs, side effects (I/O, network, mutation), thrown errors, defaults.
  3. Docstrings: one-line summary; parameters and return value only when not obvious from types; side effects; errors raised; a short example for public APIs. Don't restate the code.
  4. README in this order: what it is (one sentence) → install → minimal working example → configuration → common tasks → contributing/license. Test that every command and snippet you include actually matches the code (script names, flags, env vars).
  5. Mark uncertainty. If behaviour is ambiguous, leave a TODO(docs): note rather than guessing.
  6. Keep diffs limited to docs unless asked to change code.

Examples

Prompt: "Add docstrings to billing/invoice.py."

The agent notices the project uses Google-style docstrings, reads each function, documents that finalize() raises InvoiceLockedError if already sent, and skips trivial private helpers.

Limitations

  • Cannot document runtime behaviour it can't see (external services, env-specific config) — flags those.
  • Does not generate API reference sites; it writes the source docs those tools consume.

Changelog

  • 1.1.0 — Verifies README commands against the code; TODO(docs) for uncertain behaviour.
  • 1.0.0 — Initial release.

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.