CLAUDE.md vs Cursor rules
Every comparison page on the web is a capability table someone wrote from the vendor docs in an afternoon. None of them can tell you how many real repositories ship each file, how long the median one runs, or how often two of them turn up in the same project. Those answers need a corpus, and RuleStack counts one every night.
| Format | CLAUDE.md 2026-08-02 | Cursor rules 2026-08-02 |
|---|---|---|
| Asserted — what the docs say it can express | ||
| File | CLAUDE.md | .cursor/rules/*.mdc |
| Status | vendor | vendor |
| Cross-tool | No | No |
| Tools that read it |
|
|
| Frontmatter | No | Yes |
| Glob targeting | No | Yes |
| Imports other files | Yes | Yes |
| Nested / per-directory | Yes | Yes |
| Multiple files | Yes | Yes |
| User-level scope | Yes | No |
| When it applies | Always in scope. Project file, plus nested files in subdirectories, plus a user-level file (~/.claude/CLAUDE.md) that applies across every project. | Four modes set in frontmatter: Always Apply (every chat session), Apply Intelligently (the agent picks it by description), Apply to Specific Files (globs match the edited file), and Apply Manually (@-mentioned). Rules must carry the .mdc extension — a plain .md file in .cursor/rules is ignored. |
| Size limits | None | None |
| Measured — counted from real repositories on 2026-08-03 | ||
| Repositories carrying it | 248 | 179 |
| Share of indexed repos | 35.7% | 25.8% |
| Files indexed | 775 | 1,279 |
| Median length (words) | 2,042 | 272 |
| 90th percentile length | 2,998 | 1,171 |
| Files naming commands | 34.1% | 29.3% |
| Files containing code | 34.5% | 58.0% |
| Median quality score | 44 | 52 |
| Median repository stars | 112 | 24 |
How often they turn up together
A capability table cannot answer this at all. Of the repositories carrying the first format, this is the share that also carry the second — counted, both directions, on 2026-08-03.
CLAUDE.md + Cursor rules
2026-08-0355
repositories carry both. That is 22.2% of everything with CLAUDE.md, and 30.7% of everything with Cursor rules.
What each one is for
CLAUDE.md
2026-08-02Claude Code's memory file. Shaped like AGENTS.md but with two things it lacks: @path imports, so shared rules live in one place, and a user-scope layer that follows the developer across repos rather than shipping with the code.
Strengths
- @path imports — shared conventions written once and pulled into each file
- A user-scope file lets personal preferences live outside the team repo
- Nested project files compose with the root file rather than replacing it
Weaknesses
- Single-vendor: no other agent reads it, so multi-tool teams maintain two files
- No glob targeting, same context cost as AGENTS.md — path-scoped rules exist, but in a separate .claude/rules/ file, not in CLAUDE.md itself
Cursor rules
2026-08-02The most expressive format here. Many small .mdc files, each with frontmatter declaring when it should load, so a rule about migrations only enters context when a migration is open. Costs the most to maintain and only one editor reads it.
Strengths
- Glob-scoped activation — the only widely-used format that keeps unrelated rules out of context
- Description-based activation lets the agent pull a rule in on demand
- Many small files are easier to review in a PR than one growing document
Weaknesses
- Cursor-only
- Frontmatter is a schema, and a malformed .mdc silently stops applying
- Fragmentation: rules spread over many files are easy to duplicate and contradict
