# Cursor Rules vs AGENTS.md vs CLAUDE.md

> Which config file Cursor, Claude Code, Codex and Windsurf read, how to keep one source of truth, and when to convert between .mdc, AGENTS.md and CLAUDE.md.

Canonical: https://www.agentickit.co/compare/cursor-rules-vs-agents-md-vs-claude-md
Last updated: 2026-11-18

Cursor's native format is .cursor/rules/*.mdc, Claude Code's is CLAUDE.md, and AGENTS.md is the tool-neutral markdown file several agents read. If you use more than one agent, keep one short source of truth and generate the others from it with the Config Converter instead of hand-copying.



## Verdict
**One agent:** use that agent's native file. **Cursor plus Claude Code:** write the shared conventions once (AGENTS.md is the neutral choice), then generate `.cursor/rules/*.mdc` and `CLAUDE.md` from it. Hand-maintained copies drift, and a rule that exists in only one of two files means one agent quietly ignores it.

## Compatibility matrix
<table><thead><tr><th>Agent</th><th>Native file</th></tr></thead><tbody><tr><td>**Cursor**</td><td>`.cursor/rules/*.mdc` (legacy `.cursorrules`)</td></tr><tr><td>**Claude Code**</td><td>`CLAUDE.md`</td></tr><tr><td>**Codex**</td><td>`AGENTS.md`</td></tr><tr><td>**Windsurf**</td><td>`.windsurf/rules`</td></tr></tbody></table>These are the conventions we see in the wild. Tools change fast, so confirm exact filenames and fallbacks in each vendor's current docs before you delete a file.

## What each format can express
- **.mdc** carries frontmatter (description, globs, always-apply), so a rule can fire only on `app/api/**`. That scoping is Cursor-specific.
- **CLAUDE.md** is plain markdown loaded as project memory. No glob frontmatter, so scope in prose or split into several files.
- **AGENTS.md** is plain markdown with no required schema. Maximum portability, no scoping.
Conversion is lossy in one direction: .mdc to markdown drops the globs, and markdown to .mdc has to guess them. Review the output for any rule that depended on a path.

## Precedence and loading behaviour
Don't rely on precedence to resolve conflicts. If two files disagree, different agents may pick different winners, and you won't notice until a review. Keep each instruction in exactly one source file, and keep the always-loaded text short, because everything loaded costs tokens on every turn.
Practical split: always-on bans (tenant from session, no `any`) go in the shared file; longer manuals go in skills that load on demand. See [Rules vs Skills vs Commands](https://www.agentickit.co/compare/cursor-rules-vs-skills).

## One source, many agents: how to convert
<ol>- Pick the source. For a mixed-agent setup, AGENTS.md.
- Trim it. Grade it with the [Rules File Grader](https://www.agentickit.co/tools/rules-grader) and cut anything the agent can learn by reading your code.
- Drop it into the [Config Converter](https://www.agentickit.co/tools/config-converter) and pick .mdc or CLAUDE.md as the target.
- Add globs back by hand to any Cursor rule that should be path-scoped.
- Commit the source and the generated files, and re-convert whenever the source changes.
</ol>

## When not to convert
If you only use Cursor, keep native .mdc rules and their globs. Flattening to a lowest-common-denominator file just to be tidy gives up scoping for nothing.



## FAQ

### Does Cursor read AGENTS.md or CLAUDE.md?
Cursor's native format is .cursor/rules/*.mdc. Support for other filenames has changed over time, so check Cursor's current docs; converting to .mdc is the safe route.

### Should I keep both CLAUDE.md and AGENTS.md?
Only if you use both Claude Code and an AGENTS.md agent. Keep one as the source and generate the other so they never diverge.

### Is .cursorrules deprecated?
The single-file .cursorrules is the legacy format; new projects should use .cursor/rules/*.mdc. The Config Converter accepts it as input.

### Does converting lose information?
Going from .mdc to plain markdown drops glob scoping and always-apply flags. Re-add them by hand when converting back.

## Related
- [Config Converter](https://www.agentickit.co/tools/config-converter)
- [Rules File Grader](https://www.agentickit.co/tools/rules-grader)
- [Cursor Rules vs Skills vs Commands](https://www.agentickit.co/compare/cursor-rules-vs-skills)
- [CLAUDE.md vs Skills vs Subagents vs Hooks (what else CLAUDE.md sits alongside)](https://www.agentickit.co/compare/claude-code-skills-vs-subagents-vs-hooks)
- [Cursor Rules vs Claude Code CLAUDE.md (two-way format and migration deep dive)](https://www.agentickit.co/compare/cursor-rules-vs-claude-md)
- [Cursor rules for SaaS founders](https://www.agentickit.co/blog/cursor-rules-saas-founders)
- [Cursor Skills pillar](https://www.agentickit.co/skills)
- [Cursor Commands pillar](https://www.agentickit.co/commands)
