docstring
Helps write standardized, Sphinx-compliant docstrings for PyTorch-based functions and classes.
Install
mkdir -p .claude/skills/docstring && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/80" && unzip -o skill.zip -d .claude/skills/docstring && rm skill.zipInstalls to .claude/skills/docstring
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Write docstrings for PyTorch functions and methods following PyTorch conventions. Use when writing or updating docstrings in PyTorch code.Key capabilities
- →Write docstrings for PyTorch functions
- →Write docstrings for PyTorch methods
- →Follow PyTorch conventions for docstrings
- →Include function signatures in docstrings
- →Add mathematical formulas using Sphinx math directives
- →Link to related classes and functions using Sphinx roles
How it works
This skill guides the creation of docstrings for PyTorch functions and methods by detailing the required structure, formatting rules, and content elements such as function signatures, brief descriptions, mathematical formulas, and cross-references.
Inputs & outputs
When to use docstring
- →Documenting new custom PyTorch operations
- →Updating existing codebases to match PyTorch documentation style
- →Adding LaTeX math formulas to function docstrings
- →Generating consistent parameter and return type annotations
About docstring
Enforces PyTorch-specific documentation standards, including parameter definitions, return types, mathematical formatting with LaTeX, and cross-referencing to library components.
Write docstrings for PyTorch functions and methods following PyTorch conventions. Use when writing or updating docstrings in PyTorch code.
How it compares
This skill provides specific PyTorch docstring conventions, including raw strings and Sphinx/reStructuredText format, unlike generic documentation practices.
Compared to similar skills
docstring side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| docstring (this skill) | 8 | 1y | No flags | Beginner |
| hugging-face-paper-publisher | 6 | 10mo | Review | Intermediate |
| acestep-docs | 1 | 8mo | No flags | Beginner |
| mlops-collaboration | 1 | 10mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by pytorch
View all by pytorch →You might also like
hugging-face-paper-publisher
patchy631
Publish and manage research papers on Hugging Face Hub. Supports creating paper pages, linking papers to models/datasets, claiming authorship, and generating professional markdown-based research articles.
acestep-docs
ace-step
ACE-Step documentation and troubleshooting. Use when users ask about installing ACE-Step, GPU configuration, model download, Gradio UI usage, API integration, or troubleshooting issues like VRAM problems, CUDA errors, or model loading failures.
mlops-collaboration
fmind
Guide to prepare MLOps projects for sharing, collaboration, and community engagement.
hugging-face-evaluation
FISCFED9
Add and manage evaluation results in Hugging Face model cards. Supports extracting eval tables from README content, importing scores from Artificial Analysis API, and running custom model evaluations with vLLM/lighteval. Works with the model-index metadata format.
pr-draft-summary
openai
Create a PR title and draft description after substantive code changes are finished. Trigger when wrapping up a moderate-or-larger change (runtime code, tests, build config, docs with behavior impact) and you need the PR-ready summary block with change summary plus PR draft text.
releasenote
DataDog
Create or update release notes for changes in the current branch using Reno, following dd-trace-py's conventions and the guidelines in docs/releasenotes.rst.