docstrings

Enforce NumPy-style Python docstrings compatible with Sphinx Napoleon.

3|Updated May 12, 2026
One-click install
npx skills add https://github.com/gao-hongnan/omniagents --skill docstrings-gao-hongnan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docstrings
Source: https://github.com/gao-hongnan/omniagents/tree/main/plugins/python/skills/docstrings
Command: npx skills add https://github.com/gao-hongnan/omniagents --skill docstrings-gao-hongnan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill resolves inconsistencies in Python documentation by enforcing structured, readable, and maintainable docstrings that align with industry-standard conventions.

Core Features & Use Cases

  • Standardized Formatting: Enforces NumPy-style docstrings for consistent API documentation across modules, classes, and functions.
  • Contract Clarity: Ensures that type annotations are complemented by semantic explanations, invariants, and side-effect documentation.
  • Use Case: Use this skill when reviewing a new module to ensure all public functions have clear parameter descriptions, return types, and doctest examples that satisfy Sphinx Napoleon requirements.

Quick Start

Apply the docstrings skill to the current file to audit and rewrite all public function documentation according to the NumPy style guide.

Frequently Asked Questions about docstrings

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I standardize Python docstrings for Sphinx autodoc compatibility?

To standardize Python docstrings for Sphinx autodoc, enforce NumPy-style formatting with Sphinx Napoleon compatibility across public modules, classes, and functions. This ensures semantic clarity and automated API generation aligned with PEP 257.

What is the best way to document Python API contracts using NumPy-style docstrings?

Documenting Python API contracts with NumPy-style docstrings involves complementing type annotations with semantic explanations, invariants, and side-effect documentation. This structured approach ensures readable and maintainable API documentation.

How do I audit Python module documentation to satisfy Sphinx Napoleon requirements?

Auditing Python module documentation for Sphinx Napoleon requires checking that all public functions have clear parameter descriptions, return types, and doctest examples formatted according to the NumPy style guide.

Does Sphinx Napoleon support NumPy-style docstrings for automated API generation?

Yes, Sphinx Napoleon supports NumPy-style docstrings specifically to enable automated API generation. Integrating this skill ensures your public modules, classes, and functions adhere to PEP 257 and Sphinx autodoc requirements.

When do I need to enforce NumPy-style docstrings in Python projects?

You need to enforce NumPy-style docstrings in Python projects when resolving documentation inconsistencies and requiring structured, readable API references that integrate seamlessly with Sphinx autodoc for professional output.