docstring-format

Enforce Google-style docstrings for Python functions and classes.

2|Updated Nov 13, 2025
One-click install
npx skills add https://github.com/ricardoroche/ricardos-claude-code --skill docstring-format
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docstring-format
Source: https://github.com/ricardoroche/ricardos-claude-code/tree/main/.claude/skills/docstring-format
Command: npx skills add https://github.com/ricardoroche/ricardos-claude-code --skill docstring-format

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill encourages and enforces Google-style docstrings with standard sections for all functions and classes, improving readability and maintainability.

Core Features & Use Cases

  • Standard Function Docstring: Document parameters, returns, and errors clearly.
  • Async Function with Security Note: Include async examples with security considerations.
  • Class Docstring: Describe repository interfaces and usage.
  • Property Docstring: Document getters/setters with usage notes.

Quick Start

In the attached file 'module.py', ensure the function calculate_total has a Google-style docstring with Args, Returns, and Examples.

Frequently Asked Questions about docstring-format

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

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

Google-style docstrings document functions with structured sections for Args, Returns, Raises, and Examples. This Skill automatically enforces and formats these sections across standard functions, async functions, class methods, and properties, ensuring consistency and readability throughout your codebase.

What sections should a Google-style docstring include?

Google-style docstrings require Args (parameters), Returns (output), Raises (exceptions), Examples (usage), and Security Note sections where applicable. This Skill validates that each section is present, correctly formatted with proper type hints, and follows Google's documentation standards for Python code.

Can I automatically enforce docstring standards across an entire Python codebase?

Yes. This Skill applies Google-style docstring enforcement to all functions, async functions, class methods, and properties in your code, validating section presence and format automatically. It integrates with tooling to auto-format docstrings and generate consistent documentation artifacts across your entire project.

Do I need to manually format docstrings for async functions and security considerations?

No. This Skill handles async functions with built-in support for Security Note sections, automatically formatting examples and requirements for async code. It ensures type hints and section structure are correct without manual intervention.

Why should I standardize docstrings with Google style?

Standardized Google-style docstrings improve code readability, maintainability, and team collaboration by ensuring consistent parameter documentation, return values, and error handling across all functions and classes. Automated enforcement prevents documentation drift and gaps.

Does this work with class properties and getters/setters?

Yes. This Skill enforces Google-style docstrings on class properties, including getters and setters, documenting their purpose, usage notes, and return types with the same standardized format applied to functions and methods.