docstring
CommunityGenerate perfect PyTorch docstrings, instantly.
Software Engineering#code quality#developer tools#documentation#pytorch#sphinx#docstring#restructuredtext
Authorlinjunhui
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill ensures that all PyTorch functions and methods have high-quality, consistent docstrings that adhere to project conventions, saving developers time and improving code readability and maintainability.
Core Features & Use Cases
- Convention Adherence: Guides the creation of docstrings following PyTorch's Sphinx/reStructuredText format, including raw strings and specific section ordering.
- Comprehensive Documentation: Ensures inclusion of function signatures, brief descriptions, mathematical formulas, cross-references, arguments, returns, and examples.
- Automated Formatting: Helps structure docstrings with correct indentation, Sphinx roles (e.g.,
:func:,:class:), and LaTeX math notation for tensor shapes. - Use Case: You've just implemented a new feature in PyTorch and need to document its public API. Instead of spending hours meticulously formatting the docstring and ensuring it meets all PyTorch standards, you use this Skill to generate a perfectly structured and formatted docstring, allowing you to focus on the code itself.
Quick Start
Write a PyTorch docstring for the my_new_function(input: Tensor, dim: int = -1) -> Tensor function, describing its purpose as applying a custom activation and providing an example.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: docstring Download link: https://github.com/linjunhui/cuda-learning/archive/main.zip#docstring Please download this .zip file, extract it, and install it in the .claude/skills/ directory.