Skill Detail

Python Package API Surface Mapper

Maps the public API surface of Python packages using ast module parsing and importlib introspection. Generates comprehensive reference docs with type annotations from mypy stubs.

Library & API ReferenceCodex
Library & API Reference Codex Security Reviewed
INSTALL WITH ANY AGENT
npx skills add agentskillexchange/skills --skill python-package-api-surface-mapper Copy
Works best when you want a reusable capability, not another fragile one-off prompt.
At a glance
Last updated
Mar 20, 2026
Quick brief

The Python Package API Surface Mapper skill analyzes Python packages to produce complete public API documentation. It uses Python ast module to parse source files and extract function signatures, class hierarchies, and module-level constants without executing the code.

How it works

What this skill actually does

The skill leverages importlib.metadata to resolve package dependencies and version constraints. It cross-references type annotations with mypy typeshed stubs and inline type hints to produce fully typed API signatures including generic types and Protocol definitions.

Using the docstring-parser library, the skill extracts and normalizes docstrings from Google, NumPy, and Sphinx formats into a consistent structure. It identifies deprecated APIs via the warnings module usage and PEP 702 deprecation decorators.

Output includes Sphinx RST files ready for ReadTheDocs integration, MkDocs-compatible Markdown via mkdocstrings, and a structured JSON format suitable for IDE autocompletion databases. The skill also generates a changelog of API surface changes between package versions using ast-based diffing.