pydoc-pipeline

Generate Markdown API documentation from Python source code using AST parsing.

6|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/thensls/nsls-builder-toolkit --skill pydoc-pipeline
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pydoc-pipeline
Source: https://github.com/thensls/nsls-builder-toolkit/tree/main/skills/pydoc-pipeline
Command: npx skills add https://github.com/thensls/nsls-builder-toolkit --skill pydoc-pipeline

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Remove the tedious manual work of writing API documentation and docstrings by automatically extracting public APIs from Python code and producing ready-to-use Markdown docs and examples.

Core Features & Use Cases

  • Scans a repository with Python's AST to inventory modules, public classes, functions, and constructor signatures.
  • Generates Google-style docstrings for missing public items, classifies self-documenting or intentionally undocumented code, and optionally writes docstrings back to source files.
  • Builds a docs/ directory with three markdown files: a package overview (README), a complete API reference organized by module, and runnable usage examples; ideal for handoffs, releases, and onboarding new maintainers.
  • Use case: convert a library lacking documentation into a developer-facing docs/ folder and add concise docstrings for newly added public APIs.

Quick Start

Generate documentation for the current Python package, adding Google-style docstrings to missing public symbols and creating docs/README.md, docs/api-reference.md, and docs/examples.md.

Frequently Asked Questions about pydoc-pipeline

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

FAQPage Schema
How do I auto-generate Python API documentation from source code?

To auto-generate Python API documentation, parse the source code using AST to extract public APIs, signatures, and class hierarchies, then output Markdown files for the docs directory. This process extracts docstrings and constructs usage examples automatically.

Can I generate Google-style docstrings for Python functions that are missing them?

Yes, you can generate Google-style docstrings for missing public items by analyzing Python AST structures. The tool classifies undocumented code and optionally writes the generated docstrings back into the original source files.

How do I create a Markdown API reference for a Python package?

Creating a Markdown API reference involves scanning the Python package to inventory modules and public classes, then organizing the extracted signatures and docstrings into a structured markdown file within a docs directory.

Does Python AST parsing for documentation skip test files and generated code?

Yes, when using AST parsing to inventory public APIs, the process explicitly skips test files and generated code to ensure the documentation only targets the functional public API.

What is the best way to extract public class hierarchies and constructor signatures in Python?

The best way to extract class hierarchies and constructor signatures is using Python AST parsing, which inventories public classes and functions to build a comprehensive API reference and usage examples.

What files are generated when building Python API docs from source?

Building Python API docs generates three Markdown files in a docs directory: a package overview README, a complete API reference organized by module, and a runnable usage examples file for onboarding.