python-code-documentation-guidelines

Enforce Google-style docstrings and inline comments in Python code.

5|3|Updated Jun 18, 2024
One-click install
npx skills add https://github.com/Unique-AG/ai --skill python-code-documentation-guidelines
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-code-documentation-guidelines
Source: https://github.com/Unique-AG/ai/tree/main/.claude/skills/python-code-documentation-guidelines
Command: npx skills add https://github.com/Unique-AG/ai --skill python-code-documentation-guidelines

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill standardizes Python documentation by enforcing Google-style docstrings and clear inline comments for new or touched code, reducing ambiguity and onboarding time.

Core Features & Use Cases

  • Enforce Google-style docstrings for functions, methods, and modules (Args, Returns, Raises with types).
  • Require class docstrings that describe the class's responsibility, not just its name.
  • Promote clear comments and concise single-line docstrings to enhance readability.
  • Provide guidance for TODOs related to renames with a reference to UN-17829 when appropriate.

Quick Start

Apply Google-style docstrings and inline comments to new or touched Python files.

Frequently Asked Questions about python-code-documentation-guidelines

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

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

To enforce Google-style docstrings in Python, apply this skill during development to automatically require Args, Returns, Raises, and type information for new or updated functions, classes, and modules.

What should a Python class docstring include for code quality?

A Python class docstring should describe the class's specific responsibility and role, not just restate the class name, ensuring better clarity and reduced onboarding time for maintainability.

How do I add TODO comments for Python code renames?

Add TODO comments for Python code renames by including a tracker reference to UN-17829 when appropriate, ensuring renames are documented and tracked during development.

Does this Python documentation guideline apply to existing code or only new files?

These Python documentation guidelines apply to both new files and touched code, enforcing Google-style docstrings and clear inline comments whenever you add or update functions, classes, or modules.

What is the best way to standardize Python inline comments and documentation?

The best way to standardize Python documentation is enforcing Google-style docstrings alongside concise inline comments, reducing ambiguity and improving readability for new or modified Python code.