Skip to content
Agent Friendly Code

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 .mdc file in .cursor/rules/, in a subfolder of it, or in a .cursor/rules/ folder up to three directories down. A plain .md file there does not count: Cursor ignores it.
  • 50%: only the older .cursorrules file, 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

Cursor rules vs AGENTS.md: which to use, and how to keep one source.

Top-scoring repos that pass

Popular repos that fail it

Every check, grouped into what to do first: how to make your repo ready for AI coding agents.