---
name: "sphinx-python-autodoc-rtd"
description: "Automate Python package API documentation with Sphinx autodoc and Read the Docs theme."
metadata:
  author: "Sphinx Team"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "generate python api docs sphinx"
  - "configure sphinx autodoc"
  - "setup read the docs theme"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Sphinx Python autodoc & Read the Docs

Generates API reference portals directly from Python docstrings: sphinx-apidoc, autodoc, autosummary, intersphinx cross-package linking, and sphinx-rtd-theme styling.

## When to Invoke
Invoke this skill whenever you need to:
- generate python api docs sphinx
- configure sphinx autodoc
- setup read the docs theme

## Execution SOP & Rules
1. Run sphinx-quickstart to scaffold documentation directories and conf.py.
2. Enable autodoc and napoleon in extensions list to parse Google/NumPy docstring conventions.
3. Run sphinx-apidoc -o docs/api src/package_name to generate module .rst files.
4. Build HTML documentation using make html and inspect output in _build/html.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
