"Provides structured guidelines for writing PEP-257 Google-style Python docstrings and detailed JSDoc comments."
Install
npx skillscat add cmsfornerd/cmsfornerd2/docstring Install via the SkillsCat registry.
Docstring & API Reference Standard Skill (docstring)
The docstring skill enforces function-level, module-level, and API reference documentation standards across Python, JavaScript, and TypeScript codebases.
Operational Standards
Python Docstrings (PEP-257 & Google Style):
- Include raw strings (
r"""...""") when LaTeX math or backslashes are present. - Every public module, function, and class must declare
Args,Returns,Raises, andExamplesections where appropriate. - Explain function intent, contracts, side effects, and failure modes rather than repeating code line-by-line.
- Include raw strings (
TypeScript & JavaScript JSDoc Comments:
- Provide file header
@fileoverview JSDoc comments for all scripts. - Annotate all exported functions with
@param,@returns, and@throws.
- Provide file header
Code Example Hygiene:
- Ensure provided docstring code examples are tested, valid, and reproducible.
FAQs
When should raw docstrings (r"""...""") be used?
Use raw triple-quoted strings whenever docstrings contain backslashes, regular expressions, or LaTeX notation.
Can this skill be used for non-PyTorch / non-Python languages?
Yes, while inspired by PyTorch and Google Python conventions, the core principles apply to JSDoc (JavaScript/TypeScript) and function comment standards.
Deep State of Mind (DSOM) For My AI Protocol | Harisfazillah Jamel (LinuxMalaysia) | 2026-09-06
Standard: UK English | DBP-standard Bahasa Melayu Malaysia (Piawai) | GNU General Public License v3.0