# Docstring

Document a Python module and its classes using Google style

- Repository: https://github.com/pipecat-ai/pipecat (16982 stars)
- Category: Engineering
- License: BSD-2-Clause
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add pipecat-ai/pipecat --skill docstring -g -a claude-code -y`
Codex: `npx skills add pipecat-ai/pipecat --skill docstring -g -a codex -y`
Cursor: `npx skills add pipecat-ai/pipecat --skill docstring -g -a cursor -y`
Gemini CLI: `npx skills add pipecat-ai/pipecat --skill docstring -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add pipecat-ai/pipecat`

## Description

Document a Python module and its classes using Google style

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

Document a Python module or class using Google-style docstrings following project conventions. The argument can be a class name or a module path.

## Instructions

1. Determine what to document based on the argument:

   **If a module path is provided** (e.g. `src/pipecat/audio/vad/vad_analyzer.py`):
   - Use that file directly

   **If a class name is provided** (e.g. `VADAnalyzer`):
   - Search for `class ClassName` in `src/pipecat/`
   - If multiple files contain that class name, list all matches with their file paths, ask the user which one they want to document, and wait for confirmation

2. Once the file is identified, read the module to understand its structure:
   - Identify all classes, functions, and important type aliases
   - Understand the purpose of each component

4. Apply documentation in this order:
   - Module docstring (at top, after imports)
   - Class docstrings
   - `__init__` methods (always document constructor parameters)
   - Public methods (not starting with `_`)
   - Dataclass/config classes with field descriptions

5. Skip documentation for:
   - Private methods (starting with `_`)
   - Simple dunder methods (`__str__`, `__repr__`, `__post_init__`)
   - Very simple pass-through properties
   - **Already documented code** - If a class, method, or function already has a complete docstring that follows the project style, do not modify it. A docstring is complete if it has:
     - A one-line summary
     - Args section (if it has parameters)
     - Returns section (if it returns something meaningful)
   - Only add or improve documentation where it is missing or incomplete

## Module Docstring Format

```python
"""[One-line description of module purpose].

[Optional: Longer explanation of functionality, key classes, or use cases.]
"""
```

Example:
```python
"""Neuphonic text-to-speech service implementations.

The rest: https://github.com/pipecat-ai/pipecat/blob/HEAD/.claude/skills/docstring/SKILL.md
