← Back to home
How to Migrate from .cursorrules to .cursor/rules
Cursor has deprecated the legacy .cursorrules file format. The new system uses .cursor/rules/*.mdc files with per-file-type rule matching and globs.
Why migrate?
- .cursorrules is a single global file — too broad for modern projects
- .cursor/rules/*.mdc supports per-file-type matching via globs
- Split rules by concern: architecture, testing, styling, database
- Cursor officially recommends .cursor/rules for all new projects
Migration steps
- 1. Create the rules directory:
mkdir .cursor/rules/ - 2. Split your .cursorrules into multiple .mdc files by concern
- 3. Add YAML frontmatter with title, description, and globs patterns
- 4. Delete the legacy .cursorrules file
Generate .mdc rules automatically
Paste your package.json and get modern .cursor/rules/*.mdc files instantly.
Generate on RepoRules.dev