python-docstrings

Generate and convert Python docstrings to Google convention format.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/leodiegues/skills --skill python-docstrings
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-docstrings
Source: https://github.com/leodiegues/skills/tree/main/skills/python-docstrings
Command: npx skills add https://github.com/leodiegues/skills --skill python-docstrings

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It solves the problem of missing, inconsistent, or poorly written docstrings in Python code by converting or adding clear Google-style documentation that makes your code easier to understand and reuse.

Core Features & Use Cases

  • Google-style docstring generation and improvement: Add, fix, or upgrade docstrings for modules, classes, and functions.
  • Docstring style conversion: Convert existing docstrings from NumPy, Sphinx/reST, or epydoc into Google convention while preserving meaning.
  • Framework-aware documentation patterns: Uses specialized approaches for common Python ecosystem cases like FastAPI endpoints and data models (e.g., dataclasses/Pydantic-style fields).

Quick Start

Use the python-docstrings skill to add or convert Google-style docstrings for a specific Python file or an entire package you point it to.

Frequently Asked Questions about python-docstrings

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

FAQPage Schema
How do I convert NumPy or Sphinx docstrings to Google style in Python?

To convert NumPy or Sphinx docstrings to Google style, the skill automatically restructures existing documentation into Google convention while preserving the original meaning. It handles classes, functions, and modules for consistent Python codebase formatting.

How do I generate Google style docstrings for FastAPI endpoints?

Generating Google style docstrings for FastAPI endpoints is handled using framework-aware patterns. The skill applies specialized approaches like markdown descriptions for endpoints and inline attribute docstrings for Pydantic-style data models.

What is the best way to add missing docstrings to an entire Python package?

The best way to add missing docstrings to an entire Python package is to point the skill at the target directory. It iterates through modules, classes, and methods, generating clear Google-convention documentation to make the codebase easier to read.

Can I use this to prepare my Python code for Sphinx or MkDocs documentation?

Yes, you can use this to prepare Python code for Sphinx or MkDocs. The generated Google-style docstrings are compatible with these tools, ensuring your module, class, and function documentation is properly formatted for static site generation.

Does the Google style docstring generation preserve existing accurate documentation?

Yes, Google style docstring generation preserves existing accurate documentation. When upgrading or converting docstrings from other styles, the skill maintains the original meaning and consistent language selection without overwriting valid information.