Skip to content
RulePaste

Cursor rules not working

Why does Cursor ignore a .md file in .cursor/rules?

Cursor only loads project rules from .cursor/rules when the file ends in .mdc and starts with YAML frontmatter. A plain .md file in that folder is skipped, and Cursor does not show an error. Set description plus alwaysApply: true for a rule on every chat, or description plus globs when it should attach only to matching files. If none of those are set, the rule loads only when you @-mention it.

Turn .md into .mdc

Paste the rules. The file below is what Cursor will load. Nothing is uploaded.

.cursor/rules/project.mdc
---description: "Project rules"alwaysApply: true--- # Project rules - Read the files you will change before editing them.- Match the patterns already in the repo.- Do not add dependencies the task did not ask for. 

Questions

Which frontmatter fields does an .mdc rule need?

description is the one-line summary. alwaysApply: true puts the rule in every chat. globs, such as **/*.tsx, attach it when a matching file is in context. You need at least one of alwaysApply, globs, or description for Cursor to pull the rule in on its own.

I added the file and Cursor still ignores it. What else should I check?

Start a new chat. An open chat does not always reload rules. Confirm the path is .cursor/rules/project.mdc, the frontmatter has a closing ---, and the rule is listed under Settings, Rules. The old .cursorrules file is a different path and does not replace an .mdc rule.