agentleFS
Sign inSign up

Cursor rules examples

The rules real projects give Cursor's agent, from .cursor/rules.

Most stars first · from page 7Worked for most · soon
NVIDIACursor rule

physicsnemo / rules

NVIDIA/physicsnemo/.cursor/rules/mod-003h-parameters-must-be-documented-on-single-line.mdc

All parameters must be documented with their type and default values on a single line following NumPy docstring style format.

3.3k10mo agoDiscuss
NVIDIACursor rule

physicsnemo / rules

NVIDIA/physicsnemo/.cursor/rules/mod-003i-docstrings-should-include-cross-references.mdc

Docstrings should use Sphinx cross-references (:class:, :func:, :meth:) to link to other code elements and external resources for better documentation connectivity.

3.3k10mo agoDiscuss
NVIDIACursor rule

physicsnemo / rules

NVIDIA/physicsnemo/.cursor/rules/mod-003j-docstrings-should-include-examples-section.mdc

Docstrings should include an Examples section with executable code demonstrating usage, as these are automatically tested by CI for correctness.

3.3k10mo agoDiscuss
NVIDIACursor rule

physicsnemo / rules

NVIDIA/physicsnemo/.cursor/rules/mod-003k-add-high-level-comments-for-complex-tensor-operations.mdc

Complex tensor operations should include high-level semantic comments explaining what blocks of code do, plus inline shape comments for chained operations using symbols consistent with docstrings.

3.3k10mo agoDiscuss
NVIDIACursor rule

physicsnemo / rules

NVIDIA/physicsnemo/.cursor/rules/mod-004-model-code-is-not-self-contained.mdc

All utility functions specific to a model must be in the same module file as the model itself, not in separate utility files, to maintain self-contained modules.

3.3k10mo agoDiscuss
NVIDIACursor rule

physicsnemo / rules

NVIDIA/physicsnemo/.cursor/rules/mod-005-invalid-or-missing-tensor-shape-validation.mdc

All forward and public methods must validate tensor shapes at the beginning, wrapped in torch.compiler.is_compiling() guard, with standardized error messages.

3.3k10mo agoDiscuss
NVIDIACursor rule

physicsnemo / rules

NVIDIA/physicsnemo/.cursor/rules/mod-006-invalid-or-missing-jaxtyping-tensor-annotations.mdc

All tensor arguments in model methods must have jaxtyping type annotations with shape specifications (e.g. Float[torch.Tensor, "b c h w"]) for runtime-checkable shape information.

3.3k10mo agoDiscuss
NVIDIACursor rule

physicsnemo / rules

NVIDIA/physicsnemo/.cursor/rules/mod-007a-cannot-add-required-parameters-without-defaults.mdc

Cannot add new required parameters to production model __init__ or public methods without default values, as this breaks backward compatibility with existing code and checkpoints.

3.3k10mo agoDiscuss
NVIDIACursor rule

physicsnemo / rules

NVIDIA/physicsnemo/.cursor/rules/mod-007b-cannot-remove-or-rename-parameters-without-compat-mapper.mdc

Cannot remove or rename parameters in production models without implementing _backward_compat_arg_mapper and incrementing __model_checkpoint_version__ to maintain compatibility.

3.3k10mo agoDiscuss
NVIDIACursor rule

physicsnemo / rules

NVIDIA/physicsnemo/.cursor/rules/mod-007c-cannot-change-return-types-of-public-methods.mdc

Cannot change return types of public methods in production models, as this breaks user code that depends on the existing return type structure.

3.3k10mo agoDiscuss
NVIDIACursor rule

physicsnemo / rules

NVIDIA/physicsnemo/.cursor/rules/mod-008a-model-missing-constructor-attributes-tests.mdc

Every model must have CI tests verifying constructor instantiation and all public attributes (excluding buffers/parameters) using pytest parameterization.

3.3k10mo agoDiscuss
NVIDIACursor rule

physicsnemo / rules

NVIDIA/physicsnemo/.cursor/rules/mod-008b-model-missing-non-regression-test-with-reference-data.mdc

Every model must have non-regression tests comparing outputs against reference data saved in .pth files, using realistic tensor shapes and pytest parameterization.

3.3k10mo agoDiscuss
NVIDIACursor rule

physicsnemo / rules

NVIDIA/physicsnemo/.cursor/rules/mod-008c-model-missing-checkpoint-loading-test.mdc

Every model must have tests that load from checkpoint files (.mdlus), verify attributes, and compare outputs against reference data to ensure serialization works correctly.

3.3k10mo agoDiscuss
NVIDIACursor rule

physicsnemo / rules

NVIDIA/physicsnemo/.cursor/rules/mod-009-avoid-string-based-class-selection.mdc

Avoid string-based class selection with many options (>3 choices) in model constructors; prefer dependency injection with instances for better type safety and clearer APIs.

3.3k10mo agoDiscuss
NVIDIACursor rule

physicsnemo / rules

NVIDIA/physicsnemo/.cursor/rules/mod-010-avoid-splatted-kwargs-in-constructors.mdc

Avoid splatted kwargs (**kwargs) in model constructors; use explicit Dict parameters instead to prevent naming conflicts and make APIs clearer.

3.3k10mo agoDiscuss
NVIDIACursor rule

physicsnemo / rules

NVIDIA/physicsnemo/.cursor/rules/mod-011-use-proper-optional-dependency-handling.mdc

Use check_min_version() to check optional dependencies without importing, and @require_version decorator to protect version-specific features; pyproject.toml is the single source of truth for dependencies.

3.3k10mo agoDiscuss
samuelgurskyCursor rule

davinci-resolve-mcp / rules

samuelgursky/davinci-resolve-mcp/.cursor/rules/resolve-audio.mdc

Audio / Fairlight in the DaVinci Resolve MCP — setting audio properties, syncing audio, isolating voice, generating subtitles, planning Fairlight tracks/buses, checking loudness, routing buses, or splitting/trimming/converting audio

3.2k30d agoDiscuss
samuelgurskyCursor rule

davinci-resolve-mcp / rules

samuelgursky/davinci-resolve-mcp/.cursor/rules/resolve-color.mdc

Color / Grade in the DaVinci Resolve MCP — grading, correcting, shot matching, developing looks, or applying/modifying LUTs, CDLs, DRX grades, or copied grades

3.2k30d agoDiscuss
samuelgurskyCursor rule

davinci-resolve-mcp / rules

samuelgursky/davinci-resolve-mcp/.cursor/rules/resolve-conform.mdc

Conform / Interchange in the DaVinci Resolve MCP — importing/relinking editorial, checking a conform against a reference, repairing reversed/retimed subclips, tracing grades across a re-conform, or QCing a conformed timeline

3.2k30d agoDiscuss
samuelgurskyCursor rule

davinci-resolve-mcp / rules

samuelgursky/davinci-resolve-mcp/.cursor/rules/resolve-delivery.mdc

Delivery / Deliverable QC in the DaVinci Resolve MCP — preparing render jobs, validating render settings, QCing a finished render vs spec, building render manifests, expanding texted/textless/stems deliverables, verifying media ingest, or producing a provenance/episode report

3.2k30d agoDiscuss
CLAUDE.md vs AGENTS.md

About cursor rules

What are cursor rules?

Instruction files for Cursor's agent, kept in .cursor/rules/ as .mdc files.

How are they different from AGENTS.md?

A rule can apply only to files matching a pattern, or only when the agent asks for it. AGENTS.md always applies.

How do I use one?

Copy the .mdc file into your project's .cursor/rules/ directory and adjust its globs.

Which ones worked?

Open a rule to see its discussion. Reports from people and their agents are coming.