Official agent skill

Docstring

by NVIDIA in NVIDIA/structured-data-models

Write or review docstrings for public modules, classes, and functions in sdm/.

OfficialApache-2.0Auto-check passedDevelopment

Install Docstring

skills CLI
$ npx skills add NVIDIA/structured-data-models --skill docstring -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install NVIDIA/structured-data-models docstring --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/NVIDIA/structured-data-models.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/docstring .claude/skills/docstring && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
docstring
GitHub stars
310
Token cost
~1.2k tokens
SKILL.md length
341 words
Files
1
Skills in repo
3
Repo updated
First seen
Licence
Apache-2.0

At a glance

Write or review docstrings for public modules, classes, and functions in sdm/.

  • Reviewing docstrings to follow repo best practices (Args sections
  • SKILL.md covers General Principles, Example, Sphinx Cross-Referencing… and Verification
  • Calls uv; reaches arxiv.org and docs.pytorch.org
  • Paper citations

What it does

Docstring is an agent skill from NVIDIA/structured-data-models, published by the product's own GitHub organization. Write or review docstrings for public modules, classes, and functions in sdm/. Use when adding or reviewing docstrings to follow repo best practices (Args sections, paper citations, tensor shape notation).

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Technical documentation. The repository describes itself as: Foundation Models for Structured Data. The licence is Apache-2.0.

When your agent uses it

  • Reviewing docstrings to follow repo best practices (Args sections
  • Paper citations
  • Tensor shape notation)

Example prompts

  • “/docstring”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 2be5e60. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • uv

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • arxiv.org
    • docs.pytorch.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Docstring loads about 1.2k tokens when it runs. Until then it costs about 54 tokens; SKILL.md has 341 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~54
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from NVIDIA/structured-data-models at commit 2be5e60, republished under its Apache-2.0 licence (© NVIDIA). 341 words, ~1,233 tokens.

Download SKILL.mdSave it as .claude/skills/docstring/SKILL.md (or your agent's skills folder).
name
docstring
description
Write or review docstrings for public modules, classes, and functions in sdm/. Use when adding or reviewing docstrings to follow repo best practices (Args sections, paper citations, tensor shape notation).

Docstring Writing and Reviewing Guide

Use this when writing or reviewing docstrings for public modules, classes, and functions in sdm/. Follow these best practices up front to keep docstrings consistent across the codebase.

General Principles

  • Keep docstrings as minimal as possible and avoid documenting implementation details.
  • Do not add module-level docstrings to individual modules; keep only a short package summary in the package __init__.py.
  • Every public class and function has a docstring, a one-line summary, then an Args: section.
  • When a class or function implements functionality proposed in an academic paper, cite it in the first sentence of its docstring.
  • Document every public parameter, especially, constructor parameters. Document them in the class docstring's Args:, not in __init__.
  • Use r"""...""" whenever the docstring contains math, LaTeX, or backslashes (e.g., a .. math:: block).
  • Describe tensor parameters with their shape in double-backtick notation, using a leading ... for the batch dimensions (e.g., [..., S, H, C]). Spell out each remaining dimension letter, and keep the notation consistent across related processors/modules.
  • If splitting a long line leads to a line-too-long error, put # noqa: <code> to ignore the error.
  • Document non-obvious behavior: implicit caps, defaults, transformations, or side effects that affect results. If it would surprise a caller, state it.
  • Do not add docstrings to methods that already have one in superclass's methods even if the class/methods are public. For example, Processor.transform() already has a general docstring that's applicable to its subclasses. In this case, put a comment # noqa: D102 to ignore the linter error.

Example

python
class MyClass:
    r"""My Class from the `"My Paper" <https://arxiv.org/abs/2602.11139>`_ paper.

    .. math::

        y = \frac{x}{\sqrt{d}}

    Args:
        fill_value: Value written into masked positions. Capped at ``1.0``;
            larger values are silently clamped.
    """

    def __init__(self, fill_value: float) -> None:
        ...

    def forward(self, x: Tensor) -> Tensor:
        """Normalize ``x`` along its last dimension.

        Args:
            x: Input tensor with shape ``[..., S, C]``.

        Returns:
            Tensor with shape ``[..., S, C]``.
        """

    def citation(self) -> str:
        """Return the key from :func:`sdm.refs.resolve_default_citation_key`."""  # noqa: E501

Sphinx Cross-Referencing Reference

The same roles resolve internal sdm targets and external ones. Prefer cross-reference roles over plain literals, e.g.,

python
""":class:`pandas.DataFrame`"""

over

python
"""``pandas.DataFrame``"""

whenever the target lives in an intersphinx-mapped project (python, torch, numpy, pandas, pyarrow, cudf, typing_extensions; see intersphinx_mapping in docs/source/conf.py).

python
r"""
- :mod:`sdm.nn`: Module reference.
- :class:`~sdm.nn.Module`: Class reference. External targets use the same
  role: :class:`pandas.DataFrame`, :class:`torch.nn.Module`, :class:`dict`,
  :class:`TypeError`, :class:`collections.abc.Mapping`.
- :class:`~pyarrow.Array`: Leading ``~`` renders only ``Array``. Use it in
  summary lines; keep the full path in ``Args:`` entries.
- :meth:`~sdm.nn.Module.forward`: Method reference.
- :func:`torch.nn.functional.scaled_dot_product_attention`: Function
  reference. Use :func: for free functions and :meth: only for methods.
- :attr:`attribute`: Attribute reference.
- :math:`equation`: Inline math.
- :ref:`label`: Internal label reference.
- :ref:`calling convention <torch-dispatch-calling-convention>`: External
  label reference with custom link text, resolved through intersphinx.
- :external+torch:ref:`torch.int32 <dtype-doc>`: Label reference pinned to a
  specific project's inventory. Use for targets without their own API entry
  (e.g., dtypes like ``torch.int32`` resolve to the ``dtype-doc`` label).
  Never guess label names: search the linked documentation for a fitting
  target by dumping the project's inventory, e.g.
  ``uv run --no-default-groups --group doc python -m sphinx.ext.intersphinx https://docs.pytorch.org/docs/stable/objects.inv | grep -i dtype``.
"""

Verification

Run uv run ruff check. This is a structural backstop only: it flags missing public class/method/function docstrings, capitalization, end punctuation, r""" for backslashes, and Args:/signature mismatches. It does not require an Args: section to exist, or verify citations, shape notation, or behavior notes — confirm those by hand against the principles above.

© NVIDIA, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/docstring of NVIDIA/structured-data-models.

Open the folder on GitHubat commit 2be5e60

Compare with similar skills

Docstring next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Docstring compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Docstring this skillNVIDIA/structured-data-models310—~1.2kAutomated safety check: PassApache-2.0
Diagram Designcathrynlavery/diagram-design44k1 repos~7.5kAutomated safety check: PassMIT
Simple Englishmoeru-ai/airi50k2 repos~4.6kAutomated safety check: PassMIT
Get API Docs with chubandrewyng/context-hub14k2 repos~775Automated safety check: PassMIT
Doc SyncJetBrains/ideavim10k2 repos~2.6kAutomated safety check: PassMIT
Mailspring App ScreenshotsFoundry376/Mailspring18k—~1.4kAutomated safety check: PassGPL-3.0

Similar skills

  • Diagram Design

    cathrynlavery/diagram-design

    Creates branded diagrams, from architecture, flowchart and sequence to charts and maps, as self-contained HTML with inline SVG, with import from draw.io, Mermaid and Excalidraw.

    44k GitHub starsUsed in 1 repo~7.5k tokens
    DevelopmentAuto-check passed
  • Simple English

    moeru-ai/airi

    Write or rewrite technical text with the rules of ASD-STE100 Simplified Technical English so it is clear, unambiguous, and free of AI slop.

    50k GitHub starsUsed in 2 repos~4.6k tokens
    DevelopmentAuto-check passed
  • Get API Docs with chub

    andrewyng/context-hub

    Fetches current documentation for third-party APIs and SDKs with the chub CLI before the agent writes code against them, instead of relying on remembered API shapes.

    14k GitHub starsUsed in 2 repos~775 tokens
    DevelopmentAuto-check passed
  • Doc Sync

    JetBrains/ideavim

    Official

    Keeps IdeaVim documentation in sync with code changes. An agent skill from JetBrains/ideavim.

    10k GitHub starsUsed in 2 repos~2.6k tokens
    DevelopmentAuto-check passed
  • Mailspring App Screenshots

    Foundry376/Mailspring

    Captures screenshots of the running Mailspring dev app for docs, PRs or visual checks by launching it with a debugging port, driving the UI and clipping to an element.

    18k GitHub stars~1.4k tokensUpdated today
    DevelopmentAuto-check passed
  • Draw.io Diagram Studio

    Agents365-ai/drawio-skill

    Creates and edits editable draw.io diagrams from descriptions, code, infrastructure files, SQL and API schemas, with sync, review, test and export tools.

    10k GitHub stars~2.4k tokensUpdated 5 days ago
    DevelopmentAuto-check: notes

More from NVIDIA/structured-data-models

  • Processor Development

    NVIDIA/structured-data-models

    Official

    Create or modify reusable SDM processors and focused tests. An agent skill from NVIDIA/structured-data-models.

    310 GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Recipe Development

    NVIDIA/structured-data-models

    Official

    Compose or restructure SDM model recipes. An agent skill from NVIDIA/structured-data-models.

    310 GitHub stars~156 tokensUpdated today
    Auto-check passed

Categories

Questions about Docstring

What does Docstring do?

Write or review docstrings for public modules, classes, and functions in sdm/. Docstring is an agent skill from NVIDIA/structured-data-models, published by the product's own GitHub organization. Write or review docstrings for public modules, classes, and functions in sdm/.

When should I use Docstring?

Docstring fits situations like: reviewing docstrings to follow repo best practices (Args sections; paper citations; tensor shape notation).

How do I install Docstring in Claude Code?

Run `npx skills add NVIDIA/structured-data-models --skill docstring -a claude-code`. Or copy the skill folder (.agents/skills/docstring in NVIDIA/structured-data-models) into .claude/skills/docstring in your project. Claude Code loads it when a task matches its description.

How do I install Docstring in Codex?

Run `npx skills add NVIDIA/structured-data-models --skill docstring -a codex`. Or copy the skill folder (.agents/skills/docstring in NVIDIA/structured-data-models) into .agents/skills/docstring in your project. Codex loads it when a task matches its description.

Can I use Docstring in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add NVIDIA/structured-data-models --skill docstring -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/docstring, .gemini/skills/docstring, .github/skills/docstring and .opencode/skills/docstring in your project.

What does Docstring need to run?

Going by SKILL.md and its folder, Docstring needs the command-line tools its instructions call (uv). Our summary lists: Python 3.

Does Docstring access the network?

SKILL.md names 2 domains. In commands or code: arxiv.org and docs.pytorch.org; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.

Is Docstring safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Docstring use?

Docstring is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Docstring use?

About 1.2k tokens (SKILL.md is roughly 4.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Docstring?

Skills that share tags, products or a category with Docstring: Diagram Design (cathrynlavery/diagram-design, 44k stars), Simple English (moeru-ai/airi, 50k stars), Get API Docs with chub (andrewyng/context-hub, 14k stars) and Doc Sync (JetBrains/ideavim, 10k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Docstring?

NVIDIA (a GitHub organization, an official publisher) maintains it in NVIDIA/structured-data-models, which has 310 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on October 7, 2026.

Source: NVIDIA/structured-data-models on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.