Cursor (.cursorrules)

The legacy single-file format Cursor still reads. Plain markdown at the project root. Cursor now prefers the multi-file .cursor/rules/ directory but continues to honor .cursorrules for backwards compatibility.

File path
.cursorrules
Length cap (recommended)
~500 lines
Frontmatter
No
File globs
No

Format quirks

  • Cursor reads .cursorrules from the repository root
  • No frontmatter, no globs — plain markdown only
  • Loaded into every chat and inline-edit request automatically

Browse stack examples

Every stack page in the library has a one-click copy button for Cursor (.cursorrules). Open any of these and pick "Cursor (.cursorrules)" from the format dropdown.

See all 20 stacks

Official docs: https://docs.cursor.com/context/rules