auto_awesome
Cursor (.cursor/rules/*.mdc)
Cursor’s modern multi-file rules system. Each .mdc file declares a description, optional file globs for scoping, and an alwaysApply flag. Multiple rules files compose; each one only loads when its glob or alwaysApply matches.
File path
.cursor/rules/main.mdcLength cap (recommended)
~400 lines
Frontmatter
Yes (YAML)
File globs
Yes
Format quirks
- check_circleFiles live in .cursor/rules/ and end in .mdc
- check_circleRequired frontmatter: description, globs, alwaysApply
- check_circleGlobs can scope a rule to specific files (e.g. **/*.tsx)
- check_circleMultiple .mdc files compose at request time
Browse stack examples
Every stack page in the library has a one-click copy button for Cursor (.cursor/rules/*.mdc). Open any of these and pick "Cursor (.cursor/rules/*.mdc)" from the format dropdown.
descriptiondescriptiondescriptiondescriptiondescriptiondescriptiondescriptiondescriptiondescriptiondescriptiondescriptiondescription
See all 20 stacksarrow_forwardNext.js (App Router) + TypeScript
Next.js App Router (TypeScript, Server Components)
Next.js + Supabase (Auth, Postgres, RLS)
Next.js + Prisma + Postgres
React 19 + TypeScript (Vite)
React Native + Expo (managed workflow)
Python + FastAPI + SQLAlchemy + Alembic
Python + Django + DRF
Python + pandas + numpy + scikit-learn (Jupyter)
PyTorch + Hugging Face + W&B
Node.js + Express + TypeScript
Turborepo + pnpm + TypeScript
Official docs: https://docs.cursor.com/context/rules