docstring

Documents Python modules and classes using Google-style docstrings.

14.0k|2.4k|Updated Dec 27, 2023
One-click install
npx skills add https://github.com/pipecat-ai/pipecat --skill docstring-pipecat-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docstring
Source: https://github.com/pipecat-ai/pipecat/tree/main/.claude/skills/docstring
Command: npx skills add https://github.com/pipecat-ai/pipecat --skill docstring-pipecat-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Documents a Python module and its classes using Google-style docstrings.

Core Features & Use Cases

  • Ensures module, class, and init docstrings follow Google-style guidelines.
  • Standardizes parameter and return value descriptions across a codebase.
  • Facilitates consistent, auto-generated documentation for Python projects.

Quick Start

Provide Google-style docstrings for a Python module containing its public classes and methods.

Frequently Asked Questions about docstring

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

FAQPage Schema
How do I add Google-style docstrings to my Python module?

Google-style docstrings document Python modules, classes, and methods with structured parameter and return value descriptions. Use this Skill to automatically generate consistent docstrings following Google conventions, ensuring all public classes and __init__ constructors include standardized inline documentation across your codebase.

What is the Google docstring format and why use it?

Google-style docstrings follow a readable format with sections for Args, Returns, and Raises, making inline documentation consistent and auto-parseable. This format standardizes parameter and return value descriptions across Python codebases, enabling automated documentation generation and improving code maintainability.

Can I enforce consistent docstrings across a multi-file Python project?

Yes. This Skill documents Python modules and their classes using Google-style docstrings, enforcing consistent parameter and return value descriptions across multi-file projects. It standardizes module, class, and method docstrings to align with your project's documentation standards.

How do Google-style docstrings improve auto-generated documentation?

Google-style docstrings structure parameter, return, and exception information in a parseable format that documentation generators can read directly. Standardizing these docstrings across your Python module enables automated documentation tools to produce consistent, complete reference docs from your inline code.

Do I need to document __init__ constructors separately?

No. This Skill enforces __init__ constructor docstrings as part of the class documentation, ensuring constructors receive the same Google-style parameter and return descriptions as other methods, maintaining consistency across your module's public interface.

What if my Python module already has partial documentation?

This Skill standardizes existing and missing docstrings to Google-style format across your module. It identifies gaps in module, class, and method documentation, then fills them with consistent parameter and return value descriptions aligned to your project's documentation standards.