Cursor rules (.mdc), copilot-instructions.md, and GEMINI.md.
By Bernard Huang · Updated
Every IDE and terminal agent has its own instruction file path and frontmatter syntax. Here is the exact format for Cursor, GitHub Copilot, Gemini CLI, Claude Code, and OpenAI Codex.
On this page
Side-by-side comparison of coding agent instruction files.
| Tool | Personal (user-wide) path | Project (repo-committed) path | Required header / frontmatter |
|---|---|---|---|
| Cursor | Cursor Settings → Rules for AI | .cursor/rules/*.mdc | YAML frontmatter with description and alwaysApply: true |
| GitHub Copilot | VS Code user settings / personal instructions | .github/copilot-instructions.md (plus .github/instructions/*.instructions.md) | Plain Markdown (applyTo frontmatter optional in scoped files) |
| Gemini CLI & Code Assist | ~/.gemini/GEMINI.md | GEMINI.md at repo root or subdirectories | Plain Markdown |
| Claude Code | ~/.claude/CLAUDE.md or ~/.claude/output-styles/*.md | CLAUDE.md at repo root | keep-coding-instructions: true in output-style files |
| OpenAI Codex | ~/.codex/AGENTS.md | AGENTS.md / AGENTS.override.md (32 KiB total cap) | Plain Markdown |
1. Cursor: .cursor/rules/agenttune.mdc with alwaysApply.
Cursor uses modular .mdc files inside .cursor/rules/ rather than a single legacy .cursorrules file. Each file starts with a short YAML frontmatter block. Set alwaysApply: true for communication rules that should apply in every chat and Composer session:
Because .cursor/rules/ is usually tracked in git, keep personal tone private to your machine by adding .cursor/rules/personal-*.mdc to .git/info/exclude or using Cursor’s user-level Rules for AI box.
2. GitHub Copilot: .github/copilot-instructions.md.
GitHub Copilot in VS Code, Visual Studio, JetBrains, and GitHub.com reads .github/copilot-instructions.md from your repo root. Because every contributor shares that file, keep its communication section concise and team-friendly:
3. Gemini CLI and Code Assist: GEMINI.md.
Gemini CLI and Gemini Code Assist read ~/.gemini/GEMINI.md for personal defaults and GEMINI.md in the repo root for project rules. Saving your personal AgentTune profile in ~/.gemini/GEMINI.md applies your style across every repo without touching git. See our Google Gemini personality guide for Gems and Saved Info setup.
Exporting any of the 43 AgentTune profiles in one click.
On any profile page in the AgentTune library, select Coding assistant in the first dropdown, then choose Cursor · project rule, GitHub Copilot · repository instructions, Gemini CLI · GEMINI.md, Claude Code · output style, or Codex · personal instructions. Or merge into an existing file with our Instruction Converter & Merger.
Questions people ask.
Did .cursor/rules/*.mdc replace .cursorrules in Cursor?
Yes. Cursor uses .cursor/rules/*.mdc files with YAML frontmatter (description, globs, and alwaysApply: true/false) so projects can separate always-on rules from file-pattern rules.
Where do I put personal communication rules so I don't commit them to a team repo?
Use ~/.codex/AGENTS.md in OpenAI Codex, ~/.claude/CLAUDE.md or ~/.claude/output-styles/ in Claude Code, ~/.gemini/GEMINI.md in Gemini CLI, or user-level Rules for AI in Cursor Settings.
Can I use the same AgentTune tuning across Cursor, Copilot, Claude Code, and Codex?
Yes. The core bullet points are portable across all coding assistants; only the file path and YAML frontmatter (such as alwaysApply: true for Cursor or keep-coding-instructions: true for Claude Code) differ.
What changed.
- First published comparing .cursor/rules/*.mdc, .github/copilot-instructions.md, GEMINI.md, CLAUDE.md, and AGENTS.md.