Agent skill

Revise Docstrings

by pymc-labs in pymc-labs/pathmc

Review and improve Python docstrings for Great Docs API reference generation.

MITAuto-check passedDevelopment

Install Revise Docstrings

skills CLI
$ npx skills add pymc-labs/pathmc --skill revise-docstrings -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install pymc-labs/pathmc revise-docstrings --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/pymc-labs/pathmc.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/revise-docstrings .claude/skills/revise-docstrings && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
revise-docstrings
GitHub stars
132
Token cost
~2.3k tokens
SKILL.md length
674 words
Files
3 (incl. references)
Skills in repo
7
Repo updated
First seen
Licence
MIT

At a glance

Review and improve Python docstrings for Great Docs API reference generation.

  • Works in 7 steps: Start with a one-line summary… → Add an extended summary if the one-liner… → Document every parameter with name,… → …
  • Fixing docstrings in a Python package
  • SKILL.md covers Quick start, Skill directory structure, When to use this skill and Core concepts, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Revise Docstrings is an agent skill from pymc-labs/pathmc. Review and improve Python docstrings for Great Docs API reference generation. Covers NumPy and Google style conventions, parameter documentation, return types, examples, cross-references, and Great Docs directives (%seealso, %nodoc). Use when auditing, writing, or fixing docstrings in a Python package.

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/docstring-checklist.md` and `references/style-examples.md`). Compatibility notes: Requires Great Docs =0.8, Quarto CLI installed.

It sits in Development, covering Technical documentation. It works with NumPy and Python. The repository describes itself as: Structural causal models with Bayesian estimation and interventional simulation via a concise DSL. The licence is MIT.

When your agent uses it

  • Fixing docstrings in a Python package
  • Tasks that involve Technical documentation

Example prompts

  • “/revise-docstrings”

Requirements

  • Python 3
  • Compatibility (from SKILL.md): Requires Great Docs >=0.8, Quarto CLI installed.

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Start with a one-line summary (imperative mood: "Connect to...",
  2. Add an extended summary if the one-liner is insufficient.
  3. Document every parameter with name, type, and description.
  4. Document the return value.
  5. Add Raises if the function can raise exceptions.
  6. Add an Examples section with Quarto code cells (preferred)
  7. Add %seealso for closely related symbols.

What it can do on your machine

Read from SKILL.md and the folder at commit e3b9467. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python, bash and yaml).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Requires Great Docs >=0.8, Quarto CLI installed.

    From compatibility in the SKILL.md frontmatter.

Context cost

Revise Docstrings loads about 2.3k tokens when it runs, and up to ~4.3k if it reads all its reference files. Until then it costs about 80 tokens; SKILL.md has 674 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~80
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from pymc-labs/pathmc at commit e3b9467, republished under its MIT licence (© pymc-labs). 674 words, ~2,272 tokens.

Download SKILL.mdSave it as .claude/skills/revise-docstrings/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
revise-docstrings
description
Review and improve Python docstrings for Great Docs API reference generation. Covers NumPy and Google style conventions, parameter documentation, return types, examples, cross-references, and Great Docs directives (%seealso, %nodoc). Use when auditing, writing, or fixing docstrings in a Python package.
compatibility
Requires Great Docs >=0.8, Quarto CLI installed.
license
MIT
metadata.author
rich-iannone
metadata.version
1.0
metadata.tags
documentation, docstrings, python, api-reference

Revise Docstrings

Skill for reviewing and improving Python docstrings so they render correctly and completely in a Great Docs API reference site.

Quick start

bash
# Preview what Great Docs will document
great-docs scan --verbose

# Build and check the rendered reference
great-docs build && great-docs preview

Skill directory structure

skills/revise-docstrings/
├── SKILL.md
└── references/
    ├── docstring-checklist.md
    └── style-examples.md

When to use this skill

NeedAction
Audit docstring completenessRun checklist on each public symbol
Convert Google→NumPy (or reverse)Reformat following style-examples.md
Add missing parameter descriptionsFill in Parameters section
Add a live exampleUse Examples section with >>> prompts
Cross-reference related symbolsAdd %seealso directive
Hide an internal symbolAdd %nodoc directive
Fix rendering issuesCheck against common pitfalls below

Core concepts

Docstring formats

Great Docs supports two formats. Set the parser in config:

yaml
# great-docs.yml
parser: numpy # or "google"

Both produce identical rendered output. Use whichever your codebase already uses.

NumPy style
python
def connect(host: str, port: int = 5432) -> Connection:
    """
    Open a connection to the database server.

    Establishes a TCP connection to the specified host and port, authenticates
    with default credentials, and returns an active connection handle.

    Parameters
    ----------
    host
        Hostname or IP address of the database server.
    port
        TCP port number. Defaults to `5432`.

    Returns
    -------
    Connection
        An authenticated connection ready for queries.

    Raises
    ------
    ConnectionError
        If the server is unreachable.

    Examples
    --------
    Connect to a local server and run a simple query:

    ```{python}
    conn = connect("localhost")
    conn.execute("SELECT 1")
    ```

    See Also
    --------
    disconnect : Close a connection.

    Notes
    -----
    The connection uses TLS by default when port 5433 is specified.
    """
Google style
python
def connect(host: str, port: int = 5432) -> Connection:
    """Open a connection to the database server.

    Establishes a TCP connection to the specified host and port, authenticates
    with default credentials, and returns an active connection handle.

    Args:
        host: Hostname or IP address of the database server.
        port: TCP port number. Defaults to `5432`.

    Returns:
        An authenticated connection ready for queries.

    Raises:
        ConnectionError: If the server is unreachable.

    Examples:
        Connect and run a query:

        ```{python}
        conn = connect("localhost")
        conn.execute("SELECT 1")
        ```
    """
Sections recognized by Great Docs
SectionNumPy headerGoogle headerPurpose
Summaryfirst linefirst lineOne-line description
Extended summarybody textbody textMulti-paragraph explanation
ParametersParametersArgs:Function/method arguments
ReturnsReturnsReturns:Return value description
RaisesRaisesRaises:Exceptions that may be raised
ExamplesExamplesExamples:Usage examples (Quarto cells or >>>)
NotesNotesNotes:Implementation details
See AlsoSee Also—Related symbols
WarnsWarns—Warnings issued
ReferencesReferencesReferences:Citations or links
Great Docs directives

Special inline directives using % prefix:

python
def my_function():
    """
    Description.

    %seealso other_func, SomeClass: related utilities
    %nodoc
    """
DirectiveEffect
%seealsoRenders a "See Also" box with cross-reference links
%nodocExcludes this symbol from the API reference
Type annotations vs docstring types
  • Prefer type annotations in the function signature.
  • Great Docs reads annotations automatically — no need to duplicate types in the docstring. Write bare parameter names (e.g., host not host : str) and let the signature annotation render on the reference page.
  • If you do add a type in the docstring (e.g., host : str), it overwrites the annotation in the rendered output. This can be useful to show a simplified form (e.g., str or Path instead of str | pathlib.Path), but it creates a maintenance risk: the docstring type and the annotation can drift apart silently.
  • Rule of thumb: omit docstring types unless the annotation is confusing to readers. Keep one source of truth.

Workflows

Auditing a package's docstrings
Task Progress:
- [ ] Step 1: List public API
- [ ] Step 2: Check each symbol
- [ ] Step 3: Fix issues
- [ ] Step 4: Rebuild and verify

Step 1: Run great-docs scan --verbose to see every symbol Great Docs will document.

Step 2: For each symbol, run through the checklist in references/docstring-checklist.md.

Step 3: Fix missing or incorrect sections. Use references/style-examples.md as a template.

Step 4: Rebuild with great-docs build and check the rendered pages in the browser.

Show full SKILL.md (285 more words)Show less
Writing a docstring from scratch
  1. Start with a one-line summary (imperative mood: "Connect to...", "Return the...", "Parse the...").
  2. Add an extended summary if the one-liner is insufficient.
  3. Document every parameter with name, type, and description.
  4. Document the return value.
  5. Add Raises if the function can raise exceptions.
  6. Add an Examples section with Quarto code cells (preferred) or >>> prompts. Use {python} for executable cells, {.python} for display-only. Wrap cells with short prose.
  7. Add %seealso for closely related symbols.
Fixing a rendering issue

Common rendering problems and their fixes:

ProblemCauseFix
Parameter not showingWrong indentationAlign to 4 spaces under section header
Code block not renderingMissing blank line before codeAdd blank line above cell or >>>
Type mismatch warningAnnotation ≠ docstring typeRemove type from docstring, keep annotation
Symbol missing from referenceNot exported in __init__.pyAdd import to __init__.py
Entire docstring shown as proseWrong parser settingCheck parser: in great-docs.yml

Gotchas

  1. One-line summary is required. Without it, the API reference page shows no description at all.
  2. Blank line after summary. NumPy style requires a blank line between the summary and the extended summary.
  3. Indentation matters. Parameters must be indented consistently (4 spaces for NumPy, nested under Args: for Google).
  4. Don't mix styles. All docstrings in a package must use the same format. Mixing causes parsing failures.
  5. %nodoc hides completely. Use exclude in config for selective hiding without modifying source code.
  6. Prefer Quarto cells over >>> prompts. {python} cells render output automatically and support prose between steps. Use {.python} for non-executable illustration.
  7. Class docstrings go on the class, not __init__. Great Docs reads the class-level docstring for the class page.

© pymc-labs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in .agents/skills/revise-docstrings of pymc-labs/pathmc.

  • SKILL.md
  • references/docstring-checklist.md
  • references/style-examples.md

Open the folder on GitHubat commit e3b9467

Compare with similar skills

Revise Docstrings next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Revise Docstrings compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Revise Docstrings this skillpymc-labs/pathmc132—~2.3kAutomated safety check: PassMIT
Image Visual Checkjjjkkkjjj/Matft147—~2.3kAutomated safety check: PassBSD-3-Clause
Scientific DocumentationYikai-Liao/symusic189—~5.5kAutomated safety check: PassMIT
Adk Sample Creatorgoogle/adk-python22k—~1.3kAutomated safety check: PassApache-2.0
Crafting Effective Readmescumbucadev/cinemaempoa1465 repos~669Automated safety check: PassGPL-3.0
Python Performance Optimizationwshobson/agents40k13 repos~814Automated safety check: PassMIT

Similar skills

  • Image Visual Check

    jjjkkkjjj/Matft

    Procedure for adding tests for Matft's image processing (Matft.image., indexing or channel swapping on images, etc.), generating comparison images that put the result next to an OpenCV reference…

    147 GitHub stars~2.3k tokensUpdated 12 days ago
    DevelopmentAuto-check passed
  • Scientific Documentation

    Yikai-Liao/symusic

    Set up and maintain documentation for scientific Python packages.

    189 GitHub stars~5.5k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Adk Sample Creator

    google/adk-python

    Official

    Creates a new sample agent in the ADK Python repository — the sample directory, its agent.py, and its README.md — following the conventions the existing samples already use.

    22k GitHub stars~1.3k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Crafting Effective Readmes

    cumbucadev/cinemaempoa

    A skill your agent uses when writing or improving README files.

    146 GitHub starsUsed in 5 repos~669 tokens
    DevelopmentAuto-check passed
  • Profiles slow Python code with cProfile and memory profilers, then applies targeted fixes for CPU, memory, I/O and query bottlenecks.

    40k GitHub starsUsed in 13 repos~814 tokens
    DevelopmentAuto-check passed
  • Acquire Codebase Knowledge

    github/awesome-copilot

    Official

    Maps an unfamiliar codebase into seven evidence-backed documents in docs/codebase/, using a scan script and templates, for onboarding or architecture write-ups.

    40k GitHub starsUsed in 1 repo~2.3k tokens
    DevelopmentAuto-check passed

More from pymc-labs/pathmc

  • Great Docs

    pymc-labs/pathmc

    Generate documentation sites for Python packages with Great Docs.

    132 GitHub stars~2.7k tokensUpdated 7 days ago
    Auto-check passed
  • Author Skills

    pymc-labs/pathmc

    Author, configure, and distribute Agent Skills for a Great Docs site.

    132 GitHub stars~2.6k tokensUpdated 7 days ago
    Auto-check passed
  • Configure Site

    pymc-labs/pathmc

    Configure a Great Docs documentation site through great-docs.yml.

    132 GitHub stars~2k tokensUpdated 7 days ago
    Auto-check passed
  • Write User Guide

    pymc-labs/pathmc

    Write and maintain narrative user-guide pages for a Great Docs site.

    132 GitHub stars~2.3k tokensUpdated 7 days ago
    Auto-check passed
  • Fix Bug

    pymc-labs/pathmc

    Autonomous bug-fix workflow. An agent skill from pymc-labs/pathmc.

    132 GitHub stars~4.6k tokensUpdated 7 days ago
    Auto-check passed
  • Pathmc

    pymc-labs/pathmc

    Bayesian path analysis (observed-variable SEM) in PyMC. An agent skill from pymc-labs/pathmc.

    132 GitHub stars~4k tokensUpdated 7 days ago
    Auto-check passed

Works with

Categories

Questions about Revise Docstrings

What does Revise Docstrings do?

Review and improve Python docstrings for Great Docs API reference generation. Revise Docstrings is an agent skill from pymc-labs/pathmc. Review and improve Python docstrings for Great Docs API reference generation.

When should I use Revise Docstrings?

Revise Docstrings fits situations like: fixing docstrings in a Python package; tasks that involve Technical documentation.

How do I install Revise Docstrings in Claude Code?

Run `npx skills add pymc-labs/pathmc --skill revise-docstrings -a claude-code`. Or copy the skill folder (.agents/skills/revise-docstrings in pymc-labs/pathmc) into .claude/skills/revise-docstrings in your project. Claude Code loads it when a task matches its description.

How do I install Revise Docstrings in Codex?

Run `npx skills add pymc-labs/pathmc --skill revise-docstrings -a codex`. Or copy the skill folder (.agents/skills/revise-docstrings in pymc-labs/pathmc) into .agents/skills/revise-docstrings in your project. Codex loads it when a task matches its description.

Can I use Revise Docstrings in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add pymc-labs/pathmc --skill revise-docstrings -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/revise-docstrings, .gemini/skills/revise-docstrings, .github/skills/revise-docstrings and .opencode/skills/revise-docstrings in your project.

What does Revise Docstrings need to run?

SKILL.md names no scripts, command-line tools or credentials: Revise Docstrings is instructions for the agent only. Our summary lists: Python 3. Compatibility (from SKILL.md): Requires Great Docs >=0.8, Quarto CLI installed..

Does Revise Docstrings access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Revise Docstrings safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Revise Docstrings use?

Revise Docstrings is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Revise Docstrings use?

About 2.3k tokens (SKILL.md is roughly 9.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2k tokens, read only when the agent opens those files.

What are the alternatives to Revise Docstrings?

Skills that share tags, products or a category with Revise Docstrings: Image Visual Check (jjjkkkjjj/Matft, 147 stars), Scientific Documentation (Yikai-Liao/symusic, 189 stars), Adk Sample Creator (google/adk-python, 22k stars) and Crafting Effective Readmes (cumbucadev/cinemaempoa, 146 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Revise Docstrings?

pymc-labs (a GitHub organization) maintains it in pymc-labs/pathmc, which has 132 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on October 2, 2026.

Source: pymc-labs/pathmc on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.