agentleFS
PradnyeshpPradnyeshp/Claude-Skills/.claude/skills/docstring/SKILL.md

docstring

Skill2 starsChanged 4 months agoMITView on GitHub

Add or update documentation comments (docstrings, JSDoc, etc.) for changed or selected code, matching the project's existing style. Use when the user asks to document code, add docstrings, says "add JSDoc", "document this function", "write doc comments", or "add comments to the changes".

8 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use commit.

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

    commit

    Create commit messages following Sentry conventions. Use when committing code changes, writing commit messages, or formatting git history. Follows conventional commits with Sentry-specific issue references.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 2

    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. Very specific:

    Add or improve documentation comments for the changed code above (or for $ARGUMENTS if a file/symbol was given).

    line 17
  2. Distinctive:

    Update stale docs: If an existing docstring no longer matches the changed signature or behavior, correct it.

    line 25
  3. Distinctive:

    After editing, give a one-line summary of which symbols were documented or updated.

    line 27

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

Changed code (working tree + staged)

!git diff HEAD --stat 2>/dev/null || echo "No git changes detected"

!git diff HEAD 2>/dev/null | head -300

Instructions

Add or improve documentation comments for the changed code above (or for $ARGUMENTS if a file/symbol was given).

Rules

  1. Match the project's existing convention. Read a neighboring already-documented function first and mirror its format exactly — JSDoc/TSDoc for JS/TS, Google or NumPy style for Python, /// doc comments for Rust, GoDoc comments for Go, Javadoc for Java. Do not introduce a new style.
  2. Document the public surface of changed code: every exported/public function, class, and module that lacks a current, accurate doc comment.
  3. For each, cover: a one-line summary of purpose, parameters (with types if the language convention includes them), return value, raised/thrown errors, and any important side effects.
  4. Describe behavior and intent, not the obvious. Explain why and the contract — never restate the code line by line. Skip comments that add no information.
  5. Update stale docs. If an existing docstring no longer matches the changed signature or behavior, correct it.
  6. Apply edits directly to the files. Do not reformat or touch unrelated code.
  7. After editing, give a one-line summary of which symbols were documented or updated.

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.