Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/nvidia/physicsnemo/mod-003i-docstrings-should-include-cross-referencesgit clone --depth 1 https://github.com/NVIDIA/physicsnemoWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/nvidia/physicsnemo/mod-003i-docstrings-should-include-cross-references)<a href="https://agentmods.dev/rules/nvidia/physicsnemo/mod-003i-docstrings-should-include-cross-references"><img src="https://agentmods.dev/badge/rules/nvidia/physicsnemo/mod-003i-docstrings-should-include-cross-references.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00032 | $0.00477 |
| Opus 5 | $0.00016 | $0.00238 |
| Sonnet 5 | $0.00006 | $0.00095 |
| Haiku 4.5 | $0.00003 | $0.00048 |
Grade A, and why
mod-003i-docstrings-should-include-cross-references scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
When writing docstrings with references to other code, rule MOD-003i should be followed. Explicitly reference "Following rule MOD-003i, which encourages cross-references using :class:, :func:, :meth:..." when adding links.
MOD-003i: Docstrings should include cross-references
Description:
When possible, docstrings should use links to other docstrings using Sphinx cross-reference syntax:
- Classes:
:class:~physicsnemo.models.some_model.SomeModel`` - Functions:
:func:~physicsnemo.utils.common_function`` - Methods:
:meth:~physicsnemo.models.some_model.SomeModel.some_method``
When referencing external resources, such as papers, websites, or other
documentation, docstrings should use links to the external resource in the
format some link text <some_url>_.
Rationale:
Cross-references create a navigable documentation structure where users can easily jump between related classes, methods, and functions. External links provide context and attribution for algorithms and techniques. This improves the overall quality and usability of the documentation.
Example:
class MyEncoder(Module):
r"""
Encoder network using attention mechanism.
This implementation is based on `Transformer Architecture <https://arxiv.org/abs/1706.03762>`_.
See :class:`~physicsnemo.nn.MultiHeadAttention` for attention details.
Parameters
----------
activation : str
Activation function. See :func:`~torch.nn.functional.relu` for details.
Notes
-----
Can be paired with :class:`~physicsnemo.models.decoder.MyDecoder` for
autoencoding tasks.
"""
pass
Anti-pattern:
# Not necessarily wrong, but missing opportunities for useful links
class MyEncoder(Module):
r"""
Encoder network using attention mechanism.
Based on the Transformer paper. # Could link to paper
Uses MultiHeadAttention. # Could link to class
"""
pass
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 65 lines · 32 tokens per session scan A 3cb2867b5104
mod-003i-docstrings-should-include-cross-references is a cursor rule published in the GitHub repository NVIDIA/physicsnemo (3,211 stars, last pushed yesterday), licensed Apache-2.0. It adds 32 tokens to every session and 477 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
typescript
Changes to these high-fan-out internals can affect every message, delta, element, or rerun. Keep work in them minimal, and benchmark changes with representative stress-test apps.
python_lib
Tips and guidelines specific to the development of the Streamlit Python library, not applicable to scripts and e2e tests.
python_tests
We use the unit tests to cover internal behavior that can work without the web / backend counterpart. We aim for 95%+ unit test coverage of our Python code in lib/streamlit.
overview
Streamlit is an open-source (Apache 2.0) Python library for creating interactive web applications and dashboards with focus on data apps and internal tools.
python
Cursor rule "python" from streamlit/streamlit, covering python development guide, key principles, docstrings, package structure and dependencies.
python-style
Python code style — imports, third-party submodules, and docstrings.