docstring
Write PyTorch Docstrings with Project Conventions
PyTorch docstrings require precise reStructuredText, tensor notation, and project conventions. This skill guides consistent signatures, arguments, cross-references, formulas, warnings, and examples.
Install with my Agent
Copy this request to your Agent. It includes the canonical Skill page and manifest.
Review the Skillstore skill "docstring" from https://skillstore.io/skills/pytorch-docstring.md and its manifest at https://skillstore.io/api/skills/pytorch-docstring/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.Your Agent should still show its plan and request any confirmation required by the security policy.
Agent-readable resources
Use these links when an AI agent, crawler, or script needs clean context instead of reading the full page.
Test it
Using "docstring". Document a tensor normalization function with input, dimension, epsilon, and return value.
Expected outcome:
A PyTorch-style docstring with the signature, behavior summary, typed arguments, defaults, return shape, Sphinx references, and an example.
Using "docstring". Improve an existing convolution docstring that lacks shape details and warnings.
Expected outcome:
A revised docstring with LaTeX tensor shapes, accurate defaults, cross-references, an important caveat, and a focused usage example.
Using "docstring". Document native, in-place, and alias variants of one operation.
Expected outcome:
Consistent entries where the native function is complete, the in-place variant references its method, and the alias points to the original function.
Security Audit
SafeAll 102 static findings are false positives. Backticks are Markdown fences, inline code, or Sphinx roles and do not invoke a shell. The URLs are documentation citations, and the reconnaissance detections are ordinary prose with no discovery behavior.
Risk Factors
โ๏ธ External commands (50)
๐ Network access (2)
Share & cite this report
Share the versioned assessment report, neutral badge, embed card, and citations. Skillstore reports evidence without deciding whether this Skill is safe.
Copy report link
https://skillstore.io/skills/pytorch-docstring/audits/9?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown badge
[](https://skillstore.io/skills/pytorch-docstring?utm_source=security_passport_badge)HTML badge
<a href="https://skillstore.io/skills/pytorch-docstring?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/pytorch-docstring/security.svg" alt="Skillstore security assessment" loading="lazy"></a>Embed card
<iframe src="https://skillstore.io/embed/skills/pytorch-docstring.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>Academic citations (APA ยท BibTeX ยท CFF)
APA citation
pytorch. (2026). docstring security audit report (audit version 9) [Author version unspecified]. Skillstore. https://skillstore.io/skills/pytorch-docstring/audits/9BibTeX citation
@techreport{pytorch-pytorch-docstring-2026,
author = {pytorch},
title = {docstring security audit report (audit version 9)},
institution = {Skillstore},
year = {2026},
number = {9},
url = {https://skillstore.io/skills/pytorch-docstring/audits/9},
note = {Author version unspecified}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "docstring security audit report (audit version 9)"
version: "unspecified"
type: report
authors:
- name: "pytorch"
date-released: "2026-07-23"
url: "https://skillstore.io/skills/pytorch-docstring/audits/9"
identifiers:
- type: other
value: "skillstore:pytorch-docstring:audit:9"
description: "Skillstore immutable audit report identifier"
Skillstore Score
Why this score Evidence Confidence: HighWhat You Can Build
Document a New PyTorch API
Create a complete project-style docstring for a new tensor function or method.
Standardize Existing Documentation
Update inconsistent docstrings with accurate sections, formatting, references, and examples.
Review Documentation Changes
Check proposed docstrings against PyTorch structure, syntax, and consistency expectations.
Try These Prompts
Write a PyTorch-style docstring for this function: {function}. Include the signature, a brief description, Args, Returns, and one example.Update this docstring to follow PyTorch reStructuredText conventions: {docstring}. Preserve behavior and add accurate types, defaults, and Sphinx cross-references.Document this tensor operation: {implementation}. Include shape notation, applicable math, edge-case warnings, return details, and executable-style examples.Review these related APIs and produce consistent PyTorch docstrings: {apis}. Handle native, C-bound, in-place, and alias variants appropriately.Best Practices
- Provide the implementation, signature, defaults, and expected tensor shapes before requesting a docstring.
- Verify examples, cross-references, formulas, and behavioral claims against the current PyTorch source.
- Use raw docstrings and preserve consistent reStructuredText indentation and inline markup.
Avoid
- Do not invent parameter behavior, return shapes, defaults, or supported data types.
- Do not copy generic Python docstring formats that conflict with PyTorch conventions.
- Do not add long examples or repeated explanations that obscure the API contract.