Course contents
One repo, many AI tools: avoid duplicate rules and skills
On this page
The double-load problem
Tools have become generous about what they read. That's good for portability, and it means a repo can easily feed the same guidance to one tool twice.
Who reads which skills folder
| Folder | Read by |
|---|---|
.agents/skills/ | Codex, Antigravity CLI, Cursor, GitHub Copilot, Devin, Cline |
.claude/skills/ | Claude Code, Cursor, GitHub Copilot, Cline |
.cursor/skills/ | Cursor |
.github/skills/ | GitHub Copilot |
.devin/skills/ | Devin |
.cline/skills/ | Cline |
Who reads AGENTS.md
Codex, Cursor, Copilot, Devin, Cline and Antigravity CLI read AGENTS.md. Claude Code reads it when there's no CLAUDE.md, or through an @AGENTS.md import.
So if you install a Next.js section into AGENTS.md for Codex and a Cursor rule into .cursor/rules/, a Cursor user gets Next.js guidance from both. If you install the skill for Cursor and Claude Code, a Cursor user sees nextjs-code-review in .cursor/skills/ and again in .claude/skills/.
Duplicates waste context and, when the copies differ, give the agent two slightly different versions to pick from.
Pick a source of truth
The cleanest setups have one always-on file and one skills folder, plus thin bridges. Choose based on which tools your team uses.
Layout A: Codex or Antigravity in the mix
Use AGENTS.md and .agents/skills/ as the shared layer. Six of the seven tools read both directly.
AGENTS.md # shared standards, presets sections appended here
CLAUDE.md # @AGENTS.md
.agents/skills/
└── nextjs-code-review/
└── SKILL.md
.claude/skills -> ../.agents/skills # symlink, so Claude Code sees the same skills
Install once:
npx presets-dev add nextjs --tool codex,antigravity --agents-md--agents-md sends Antigravity's section to AGENTS.md too. Because the Codex section for that stack is already there, the CLI writes it once instead of also creating a GEMINI.md copy. Then bridge Claude Code:
echo '@AGENTS.md' > CLAUDE.md # skip if you already have one; add the line instead
mkdir -p .claude && ln -s ../.agents/skills .claude/skills # only if .claude/skills does not exist yet
This is the pattern vercel/next.js uses: a root AGENTS.md, skills in .agents/skills/, and .claude/skills as a symlink to ../.agents/skills.
Trade-offs:
- Stack standards are always on, not glob-scoped. Watch Codex's 32 KiB combined limit.
- Cursor, Copilot and Cline read both
.agents/skills/and.claude/skills/, so through the symlink they may list each skill twice. If yours does, point that tool at one folder only. Claude Code itself loads a symlinked skill once.
Layout B: Claude Code plus an editor tool
For teams on Claude Code plus Cursor, Copilot or Cline, use .claude/skills/ as the shared skills folder (all four read it) and install each tool's scoped rules:
npx presets-dev add nextjs --tool claudenpx presets-dev add nextjs --tool cursor --only standardsResult:
.claude/rules/nextjs-rules.md # Claude Code, scoped by paths
.claude/skills/nextjs-code-review/SKILL.md # Claude Code, Cursor, Copilot, Cline
.cursor/rules/nextjs-rules.mdc # Cursor, scoped by globs
Each tool gets glob-scoped standards and one copy of the skill. Swap cursor for copilot or cline as needed.
Layout C: one tool
If everyone uses the same tool, just install for it. Skip the bridges.
What the CLI does for you
- Shared skill once. Cursor, Copilot, Windsurf, Cline, Codex and Antigravity all read
.agents/skills/. Select two or more of them and the skill is written there once. - Skips a tool's own copy when the shared one exists. For Cursor, Copilot, Windsurf and Cline, if
.agents/skills/<skill>/exists, the CLI printsskipped (uses shared .agents/skills/<skill>)instead of writing a second copy. - Follows links inside the project. With
AGENTS.md -> CLAUDE.mdor.claude/skills -> ../.agents/skills, it writes the real file once. - Appends, never replaces.
AGENTS.mdandGEMINI.mdget marked sections.
What it doesn't do yet: it doesn't detect .claude/skills/ overlaps. Selecting --tool cursor,claude writes the skill to both .cursor/skills/ and .claude/skills/. Use --only as in Layout B.
Keep tool-specific notes tool-specific
Shared files should hold shared facts. Put the rest where only one tool reads it:
| Note | Where |
|---|---|
| "Use plan mode for big refactors" | CLAUDE.md, below the @AGENTS.md line |
| A Cursor-only Custom Mode skill | .cursor/skills/ |
| Copilot code review exclusions | .github/instructions/*.instructions.md with excludeAgent |
| Codex review checks | A ## Code Review Rules section in AGENTS.md |
Common mistakes
- Installing every tool "just in case". Seven copies of the skill means duplicates for most tools. Install for the tools your team uses.
GEMINI.mdandAGENTS.mdwith the same section. Antigravity loads both. Use--agents-mdwhen Codex is also in use.- Forgetting the Claude bridge. With a
CLAUDE.mdand no import, Claude Code ignoresAGENTS.mdby default. - Hand-editing inside presets markers. A later
--forcerun replaces the text between the markers. Put your additions outside them.
Recap
- Many tools read
AGENTS.md,.agents/skills/and.claude/skills/, so duplicates are easy. - Choose one always-on file and one skills folder, plus bridges.
- Codex or Antigravity in the mix:
AGENTS.md+.agents/skills/+@AGENTS.md+ a.claude/skillssymlink. - Claude Code plus an editor:
--tool claude, then the editor with--only standards.
Next step
Monorepos: nesting rules and skills per package.