agentleFS
Sign inSign up

Cursor rules examples

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

Most stars first · from page 2Worked for most · soon
VercelCursor rule

streamdown / rules

vercel/streamdown/apps/website/.cursor/.cursor/rules/documentation.mdc

Documentation Writing Style Guide

5.7k14mo agoDiscuss
VercelCursor rule

streamdown / rules

vercel/streamdown/apps/website/.cursor/.cursor/rules/ultracite.mdc

Ultracite Rules - AI-Ready Formatter and Linter

5.7k14mo agoDiscuss
VercelCursor rule

streamdown / rules

vercel/streamdown/apps/website/.cursor/rules/ultracite.mdc

Ultracite Rules - AI-Ready Formatter and Linter

5.7k14mo agoDiscuss
VercelCursor rule

wterm / rules

vercel-labs/wterm/.cursor/rules/avoid-useeffect.mdc

Avoid useEffect in React/Next.js components

3.5k6mo agoDiscuss
NVIDIACursor rule

physicsnemo / rules

NVIDIA/physicsnemo/.cursor/rules/mod-000a-reusable-layers-belong-in-nn.mdc

Reusable layers and building blocks should be placed in physicsnemo/nn, not physicsnemo/models. Examples include FullyConnected, attention layers, and UNetBlock.

3.3k10mo agoDiscuss
NVIDIACursor rule

physicsnemo / rules

NVIDIA/physicsnemo/.cursor/rules/mod-000b-complete-models-belong-in-models.mdc

Complete models composed of multiple layers should be placed in physicsnemo/models, not physicsnemo/nn. These are domain-specific or modality-specific models.

3.3k10mo agoDiscuss
NVIDIACursor rule

physicsnemo / rules

NVIDIA/physicsnemo/.cursor/rules/mod-001-use-physicsnemo-module-as-base-class.mdc

All model and layer classes must inherit from physicsnemo.Module (not torch.nn.Module directly) to ensure proper serialization, versioning, and registry functionality.

3.3k10mo agoDiscuss
NVIDIACursor rule

physicsnemo / rules

NVIDIA/physicsnemo/.cursor/rules/mod-002a-experimental-models-belong-in-experimental.mdc

New model classes should start in physicsnemo/experimental/nn or physicsnemo/experimental/models during development, where backward compatibility is not guaranteed.

3.3k10mo agoDiscuss
NVIDIACursor rule

physicsnemo / rules

NVIDIA/physicsnemo/.cursor/rules/mod-002b-add-deprecation-warnings-to-model.mdc

Model classes being deprecated must include deprecation warnings in both docstring and runtime, explaining why and what users should use instead, for at least 1 release cycle.

3.3k10mo agoDiscuss
NVIDIACursor rule

physicsnemo / rules

NVIDIA/physicsnemo/.cursor/rules/mod-002c-remove-deprecated-model-from-codebase.mdc

After at least 1 release cycle in pre-deprecation stage with warnings, deprecated model classes can be deleted from the codebase.

3.3k10mo agoDiscuss
NVIDIACursor rule

physicsnemo / rules

NVIDIA/physicsnemo/.cursor/rules/mod-003a-missing-or-incomplete-docstring.mdc

Every model/layer requires comprehensive docstrings following NumPy style with Sphinx RST formatting, including all sub-rules MOD-003b through MOD-003k.

3.3k10mo agoDiscuss
NVIDIACursor rule

physicsnemo / rules

NVIDIA/physicsnemo/.cursor/rules/mod-003b-docstring-must-use-raw-string-prefix.mdc

Model and method docstrings must be prefixed with r""" (raw string with triple double quotes) for proper LaTeX rendering in Sphinx documentation.

3.3k10mo agoDiscuss
NVIDIACursor rule

physicsnemo / rules

NVIDIA/physicsnemo/.cursor/rules/mod-003c-missing-required-class-docstring-sections.mdc

Class docstrings must contain three mandatory sections - Parameters, Forward, and Outputs. Optional sections include Notes, Examples, ..important::, and ..code-block::.

3.3k10mo agoDiscuss
NVIDIACursor rule

physicsnemo / rules

NVIDIA/physicsnemo/.cursor/rules/mod-003d-missing-required-method-docstring-sections.mdc

All methods must have docstrings with at least Parameters and Returns sections. Optional sections include Notes, Examples, ..important::, and ..code-block::.

3.3k10mo agoDiscuss
NVIDIACursor rule

physicsnemo / rules

NVIDIA/physicsnemo/.cursor/rules/mod-003e-tensor-shapes-must-use-latex-math-notation.mdc

All tensor shapes in docstrings must use LaTeX math notation like :math:`(B, C, H, W)` for proper rendering in Sphinx documentation.

3.3k10mo agoDiscuss
NVIDIACursor rule

physicsnemo / rules

NVIDIA/physicsnemo/.cursor/rules/mod-003f-callback-functions-must-have-code-block-specification.mdc

Callback function parameters must include a ..code-block:: specification showing the required signature and return type, placed outside Parameters/Forward/Outputs sections.

3.3k10mo agoDiscuss
NVIDIACursor rule

physicsnemo / rules

NVIDIA/physicsnemo/.cursor/rules/mod-003g-inline-code-must-use-double-backticks.mdc

Inline code in docstrings must be formatted with double backticks ``code``, not single backticks, as single backticks don't render properly in Sphinx.

3.3k10mo agoDiscuss
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

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.