Cursor · Hidden Features

Rules

Write rules when Agent repeats a mistake, choose the right rule type, and move occasional instructions into skills.

Cursor rules

Three decisions for every rule

Decide what it says, when it loads and where it lives. What it says should be concrete enough to act on. When it loads is set by the type: always, for matching files, when relevant, or only when mentioned. Where it lives decides who gets it: the repo, your account or your whole team.

Rules aren't the right tool for everything

Formatting belongs in a linter. Procedures you run sometimes belong in a skill. And Tab ignores rules altogether, according to Cursor's docs. Rules also don't guarantee anything, so Cursor warns against using them as your only security control. Commit them to Git, and update them when your conventions change.

Frequently asked
Where do Cursor rules go?

Project rules go in the .cursor/rules folder as .mdc files. Personal rules go in Customize then Rules, and AGENTS.md goes in your project root or a subfolder.

Why isn't my Cursor rule working?

Check the file extension first, since plain .md files in .cursor/rules are ignored. Then check the type: Apply Intelligently needs a description, and Apply to Specific Files needs a pattern that matches files in context.

Is .cursorrules still supported?

Cursor's help calls the .cursorrules file legacy and says it will be deprecated. To migrate, run New Cursor Rule from the command palette, copy the content in, set the type to Always Apply, and delete the old file.

How long should a Cursor rule be?

Cursor's guidance is under 500 lines, but shorter is better. Rules take up context, and its course warns that too many can confuse the agent, so split large ones and reference files rather than pasting them.