Skip to content
English

Switch theme

// 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

  1. Put the rules in AGENTS.md at the repository root as the single source
  2. Claude Code: reference AGENTS.md from CLAUDE.md, or create a symlink ln -s AGENTS.md CLAUDE.md
  3. Gemini CLI: its settings let you change the context file name so it reads AGENTS.md (check the current official docs)
  4. Cursor: reference the same content from project rules; whether newer versions read AGENTS.md directly is documented officially
  5. 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.

Data updated: Problems & errors