ce-docstring-author

Generate NumPy-style docstrings for CE public APIs following STD-002 conventions.

78|15|Updated May 1, 2023
One-click install
npx skills add https://github.com/Moffran/calibrated_explanations --skill ce-docstring-author
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ce-docstring-author
Source: https://github.com/Moffran/calibrated_explanations/tree/main/.claude/skills/ce-docstring-author
Command: npx skills add https://github.com/Moffran/calibrated_explanations --skill ce-docstring-author

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates and standardizes the creation and repair of NumPy-style docstrings for CE public APIs, ensuring consistency with STD-002 and contributor guidelines.

Core Features & Use Cases

  • Write or repair NumPy-style docstrings for public CE symbols across modules and libraries.
  • Load templates and patterns from references/docstring_patterns.md to enforce CE-specific conventions.
  • Validate docstrings against the canonical order (Summary, Parameters, Returns, Raises, Notes, References, Examples) and provide guidance for improvements.

Quick Start

Provide a NumPy-style docstring for a public CE function, following the project conventions.

Frequently Asked Questions about ce-docstring-author

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

FAQPage Schema
How do I write NumPy-style docstrings for public API functions?

NumPy-style docstrings for public API functions are generated by enforcing canonical section ordering, including Summary, Parameters, Returns, Raises, Notes, References, and Examples, ensuring consistent structure and type annotations across modules.

What is the canonical section order for NumPy-style docstrings?

The canonical section order for NumPy-style docstrings is Summary, Parameters, Returns, Raises, Notes, References, and Examples. This structure ensures clear descriptions of parameters, return values, exceptions, and usage examples.

How do I fix and repair existing docstrings to follow a style guide?

To repair existing docstrings to follow a style guide, validate them against the canonical section order and contributor guidelines, then apply consistent structure, annotations, and CE-specific patterns to ensure standards compliance.

Can I use this to validate docstrings against contributor guidelines?

Yes, you can validate docstrings against contributor guidelines by checking for canonical section ordering, type annotations, and CE-specific patterns, receiving guidance for improvements where structure or examples are incomplete.

Does this approach work for standardizing API documentation across multiple modules?

Yes, standardizing API documentation across multiple modules is achieved by loading templates and patterns from references to enforce CE-specific conventions, ensuring consistent docstring structure and annotations throughout libraries.

What are the limitations of automating docstring generation?

Automating docstring generation is limited to public CE symbols and relies on provided references for CE-specific conventions. It cannot generate accurate descriptions without sufficient context about the function's parameters and return values.