Anysphere · Cursor editor · Cursor CLI
Cursor rules files explained
Which instruction files Cursor reads (.cursor/rules/*.mdc, AGENTS.md, .cursorrules (legacy)), where to put them, and how to convert from other agents.
Files Cursor reads
.cursor/rules/*.mdcAGENTS.md.cursorrules (legacy)
AGENTS.md: Yes, in the project root and in subdirectories (nested files combine).
Skills folders: .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Who reads what
| Agent | Rules files | AGENTS.md |
|---|---|---|
| Claude | CLAUDE.md, .claude/rules/*.md | Only when no CLAUDE.md / CLAUDE.local.md exists (default, v2.1.277+); or import it with @AGENTS.md |
| Codex | AGENTS.md, AGENTS.override.md | Yes: global ~/.codex/AGENTS.md plus one AGENTS.md (or AGENTS.override.md) per directory from the repo root down |
| Cursor | .cursor/rules/*.mdc, AGENTS.md, .cursorrules (legacy) | Yes, in the project root and in subdirectories (nested files combine) |
| Copilot | .github/copilot-instructions.md, .github/instructions/*.instructions.md, AGENTS.md | Yes on most surfaces (cloud agent, CLI, VS Code chat, code review); not Copilot Chat on GitHub.com |
| Antigravity | AGENTS.md, GEMINI.md, .agents/rules/*.md | Yes: AGENTS.md or GEMINI.md at any directory level, always on |
Cursor rule types and the .mdc format
Cursor has four kinds of instructions: Project Rules in .cursor/rules, User Rules that apply across your Cursor environment, Team Rules managed from the dashboard on Team and Enterprise plans, and AGENTS.md as a plain-markdown alternative to .cursor/rules.
Project rules must use the .mdc extension. Cursor's docs say a plain .md file in .cursor/rules is ignored by the rules system because it has no frontmatter. The frontmatter keys are description, globs and alwaysApply, and the type dropdown sets them: Always Apply, Apply Intelligently (Agent decides from the description), Apply to Specific Files (globs match), and Apply Manually (only when you @-mention the rule).
Use comma-separated globs such as src/components/**/*.tsx to scope a rule to part of the codebase. To write one without hand-editing frontmatter, type /create-rule in Agent and describe what you want; Agent saves the file to .cursor/rules. Files can be named anything and organized in subfolders, such as .cursor/rules/frontend/components.mdc, and because they live in the repository they are version-controlled with your code.
Source: cursor.com · Checked Oct 24, 2026
Guides, pricing & comparisons
How to add an MCP server to Cursor
Portable agent skills: one SKILL.md for every coding agent
Agent Skills moves to the Agentic AI Foundation: what changes
MCP security: the risks in MCP servers and how to lock them down
Cursor Agent SDK: build, test and deploy agents as code
MCP OAuth: connect a remote MCP server in Claude Code, Codex and Cursor
Cursor rules examples: .mdc files for each rule type
Fix spawn npx ENOENT when starting an MCP server
MCP connection closed: find why a server will not connect
Claude Fable 5.2: model choice, CursorBench and Pro week
Cursor Auto mode and Cursor Router: Cost, Balance and Intelligence
Cursor Cloud Agents (formerly Background Agents): setup, access and limits
Gemini 4 Carbon in coding tools: API pricing, Cursor and CursorBench
MCP Apps: add interactive UI to an MCP server for Claude and Cursor
Cursor vs Claude Code: documented features compared
OpenAI Codex vs Cursor: documented features compared
Cursor vs GitHub Copilot: documented features compared
Google Antigravity vs Cursor: documented features compared
Cursor pricing, usage pool and limits
AGENTS.md vs CLAUDE.md vs Cursor rules
AGENTS.md templates for Laravel and Next.js
MCP servers that work in every coding agent