python-documentation

Creates Google-style docstrings, Sphinx configuration, and ReadTheDocs setup for Python projects.

1|2|Updated Nov 25, 2017
One-click install
npx skills add https://github.com/asarchami/dotfiles --skill python-documentation-asarchami
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-documentation
Source: https://github.com/asarchami/dotfiles/tree/main/dot_config/opencode/skills/python/documentation
Command: npx skills add https://github.com/asarchami/dotfiles --skill python-documentation-asarchami

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires sphinx, furo, myst-parser, sphinx-copybutton.

What problem does it solve? Python projects often ship with missing or inconsistent documentation, making APIs hard to adopt and maintain. This Skill standardizes docstrings, README structure, and hosted documentation so every public function is documented and published. ## Core Features & Use Cases - Google-Style Docstrings: Templates covering Args, Returns, Raises, and Examples sections with type hints. - Sphinx Setup: Quick-start configuration using autodoc, napoleon, myst-parser, and the furo theme. - ReadTheDocs Publishing: Ready-to-use .readthedocs.yaml and pyproject.toml docs dependency group. - Use Case: You are preparing a Python package for PyPI release and need docstrings on all public functions, a Sphinx docs site, and automatic ReadTheDocs builds before publishing. ## Quick Start Generate Google-style docstrings for all public functions in my package and set up a Sphinx documentation site with ReadTheDocs configuration.

Frequently Asked Questions about python-documentation

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

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

Google-style docstrings use structured sections like Args, Returns, Raises, and Example after a one-line summary. Each parameter is documented with its name, type context, and description, and Sphinx parses them via the napoleon extension.

How to set up Sphinx documentation for a Python project?

Install sphinx, furo, myst-parser, and sphinx-copybutton, then run sphinx-quickstart to scaffold a docs directory. Enable sphinx.ext.autodoc and sphinx.ext.napoleon in conf.py so Google-style docstrings render into API reference pages.

Does Sphinx support Markdown files in documentation?

Yes, the myst-parser extension lets Sphinx parse Markdown files alongside reStructuredText. Add myst_parser to the extensions list in conf.py to include Markdown tutorials and guides in the built site.

How do I host Python docs on ReadTheDocs?

Add a .readthedocs.yaml file specifying the build OS, Python version, and Sphinx configuration path. Include a pip install step with the docs extra requirements so ReadTheDocs installs sphinx and theme dependencies during each build.

What should a Python package README include?

A README should contain a clear project description, installation instructions, a quick start code example, and a link to full documentation. Adding a PyPI version badge helps users confirm the package is published and current.