docstring-conventions

Enforces Google-style docstring sections for Python functions, classes, methods, and modules.

Updated Nov 11, 2025
One-click install
npx skills add https://github.com/libertininick/chain-reaction --skill docstring-conventions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docstring-conventions
Source: https://github.com/libertininick/chain-reaction/tree/main/.claude/skills/docstring-conventions
Command: npx skills add https://github.com/libertininick/chain-reaction --skill docstring-conventions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a standardized approach to writing clear, consistent, and comprehensive Google-style docstrings across Python codebases, improving maintainability and onboarding.

Core Features & Use Cases

  • Guidelines: Enforces structure for docstrings of functions, classes, methods, and modules.
  • Quality Assurance: Helps teams enforce documentation standards during code reviews and CI.
  • Use Case: A developer adds missing Args/Returns sections to a new function to ensure clear usage examples and error handling.

Quick Start

Apply Google-style docstrings to Python code by following the guidelines in this Skill.

Frequently Asked Questions about docstring-conventions

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

FAQPage Schema
How do I enforce Google-style docstrings in Python code?

To enforce Google-style docstrings in Python code, apply structured guidelines to functions, classes, methods, and modules. Each public entity requires specific sections like Args, Returns, Raises, and Examples to improve readability and consistency.

What sections are required for Google-style Python docstrings?

Google-style Python docstrings require Args, Returns, Raises, and Examples sections for functions, and Attributes and Examples for classes. A concise module docstring is also required to ensure comprehensive documentation across the codebase.

Can I use this to enforce documentation standards during CI and code reviews?

Yes, you can use this approach to enforce documentation standards during CI and code reviews. Standardizing docstring structures for public entities ensures consistent code quality and smoother onboarding for development teams.

Does this approach apply to both functions and classes in Python?

Yes, this approach applies to both functions and classes in Python. It targets functions, classes, methods, and modules, requiring structured sections like Attributes for classes and Args or Returns for functions to maintain codebase consistency.

What is the best way to document Python modules for better onboarding?

The best way to document Python modules for better onboarding is to include a concise module docstring alongside structured guidelines for all public functions and classes, ensuring clear usage examples and consistent error handling documentation.

Why do I need structured docstrings in my Python codebase?

You need structured docstrings in your Python codebase to improve readability, consistency, and onboarding. Standardizing sections like Args, Returns, and Raises provides clear usage examples and error handling for public entities.