docstring-format-enforcer

Generate and enforce canonical Python docstrings with validated parameter coverage.

7|Updated Nov 3, 2025
One-click install
npx skills add https://github.com/AIperture/aethergraph --skill docstring-format-enforcer
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: docstring-format-enforcer
Source: https://github.com/AIperture/aethergraph/tree/main/skills/docstring-format-enforcer
Command: npx skills add https://github.com/AIperture/aethergraph --skill docstring-format-enforcer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Teams struggle to keep docstrings consistent with real signatures, slowing maintenance and risking miscommunication.

Core Features & Use Cases

  • Enforce exact section order: Intro, Examples, Args, Returns, and Notes for all public docstrings.
  • Generate runnable examples and validate parameter coverage against function signatures.
  • Apply across APIs, facades, mixins, services, and contracts to ensure machine-readable, spec-aligned docs.
  • Use cases include code review automation, library onboarding, and API stability initiatives.

Quick Start

Run the tool on a Python module or function to rewrite its docstrings to the canonical template.

Frequently Asked Questions about docstring-format-enforcer

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

FAQPage Schema
How do I enforce a consistent Python docstring format across my codebase?▼

To enforce a consistent Python docstring format, apply a canonical template that validates exact section order, parameter coverage against signatures, and return types for all public functions. This ensures machine-readable documentation remains aligned with your actual function signatures.

What is the standard Python docstring section order for APIs and services?▼

The standard Python docstring section order for APIs and services is Intro, Examples, Args, Returns, and Notes. Enforcing this exact sequence ensures machine-readable, spec-aligned documentation across facades, mixins, and contracts.

How do I validate Python docstring parameters against function signatures?▼

Validating Python docstring parameters against function signatures requires checking that every argument in the signature has a corresponding entry in the Args section. This parameter coverage validation prevents miscommunication and simplifies library onboarding.

Can I automatically generate runnable Python docstring examples?▼

Yes, you can automatically generate runnable Python docstring examples by applying a canonical template to functions and methods. This rewrites existing documentation to include executable examples while validating parameter coverage and return types.

Does docstring-format-enforcer work for API stability and code review automation?▼

Docstring-format-enforcer works for API stability and code review automation by applying machine-readable, spec-aligned docstring templates across services and contracts. It validates signature coverage and notes deprecation behavior to maintain documentation consistency.

What are the limitations of enforcing canonical Python docstring templates?▼

Limitations of enforcing canonical Python docstring templates include strict adherence to a fixed section order of Intro, Examples, Args, Returns, and Notes, which may require rewriting existing custom documentation formats to achieve spec-aligned consistency.