Search Skills

Search for skills or navigate to categories

SkillforthatSkillforthat
Writing
D

docstring

Write docstrings for PyTorch functions and methods following PyTorch conventions.

Category

Writing

Author

pytorch

Updated

Jan 2026

Tags

5

Install Command

claude skill add pytorch/pytorch

Description

This skill describes how to write docstrings for functions and methods in the PyTorch project, following the conventions in `torch/_tensor_docs.py` and `torch/nn/functional.py`. Key guidelines include using raw strings for all docstrings, following Sphinx/reStructuredText format, ensuring documentation is concise but complete, including examples, and using cross-references to related functions and classes.

Tags

PyTorchdocumentationdocstringSphinxreStructuredText

Information

Developerpytorch
CategoryWriting
CreatedJan 15, 2026
UpdatedJan 15, 2026

You Might Also Like