python-package-documentation

Generates docstrings, cross-references, and shared parameter documentation for Python packages.

Updated Apr 20, 2026
One-click install
npx skills add https://github.com/MLVisions/agentbuilder_py --skill python-package-documentation-mlvisions
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: python-package-documentation
Source: https://github.com/MLVisions/agentbuilder_py/tree/main/.github/skills/python-package-documentation
Command: npx skills add https://github.com/MLVisions/agentbuilder_py --skill python-package-documentation-mlvisions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Maintaining consistent, non-redundant documentation across a growing Python package is difficult: docstrings drift out of sync with signatures, parameter descriptions get copy-pasted, and related functions end up scattered across docs pages. This Skill provides structured patterns and a checklist to keep package documentation consistent and complete. ## Core Features & Use Cases - Docstring Patterns: Templates for public functions, internal helpers, classes with __repr__/to_dict, and functions sharing many parameters. - Redundancy Reduction: Guidance on reusing shared parameter docs, cross-referencing related functions with See Also sections, and grouping related APIs on one docs page. - Documentation Workflow: An eight-step workflow from writing the function to building docs with mkdocs and verifying with pytest doctest checks. - Use Case: When adding a new exported function like new_rag_tool to a package, apply the shared-parameter pattern from _base_tool, add cross-references to sibling functions, and validate the docs build renders correctly. ## Quick Start Document the new function I just added to this Python package following the project docstring style, reusing shared parameter docs and adding cross-references to related functions.

Frequently Asked Questions about python-package-documentation

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

FAQPage Schema
How do I write docstrings for Python package functions?▼

Write a concise summary line, then document parameters, return values, and raised exceptions following your project's style (Google, NumPy, or Sphinx). Add a See Also section cross-referencing related functions and include runnable examples where possible.

How to avoid repeating parameter documentation across Python functions?▼

Define shared parameter docs once in a base function or template, then reference them in related functions with a note like "Parameters are the same as base_function, plus extra." This keeps signatures documented without duplicating descriptions.

Should related Python functions be documented on one page?▼

Yes, grouping related functions such as new_config, load_config, and save_config on a single docs page improves discoverability and reduces navigation overhead. Add explicit cross-references so users can move between related APIs.

How do I check that Python documentation stays in sync with code?▼

Run pytest with doctest or docs-related test selection to catch undocumented parameters, invalid examples, and signatures that drifted from their docstrings. Also build the docs site with mkdocs and review the rendered API pages.

How should internal helper functions be documented in Python?▼

Mark internal helpers with a leading underscore and state in the docstring that they are internal API, not part of the public interface. This signals to users and docs generators that the function is not a stable public contract.