The PyTorch Docstring Formatter skill equips Claude with the specific expertise needed to write, update, and maintain high-quality documentation within the PyTorch ecosystem. It enforces strict adherence to official conventions, including the use of raw strings for LaTeX compatibility, precise function signature formatting, and structured sections for mathematical formulas, arguments, and return types. By automating complex patterns like Sphinx cross-referencing and C-bound function documentation, this skill ensures that your machine learning code remains professional, readable, and compatible with automated documentation generators.
Key Features
01Template support for C-bound functions and in-place variants
02Standardized type-annotated Args and Returns sections
03Cross-referencing for PyTorch classes, methods, and attributes
04Automated Sphinx/reStructuredText (reST) formatting
0589 GitHub stars
06LaTeX mathematical formula support via math directives