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-006-invalid-or-missing-jaxtyping-tensor-annotationsgit 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-006-invalid-or-missing-jaxtyping-tensor-annotations)<a href="https://agentmods.dev/rules/nvidia/physicsnemo/mod-006-invalid-or-missing-jaxtyping-tensor-annotations"><img src="https://agentmods.dev/badge/rules/nvidia/physicsnemo/mod-006-invalid-or-missing-jaxtyping-tensor-annotations.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.00039 | $0.00540 |
| Opus 5 | $0.00019 | $0.00270 |
| Sonnet 5 | $0.00008 | $0.00108 |
| Haiku 4.5 | $0.00004 | $0.00054 |
Grade A, and why
mod-006-invalid-or-missing-jaxtyping-tensor-annotations 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 adding type hints to model methods, rule MOD-006 must be followed. Explicitly reference "Following rule MOD-006, which requires all tensor arguments to use jaxtyping annotations..." when adding type hints.
MOD-006: Invalid or missing jaxtyping tensor annotations in public function signature
Description:
All tensor arguments and variables in model __init__, forward, and other
public methods must have type annotations using jaxtyping. This provides
runtime-checkable shape information in type hints.
Use the format Float[torch.Tensor, "shape_spec"] where shape_spec describes
tensor dimensions using space-separated dimension names (e.g., "batch channels height width"
or "b c h w").
Rationale:
Jaxtyping annotations provide explicit, machine-readable documentation of expected tensor shapes. This enables better IDE support, catches shape errors earlier, and makes code more self-documenting. The annotations serve as both documentation and optional runtime checks when jaxtyping's validation is enabled.
Example:
from jaxtyping import Float
import torch
class MyConvNet(Module):
def __init__(self, in_channels: int, out_channels: int):
super().__init__()
self.conv = torch.nn.Conv2d(in_channels, out_channels, kernel_size=3)
def forward(
self,
x: Float[torch.Tensor, "batch in_channels height width"]
) -> Float[torch.Tensor, "batch out_channels height width"]:
"""Process input with convolution."""
return self.conv(x)
Anti-pattern:
# WRONG: No jaxtyping annotations
def forward(self, x: torch.Tensor) -> torch.Tensor:
return self.layer(x)
# WRONG: Using plain comments instead of jaxtyping
def forward(self, x: torch.Tensor) -> torch.Tensor:
# x: (batch, channels, height, width) # Use jaxtyping instead
return self.layer(x)
# WRONG: Incomplete annotations
def forward(
self,
x: Float[torch.Tensor, "b c h w"],
mask: torch.Tensor # Missing jaxtyping annotation
) -> Float[torch.Tensor, "b c h w"]:
return self.layer(x, mask)
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 · 67 lines · 39 tokens per session scan A c1ce0d71eead
mod-006-invalid-or-missing-jaxtyping-tensor-annotations is a cursor rule published in the GitHub repository NVIDIA/physicsnemo (3,216 stars, last pushed today), licensed Apache-2.0. It adds 39 tokens to every session and 540 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.
specs
This directory contains product and tech specs for Streamlit features.
workflows
This folder contains all GitHub Actions workflows for the Streamlit repository. Workflows automate CI/CD, testing, releases, and maintenance tasks.
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.
skills
This file provides guidance to AI coding agents (Claude Code, Cursor, Copilot, etc.) when working with skills in this repository.