Home › Rules › Cursor rules vs AGENTS.md
Cursor rules vs AGENTS.md: which should you use?
Short answer: start with AGENTS.md. Cursor reads it, and so do other tools. Move to .cursor/rules/*.mdc when you want a rule to load only for certain files, or only when it's relevant.
What Cursor supports
Cursor's docs list four kinds of rules: Project Rules (.cursor/rules, in git), User Rules (your global preferences in Cursor's settings), Team Rules (from the dashboard, Team and Enterprise plans), and AGENTS.md, which Cursor describes as a simple alternative to .cursor/rules.
| AGENTS.md | .cursor/rules/*.mdc | |
|---|---|---|
| Works in other tools | Yes (Codex, Copilot, Claude Code and more) | Cursor only |
| Format | Plain Markdown | Markdown with frontmatter: description, globs, alwaysApply |
| Scoping | By folder (nested AGENTS.md files) | By file pattern, by relevance, always, or manual @-mention |
| Best for | One shared set of rules | Many focused rules that shouldn't all load at once |
Common mistakes
- Saving rules as
.mdin.cursor/rules. Cursor ignores them. Project Rules must be.mdc. - A rule that never applies. With
alwaysApply: falseand no description or globs, a rule only loads when you @-mention it. - Same rules in both places. If AGENTS.md and an always-on .mdc say the same thing, you're sending it twice. Pick one home for each rule.
- An old
.cursorrulesfile. Cursor's current docs describe.cursor/rulesand AGENTS.md. Move old rules into one of those.
A good split
Keep the project overview, commands and working habits in one always-on place (AGENTS.md or core.mdc with alwaysApply: true). Put file-specific rules (database migrations, components, tests) in .mdc files with globs.
---
globs: supabase/**/*.sql
alwaysApply: false
---
- Turn on Row Level Security for every new table, with explicit policies.
- Ask before dropping or renaming a column or table.
Get ready-made files
Every page in the rules library gives you both: an AGENTS.md and the same rules split into core.mdc plus a glob-scoped project rule. Or generate a Cursor rule.