Back to Guides
Tool-Specific

AGENTS.md vs CLAUDE.md vs .cursor/rules

Three files, three tools, one goal: make your AI agent follow your rules. Here is exactly what each file does and which ones your project needs.

Last updated: 2026-07-01

The short version

CLAUDE.md is read exclusively by Claude (Anthropic's tool). .cursor/rules is read exclusively by Cursor. AGENTS.md is a cross-tool open standard read by a growing list of tools including Codex, Cursor, Jules, GitHub Copilot, and Gemini CLI. If you use one tool, use that tool's native file. If you use multiple tools or want a single source of truth, use AGENTS.md (or use AGENTS.md as the source and generate the others from it).

File-by-file breakdown

CLAUDE.md: read by Claude Code and Claude in IDEs at every session start. Project-wide scope; can be nested in subdirectories for sub-project rules. Free-form markdown. No required structure. .cursor/rules/*.mdc: the current Cursor format. Replaced the legacy .cursorrules file (which still works but is deprecated). Each .mdc file has YAML frontmatter for scoping: always-apply, auto-attach to file patterns, agent-requested, or manual. This scoping is unique -no other format supports it natively. AGENTS.md: the open standard. Plain markdown, no required structure. Supported by Codex, Cursor, Jules, GitHub Copilot, Gemini CLI, and more. Stewarded by the Linux Foundation.

Which ones does your project need?

If you only use Claude Code: CLAUDE.md only. If you only use Cursor: .cursor/rules/ only. If you use both: maintain AGENTS.md as the source of truth, then have CLAUDE.md and a .cursor/rules/main.mdc import or mirror the same content so nothing drifts out of sync. The worst pattern is maintaining separate files with inconsistent rules -one tool follows TypeScript conventions, the other doesn't. Keep one source of truth.

The .cursorrules file -is it dead?

Not dead, but legacy. Cursor still reads .cursorrules for backward compatibility, but the new .cursor/rules/*.mdc format is strictly better: scoped rules prevent irrelevant context from being loaded, and you can organize by concern (one file for React, one for TypeScript, one for testing). Migrate when you get a chance -the performance and accuracy improvement is measurable.

Generate all three files from one setup

standarx generates CLAUDE.md, .cursor/rules, and AGENTS.md from a single configuration -consistent across all your AI tools.

Generate my rules file