Cursor rules (.mdc), copilot-instructions.md, and GEMINI.md.
By Bernard Huang · Updated
Put always-on Cursor communication rules in .cursor/rules/agenttune.mdc with alwaysApply: true in the YAML frontmatter. For GitHub Copilot, append your section to .github/copilot-instructions.md. For Gemini CLI and Code Assist, use ~/.gemini/GEMINI.md (personal) or repo GEMINI.md. For Claude Code, use ~/.claude/output-styles/agenttune.md or CLAUDE.md. For OpenAI Codex, use ~/.codex/AGENTS.md.
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 replaced the older single .cursorrules file with modular .mdc files inside .cursor/rules/. Each rule file starts with a three-line YAML frontmatter block telling Cursor when to attach the file. For communication rules that should apply in every composer and chat session, set alwaysApply: true:
remember that files inside .cursor/rules/ are often tracked in git. If you work on a shared repository and want your personal communication rules to stay private to your machine, add .cursor/rules/personal-*.mdc to .git/info/exclude or place personal tone preferences in Cursor's user-level Rules for AI setting.
2. GitHub Copilot: .github/copilot-instructions.md.
GitHub Copilot in VS Code, Visual Studio, JetBrains, and on GitHub.com automatically reads .github/copilot-instructions.md at the root of your repository. Because that file is shared by every contributor on the repository, keep the communication section focused on team-friendly clarity rules alongside your build and test commands:
3. Gemini CLI and Code Assist: GEMINI.md.
Gemini CLI and Gemini Code Assist read ~/.gemini/GEMINI.md for your personal defaults and GEMINI.md in the repository root for project context. Putting your personal AgentTune profile in ~/.gemini/GEMINI.md keeps your voice consistent across every project without touching git history. See our full Google Gemini personality guide for details on combining GEMINI.md with Gems and Saved info.
Exporting any of the 43 AgentTune profiles in one click.
On every profile page in the AgentTune library, choose Coding assistant in the first dropdown of the prompt picker, then pick Cursor · project rule, GitHub Copilot · repository instructions, Gemini CLI · GEMINI.md, Claude Code · output style, or Codex · personal instructions. The picker automatically wraps your selected tuning in the exact frontmatter and comments required by that tool.
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.