// How-to · Share rules and skills across agents
Share one set of rules across Claude Code, Codex, Cursor and Gemini CLI
Each agent reads a different rules file. Keep one main file (AGENTS.md is the usual choice) and point the other tools at it by reference, symlink or configuration.
verified 2026-10-103 official sources
Scenario: Share rules and skills across agents →
Symptoms
- The same rules are maintained separately in CLAUDE.md, .cursor/rules and GEMINI.md and drift apart
Common causes
- Each tool reads a different default file name and location
How to fix
- Put the rules in
AGENTS.mdat the repository root as the single source - Claude Code: reference
AGENTS.mdfromCLAUDE.md, or create a symlinkln -s AGENTS.md CLAUDE.md - Gemini CLI: its settings let you change the context file name so it reads
AGENTS.md(check the current official docs) - Cursor: reference the same content from project rules; whether newer versions read AGENTS.md directly is documented officially
- After changing rules, run a small task in each tool to confirm they are picked up
Notes
- Symlinks need extra permissions on Windows; use references instead
Official references
Compiled from official documentation and public discussions on 2026-10-10; not yet reproduced in our own environment. Follow the official docs if they differ.