Every major AI coding assistant reads a different rules file. The concept is identical — a Markdown file that teaches your AI how to code for your project — but the filename, location, and features differ.
All six major AI coding assistant rules formats, side by side.
| Tool | Filename | Auto-loaded |
|---|---|---|
| Cursor | .cursorrules | |
| Claude Code | CLAUDE.md | |
| GitHub Copilot | .github/copilot-instructions.md | |
| Windsurf | .windsurfrules | |
| OpenAI Codex | AGENTS.md | |
| Gemini CLI | GEMINI.md |
All formats use plain Markdown. Content can be identical — only the filename and location differ.
Cursor
.cursorrulesAlso supports .cursor/rules/*.mdc for per-file-type rules
Claude Code
CLAUDE.mdReads parent-directory CLAUDE.md files recursively up
GitHub Copilot
.github/copilot-instructions.mdApplied to every Copilot Chat session in the repository
Windsurf
.windsurfrulesCodeium's AI editor, direct Cursor competitor
OpenAI Codex
AGENTS.mdIncludes setup commands, test commands, and constraints
Gemini CLI
GEMINI.mdGoogle's terminal coding agent powered by Gemini
The short answer: use whichever file your AI tool reads. You can use all of them at once.
You can safely commit all rules files to the same repository. Each AI tool reads its own file and ignores the rest. A typical project with multiple AI tools might contain:
.cursorrulesCLAUDE.md.github/copilot-instructions.md.windsurfrulesAGENTS.mdGEMINI.mdAgent Rules Builder generates all formats from a single rules session — pick your stack once, export to every format.
.cursorrules is Cursor's rules file, injected into every AI request in the editor. CLAUDE.md is Claude Code's rules file, read before each terminal agent session. Both use plain Markdown but serve different tools.
Use whichever matches the AI tool you use. If you use Cursor, use .cursorrules. If you use Claude Code, use CLAUDE.md. If you use GitHub Copilot, use .github/copilot-instructions.md. You can maintain all three — Agent Rules Builder lets you generate and export to any format from a single session.
Yes. You can commit all three files (.cursorrules, CLAUDE.md, .github/copilot-instructions.md) to the same repository. Each AI tool reads only its own file and ignores the others.
Place .cursorrules in the root of your project (same level as package.json). Cursor also supports .cursor/rules/ for glob-scoped rules that apply only to specific file patterns.
No. GitHub Copilot reads .github/copilot-instructions.md, not .cursorrules. Each AI coding tool uses its own rules file format.
Want the full breakdown?
Our in-depth guide covers advanced features — Cursor glob-scoped rules, CLAUDE.md memory integration, multi-tool sync strategies, and real-world examples.