Skip to content
Skills Library
Programming · Writing

numpy-docstrings

/numpy-docstrings

Write and review NumPy-style (numpydoc) docstrings for Python public APIs. Covers section order, semantics (what belongs in docstrings vs types vs tests), anti-patterns (comment soup, stub docs, wrong style), Parameters, Returns, Yields, Raises, See Also, Notes, References, Examples, and class/module docs. Use when authoring or auditing docstrings. Triggers on docstring, numpydoc, Parameters, Returns, Examples, Sphinx, TODO, comment.

Repository
pyref ↗
Licence
LGPL
Last repository change
17.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
10
Scripts
0
HTML comments
0
URLs in SKILL.md
4
Deprecation

No signals detected. Repository changed on 17.10.2026, without references to retired models or APIs.

Licence

LGPL, otwarta.

What it does and when to use it

Write and review NumPy-style (numpydoc) docstrings for Python public APIs. Covers section order, semantics (what belongs in docstrings vs types vs tests), anti-patterns (comment soup, stub docs, wrong style), Parameters, Returns, Yields, Raises, See Also, Notes, References, Examples, and class/module docs. Use when authoring or auditing docstrings. Triggers on docstring, numpydoc, Parameters, Returns, Examples, Sphinx, TODO, comment.

Original author description

Write and review NumPy-style (numpydoc) docstrings for Python public APIs. Covers section order, semantics (what belongs in docstrings vs types vs tests), anti-patterns (comment soup, stub docs, wrong style), Parameters, Returns, Yields, Raises, See Also, Notes, References, Examples, and class/module docs. Use when authoring or auditing docstrings. Triggers on docstring, numpydoc, Parameters, Returns, Examples, Sphinx, TODO, comment.

How it works

  1. Quick start
  2. Stack synergy
  3. Section reference index
  4. Canonical specification
  5. Optional tooling
Original SKILL.md headings · 44 lines, 279 words
SKILL.md preview
---
author: dotagents
name: numpy-docstrings
description: Write and review NumPy-style (numpydoc) docstrings for Python public APIs. Covers section order, semantics (what belongs in docstrings vs types vs tests), anti-patterns (comment soup, stub docs, wrong style), Parameters, Returns, Yields, Raises, See Also, Notes, References, Examples, and class/module docs. Use when authoring or auditing docstrings. Triggers on docstring, numpydoc, Parameters, Returns, Examples, Sphinx, TODO, comment.
---

# NumPy-style docstrings (numpydoc)

## Quick start

1. **Public APIs only** per project **Python spec** and **Python rule**: document **modules, classes, functions, and methods** users import; private helpers stay minimal unless behavior is non-obvious.
2. **Follow section order** from [numpydoc](https://numpydoc.readthedocs.io/en/latest/format.html#sections); each heading is **underlined with hyphens** the same length as the title.
3. **Line length**: aim for **~75 characters** in docstring prose for terminal readability.
4. **Markup**: subset of **reST**; parameter names in **single backticks** in running text.
5. **Load the chunk** you are editing from the table below—each reference file targets one part of the standard.
6. **Semantics**: choose **docstring vs annotation vs test vs prose** deliberately; avoid **comment narration** and **stub** docstrings—see [reference-semantics-and-anti-patterns.md](references/reference-semantics-and-anti-patterns.md).

## Stack synergy

| Resource | Role |
|----------|------|
| **general-python** | pytest, “NumPy style on public APIs” |
| **python-reviewer** | Checks docstring quality alongside typing and tests |
| **python-types** | Types in signatures complement docstring types |

## Section reference index

| Docstring chunk | File |
|-----------------|------|
| Global rules, section order, line length, reST | [reference-overview-order.md](references/reference-overview-order.md) |
| Short summary, extended summary, deprecation | [reference-summary-deprecation.md](references/reference-summary-deprecation.md) |
| Parameters, Other Parameters, `*args` / `**kwargs` | [reference-parameters.md](references/reference-parameters.md) |
| Returns, Yields, Receives | [reference-returns-yields-receives.md](references/reference-returns-yields-receives.md) |
| Raises, Warns, Warnings | [reference-raises-warns-warnings.md](references/reference-raises-warns-warnings.md) |
| See Also, Notes, References | [reference-see-also-notes-references.md](references/reference-see-also-notes-references.md) |
| Examples (doctest style) | [reference-examples.md](references/reference-examples.md) |
| Classes, Attributes, Methods, modules | [reference-classes-modules.md](references/reference-classes-modules.md) |
| Why each mechanism; bad comments/docstrings; fixes | [reference-semantics-and-anti-patterns.md](references/reference-semantics-and-anti-patterns.md) |

## Canonical specification

- [numpydoc style guide](https://numpydoc.readthedocs.io/en/latest/format.html)
- [Example docstring](https://numpydoc.readthedocs.io/en/latest/example.html)
- [PEP 257](https://peps.python.org/pep-0257/) (baseline docstring conventions)

## Optional tooling

- **`uv add numpydoc`** when Sphinx builds use the numpydoc extension; do not hand-edit pins in `pyproject.toml`.
Files in this package (10)
  • SKILL.md 3 KB
  • references/reference-classes-modules.md 3 KB
  • references/reference-examples.md 1 KB
  • references/reference-overview-order.md 2 KB
  • references/reference-parameters.md 2 KB
  • references/reference-raises-warns-warnings.md 1 KB
  • references/reference-returns-yields-receives.md 1 KB
  • references/reference-see-also-notes-references.md 2 KB
  • references/reference-semantics-and-anti-patterns.md 7 KB
  • references/reference-summary-deprecation.md 2 KB

Versions

The database has no other skills named numpy-docstrings.

Database snapshot: 13.11.2026 · package version ca239c87e7b9 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100scientific-documentation
    Use when the user asks about setting up docs for a Python package, configuring Sphinx or MkDocs, writing NumPy-style docstrings, or deploying to Read the Docs. Set up and maintain documentation for scientific Python packages. Covers Sphinx, MkDocs, NumPy-style docstrings,…
  • 100update-docstrings
    Add or update docstrings, doc comments, and inline comments in source code — any language. Use when the user wants docstrings written or fixed, a conversion to a doc style (NumPy, TSDoc, rustdoc), or a comment cleanup. Source files only — README/ADR/prose docs belong to…
  • 100python-docstring-style
    Write Python docstrings and inline comments matching the flashdreams house style — SPDX header, one-line module docstring, Google-style function docstrings (Args/Returns/Raises), PEP 257 attribute docstrings on dataclass/class fields *and on module-level constants*,…
  • 100write-docstrings
    Writes and reviews docstrings in this repo. Use when writing new docstrings, reviewing existing docstrings, or editing docstrings.
  • 95documenting-python-libraries
    Creates comprehensive Python library documentation including Google-style docstrings, Sphinx setup, API references, tutorials, and ReadTheDocs configuration. Use when writing docstrings, setting up Sphinx documentation, or creating user guides for Python libraries.
  • 100writing-docstrings
    Use when writing, rewriting, or auditing Python docstrings that a documentation site is generated from, or when docstrings are long, narrate the code, or leave a reader of the generated reference unable to find their way. Triggers - "audit the docstrings", "docstring slop",…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.