Most projects now write Cursor rules as .mdc files in .cursor/rules: 510 of the 557 rule files the registry has collected, against 47 legacy .cursorrules files. Of the .mdc rules, 32.7% load in every chat, 32.2% attach to matching files and 28.8% let the agent decide. And 46 set a narrow file pattern that Cursor ignores, because they also say alwaysApply: true.
| Rule type | What the frontmatter says | .mdc files | Share |
|---|---|---|---|
| Always Apply | alwaysApply: true | 167 | 32.7% |
| Apply to Specific Files | globs set, alwaysApply false or missing | 164 | 32.2% |
| Apply Intelligently | a description, no globs | 147 | 28.8% |
| No frontmatter at all | none of the three fields | 29 | 5.7% |
| Apply Manually | frontmatter with none of the three set | 3 | 0.6% |
510 .mdc rule files in 102 public GitHub repositories, each read at its latest version in the registry on October 3, 2026, and sorted by the rule-type table in Cursor's documentation. How each was decided is under How we counted.
Counted from the registry's own crawl of public GitHub, read on October 3, 2026. How Cursor applies each rule type is from its rules documentation, read the same day.
What 557 rule files look like
The single .cursorrules file at a project's root is the older way to give Cursor instructions, and Cursor's rules documentation does not describe it. It is still in 38 of the 127 repositories with Cursor rules here, and 13 of those keep it beside a .cursor/rules folder. The rest write rules as .mdc files, one rule per file.
File counts lean on a few busy repositories: the median repository holds 1 .mdc rule, and the largest holds 52, 10.2% of all of them. Counted by repository instead, the pattern is plainer. 76 of the 102 repositories with .mdc rules (74.5%) have at least one rule that loads in every chat, and 49 (48.0%) have no other kind.
How Cursor decides when a rule applies
Each .mdc rule has three frontmatter fields, and Cursor's documentation gives the result of each combination:
-
Always Apply:
alwaysApply: true. The rule is in every chat, and its globs and description are ignored. -
Apply to Specific Files:
alwaysApply: falsewithglobsset. The rule attaches when a matching file is in context. -
Apply Intelligently:
alwaysApply: false, adescription, no globs. The agent reads the description and pulls the rule in when it judges it relevant. - Apply Manually: none of the three. The rule is used only when you @-mention it in chat.
The documentation adds that rules in .cursor/rules must use the .mdc extension, and that a plain .md file there is ignored because it has no frontmatter to say how to apply it. 29 of the .mdc files counted here (5.7%) have no frontmatter either, so by that table they apply only when @-mentioned.
The rule that looks scoped but loads everywhere
46 rules, 9.0% of the .mdc files and spread across 11 repositories, set a pattern that names some files, such as apps/web/**, and also set alwaysApply: true. Cursor ignores the pattern when the rule always applies, so instructions written for one part of the code reach every chat. If the rule is meant for those files only, set alwaysApply to false:
---
description: Rules for the web app
globs: apps/web/**
alwaysApply: false
---
To find these rules in your own project, list the always rules and print any pattern they set. The pattern skips an empty globs: line, which Cursor's editor writes and which scopes nothing. This is the output from a scratch folder holding four rules, one of them the case above and one an always rule with an empty globs::
$ grep -l '^alwaysApply: true' .cursor/rules/*.mdc | xargs grep -HE '^globs:[[:space:]]*[^[:space:]]'
.cursor/rules/web.mdc:globs: apps/web/**
A pattern that matches every file, such as **/*, loses nothing when it is ignored, so those are not counted here.
Cursor rules or AGENTS.md
Cursor's documentation lists AGENTS.md as a simple alternative to .cursor/rules: agent instructions in plain markdown, and the place to put them if you prefer plain markdown to frontmatter. Most projects here use both. 110 of the 127 repositories with Cursor rules (86.6%) also hold an AGENTS.md somewhere, though the registry finds repositories by their agent files, so a project with both is likelier to be in it. Which to choose for your own repository is in Cursor rules vs AGENTS.md, and every Cursor rule the registry has collected is on the Cursor rules page, most starred first.
How we counted
The registry collects agent markdown from public GitHub repositories and stores every version of each file by the SHA-256 of its content. We took every Cursor rule file it holds, read each one's latest stored version, and checked its bytes against its hash; 1 file with no stored version yet was left out. A file named .cursorrules counts as legacy, and a file ending in .mdc as a rule file. Each .mdc file's frontmatter, the block between the first two --- lines, was read for alwaysApply, globs and description. A field with nothing after it, as Cursor's editor writes, counts as not set unless the lines under it give a value, a missing alwaysApply counts as false, and a quoted "true" counts as true; an inline comment is not part of a value, and an empty frontmatter block reads as Apply Manually. Each file was then sorted by the documentation's table. A pattern of *, **, **/*, *.* or **/*.* counts as matching every file. The registry crawls the public repositories it has found that hold agent files, not all of GitHub, so read the shares as describing those repositories.
Sources
Last checked October 3, 2026. The page: https://markdownregistry.com/blog/how-projects-write-cursor-rules
First published on markdownregistry, where the counts are kept current and the data behind them is public in dotcomjack/state-of-agent-markdown.
Top comments (0)