Skip to content
velonx*SKILLS

Code Documentationv1.1.0

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.

Author
Velonx
License
MIT
Updated
Sep 25, 2026

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.

Installation

coming soonVelonx CLI:velonx install code-documentation
  1. Get the skill folder

    git clone --depth 1 https://github.com/velonx/agent-skills.git
    The skill is agent-skills/skills/code-documentation/. Or open it on GitHub and download the files.
  2. Give SKILL.md to your agent as instructions

    Add it to the system prompt, custom instructions or rules file your agent reads. Keep the rest of the folder next to it if the skill refers to examples or scripts.
  3. Ask for the task in your own words

    The agent follows the skill when your request matches it. You can also name it: “use code-documentation”.

Agents move these settings between versions — if a path doesn’t match, check your agent’s docs.

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.

Requirements & compatibility

Your agent needs

  • Read and write local files

Written for

GenericClaudeOpenAIGeminiCursor

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.

Files

Changelog

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

Contributing

This skill lives in velonx/agent-skills. Improvements go through a pull request, reviewed by maintainers.