Last updated: 2026-03-13
How each tool discovers project-level instruction, guidance, and rule files.
Note
Standalone files vs Rule dirs: standalone instruction files are always loaded in
full every session. Rule directories support path-scoped lazy loading — rules
only enter context when you touch matching files (e.g. .claude/rules/ with paths
frontmatter, .cursor/rules/ with glob frontmatter). For small repos with few rules,
standalone files are simpler and more universal. Rule directories become worthwhile
when rules are numerous, verbose, or only relevant to specific parts of the codebase.
| File | Claude Code | Cursor | Codex | CodeRabbit | Greptile |
|---|---|---|---|---|---|
AGENTS.md |
✅ via @ import |
✅ | ✅ walks dirs | ✅ | ✅ |
CLAUDE.md |
✅ | ❌ | ❌ | ✅ | ✅ |
GEMINI.md |
❌ | ❌ | ❌ | ✅ | ❓ |
.cursorrules |
❌ | ✅ | ❌ | ✅ | ✅ |
.windsurfrules |
❌ | ❌ | ❌ | ✅ | ❓ |
.github/copilot-instructions.md |
❌ | ❌ | ❌ | ✅ | ❓ |
| Directory | Claude Code | Cursor | Codex | CodeRabbit | Greptile |
|---|---|---|---|---|---|
.claude/rules/ |
✅ md, paths frontmatter |
❌ | ❌ | ❌ | ❌ |
.cursor/rules/ |
❌ | ✅ .mdc/.md, glob frontmatter |
❌ | ✅ | ❓ |
.codex/rules/ |
❌ | ❌ | ✅ Starlark .rules |
❌ | ❌ |
.rules/ |
❌ | ❌ | ❌ | ✅ | ❓ |
.clinerules/ |
❌ | ❌ | ❌ | ✅ | ❓ |
Skills follow the Agent Skills open standard (SKILL.md with YAML frontmatter).
30+ tools support the standard including Claude Code, Cursor, Codex, GitHub Copilot,
Gemini CLI, VS Code, Goose, Roo Code, and others.
| Directory | Claude Code | Cursor | Codex | CodeRabbit* | Greptile* |
|---|---|---|---|---|---|
.claude/skills/ |
✅ | ✅ compat | ❌ | ❓ | ❓ |
.cursor/skills/ |
❌ | ✅ | ❌ | ❓ | ❓ |
.agents/skills/ |
❌ | ✅ compat | ✅ | ❓ | ❓ |
.codex/skills/ |
❌ | ✅ compat | ❓ | ❓ | ❓ |
* CodeRabbit and Greptile are PR review tools — they don't have native skill
mechanics (no slash commands, no description-based matching). They can read any
file in the repo as text during reviews, and CodeRabbit's filePatterns can be
customized to include additional paths.
-
Skills: use both
.claude/skills/and.agents/skills/to cover all three coding agents (Claude + Cursor via.claude/, Codex + Cursor via.agents/). To avoid duplication, keep canonical skills in one location and symlink from the other:.agents/skills/my-skill -> .claude/skills/my-skillSkills use the Agent Skills standard — a
SKILL.mdwith YAML frontmatter (name,description) and markdown body. -
AGENTS.md is the only file all five tools read. Use it as the universal entry point for global instructions. See the AGENTS.md spec for the open format.
-
Rules: if you must support path-scoped lazy loading for your rules, there are different options:
-
Treat AGENTS.md as the entrypoint instead of agent specific configs:
- Keep rules in a canonical location
- List paths to the rule files with a short explanation and instruct the agent
to real these when the scope matches a task they need to run. Do NOT use
@to list files to prevent Claude from eagerly reading them at startup. - Could technically still list paths to agent-specific rules (
.claude/rules,.cursor/rules,.codex/rules) to at least provide references to other rules.
-
Stick to agent-specific rules definitions:
- For Claude + Cursor coverage, you could keep canonical rules in
.claude/rules/and symlink from.cursor/rules/or vice-versa, since both support plain.mdfiles. However, avoid agent-specific frontmatter (pathsfor Claude, globs for Cursor) in these shared rules, or it will be ignored by the other agent. - Codex rules use Starlark (not markdown) — cannot be shared with other agents.
- For Claude + Cursor coverage, you could keep canonical rules in
- Note: CodeRabbit/Greptile are review tools that index the whole repo. They find
content regardless of directory. CodeRabbit's
filePatternscan be customized to scan additional paths.
-