In this categoryCursor ยท 26
- How to Install Cursor and Import VS Code Settings (6 Minutes)Start
- Cursor Setup Guide: From Install to Your First AI Edit
- How to Set Up Project Rules in the .cursor/rules Folder
- How to Set Up Codebase Indexing in Cursor
- How to Enforce Project Conventions with Cursor Rules
- How to Write a Team Rule That Applies Only to Certain Files
- How to Migrate a Legacy .cursorrules File to the New Rules Folder
- How to Use Cursor Rules to Guide AI Edits
- How to Set Project Rules in Cursor
- How to Add a .cursorrules File to Steer Cursor
- How to Customize Cursor Keyboard Shortcuts
- How to Edit Multiple Files at Once with Cursor Composer
- How to Use Cursor Tab Completion Effectively
- How to Edit Code Inline with Cmd+K in Cursor
- How to Add Context to Cursor Chat with @ Mentions
- How to Choose and Switch AI Models in Cursor
- How to Add Library Docs as Context with @Docs in Cursor
- How to Generate and Maintain Tests with Cursor Composer
- How to Undo a Composer Change with Checkpoints in Cursor
- How to Use Cursor Agent Mode to Build a Feature End to End
- How to Connect an MCP Server to Cursor
- How to Refactor Across Your Whole Codebase in Cursor
- How to Query Your Database from Cursor with a Postgres MCP Server
- How to Let Cursor Run Commands Automatically (and Keep It Safe)
- How to Build a Full Feature Across Frontend and Backend with Composer
- How to Debug an MCP Server That Will Not Connect in Cursor
How to Migrate a Legacy .cursorrules File to the New Rules Folder
Convert a single root .cursorrules file into scoped .mdc rules so you get globs, multiple files and per-rule control.
Older Cursor projects keep all their instructions in a single .cursorrules file at the repo root. That still works, but it is deprecated in favor of the .cursor/rules folder, which lets you split rules into files, scope them with globs, and control when each one loads. This guide migrates an existing .cursorrules file cleanly.
What you need
- A project that already has a .cursorrules file at its root
- Cursor open on that project
- Five minutes to split the content into focused files
Step 1: Read your current .cursorrules
Open the existing file and group its content by topic. Most legacy files mix several concerns: language conventions, framework rules, testing expectations and tone. Each of those groups becomes its own .mdc file.
Step 2: Create the folder and split by concern
Make the new folder and create one file per group. Splitting lets you give each rule its own globs so it only loads where relevant, instead of every line being in context all the time.
Step 3: Add frontmatter and move the text
Paste each group into its file under a frontmatter header. Use globs so, for example, the testing rule only attaches when a test file is in context.
---
description: Testing conventions
globs: ["**/*.test.ts", "**/__tests__/**"]
alwaysApply: false
---
- Put tests in `__tests__` next to the code under test.
- Use Vitest, not Jest.
- One `describe` block per exported function.Step 4: Delete the old file and confirm
Once the content lives in the new files, remove the root .cursorrules so the two sources cannot drift apart. Open a chat and confirm the model still references your conventions.
Result: the same guidance now lives in focused, glob-scoped files that load only when relevant, which keeps the context window cleaner and your rules easier to maintain.
Watch related tutorials
14:05
18:00
22:00
20:00
05:00
30:00New guides in your inbox
Fresh step-by-step how-to guides as we publish them. One email a week, no more.