Cursor rules: .mdc format, .cursor/rules and .cursorrules
Cursor rules are instruction files Cursor reads from the repo: .mdc files in .cursor/rules/, subfolders allowed, each markdown with description, globs and alwaysApply frontmatter. Those fields pick the rule type: Always Apply, Apply Intelligently (from the description), Apply to Specific Files (from the globs) or Apply Manually (on @-mention). The root .cursorrules file is legacy and will be deprecated.
By Himanshu Singh · Updated · How we score →
How many repos have Cursor rules?
Of the 434 repos on the leaderboard, 19 pass in full (4%), 4 pass in part (0.9%) and 411 fail (95%).
Why use Cursor project rules?
Cursor's Rules docs name .cursor/rules/*.mdc and AGENTS.md as its repo instructions, with Team Rules, then Project Rules, then User Rules winning a conflict. A rule scoped by globs or a description loads only when it applies, costing no context on other tasks. Devin also pulls Cursor rule files into its Knowledge (deprecated, moving to Skills), so the check counts a little for Devin and most for Cursor.
What counts as Cursor rules?
- Full pass: at least one
.mdcfile in.cursor/rules/, in a subfolder of it, or in a.cursor/rules/folder up to three directories down. A plain.mdfile there does not count: Cursor ignores it. - 50%: only the older
.cursorrulesfile, which Cursor's help says is legacy and will be deprecated. - Fail: neither is present.
How checks become a score: methodology.
How do I add Cursor rules, and why isn't one applied?
Type /create-rule in Cursor's Agent, or create .cursor/rules/ by hand, with one .mdc file per topic, each under 500 lines. Move .cursorrules into a rule with alwaysApply: true. If a rule isn't applied, check its type: Apply Intelligently needs a description, and Apply to Specific Files needs globs that match the file.
Which AI agents read Cursor rules?
Pass rate by language
- TypeScript11 of 88 (13%)
- Ruby1 of 11 (9%)
- Python4 of 56 (7%)
- PHP1 of 14 (7%)
- Rust2 of 47 (4%)
- Go0 of 41 (0%)
- Java0 of 32 (0%)
- C++0 of 21 (0%)
- JavaScript0 of 16 (0%)
- Kotlin0 of 15 (0%)
- Swift0 of 14 (0%)
- C#0 of 12 (0%)
- Dart0 of 12 (0%)
- C0 of 10 (0%)
- Elixir0 of 7 (0%)
- Haskell0 of 7 (0%)
- Scala0 of 6 (0%)
- Zig0 of 6 (0%)
- Clojure0 of 5 (0%)
Cursor rules vs AGENTS.md: which to use, and how to keep one source.
Top-scoring repos that pass
- Ruby · 48.1k ★
- PostHog/posthog91.2Python · 41.2k ★
- novuhq/novu91.2TypeScript · 40.4k ★
- jdx/mise91.2Rust · 36.6k ★
- TypeScript · 9.2k ★
- apache/superset88.7Python · 75.7k ★
- TypeScript · 91.7k ★
- simstudioai/sim87.6TypeScript · 30.2k ★
- mastra-ai/mastra87.6TypeScript · 29.9k ★
- Python · 46.5k ★
- Rust · 33.4k ★
- solidjs/solid86.7TypeScript · 37k ★
Popular repos that fail it
- TypeScript · 395.3k ★
- react/react75.4JavaScript · 253k ★
- TypeScript · 229.6k ★
- n8n-io/n8n86.9TypeScript · 212.4k ★
- TypeScript · 211.5k ★
- microsoft/vscode82.6TypeScript · 195.9k ★
- ollama/ollama82.6Go · 188.3k ★
- Python · 188.2k ★
Every check, grouped into what to do first: how to make your repo ready for AI coding agents.