Skip to content
How it learnsFrom coding sessions, reviews, Slack and docs.Only what fitsEach session gets the few rules its task needs.Pull request reviewEvery PR checked against your team’s rules.Keep it trueA gate, conflicts, disputes and stale rules, handled.HandoffsCarry the work to another session or a teammate.SecurityWhat it sends, what it changes and how to leave.
Engineering teamsOne agent or several: what one person learns, every session uses.PR review onlyInstall the GitHub App. Nothing on anyone’s machine.Teams that mix agentsClaude Code, Cursor, Codex and Copilot, the same rules.On your ownYour corrections follow you across repos, machines and agents.Book a call30 minutes with Roei, if you want a hand. Never required.
DocsPricingSign in
Connect your agents →
For teamsOn your ownPR review onlyHow it learnsOnly what fitsPull request reviewKeep it trueSecurityDocsPricingSign inConnect your agents →
Home/Blog

Blog

AGENTS.md, Cursor rules and Copilot instructions

  • AGENTS.md vs CLAUDE.md
  • Keep rule files in sync
  • Sync rules across repos
  • 3,905 files checked
  • Why Copilot ignores it
  • Cursor Team Rules
  • Why Codex ignores it
  • Cursor rules
  • copilot-instructions.md
  • Claude Code and AGENTS.md
  • AGENTS.md research

CLAUDE.md and context engineering

  • Why Claude ignores it
  • CLAUDE.md length
  • Which rules got used
  • Context rot, stale rules
  • Growing CLAUDE.md
  • Claude Code best practices
  • Context engineering, Claude 5
  • Karpathy CLAUDE.md
  • Committing CLAUDE.md

Built-in agent memory

  • Agent memory compared
  • GitHub Copilot Memory
  • Make Claude Code remember
  • Claude Tag vs Claude Code
  • Codex memories
  • Cursor memories
  • Claude Code auto memory
  • Memory or documentation?

Team knowledge and shared conventions

  • Claude Code team memory
  • Stop repeated mistakes
  • Shared memory across agents
  • Hand off between agents
  • Claude Code second brain
  • Company brain
  • Slack decisions
  • Memory poisoning
  • Karpathy's LLM wiki
  • ADRs for agents

Skills, hooks and permissions

  • Rules vs skills
  • Claude Code hooks
  • Codex skills
  • Auto mode
  • CLAUDE.md vs skills vs hooks
  • Claude Code skills

AI code review and PR guardrails

  • PR review against AGENTS.md
  • Review comments to rules

Memory tools and alternatives

  • Best company brain tools
  • Unblocked alternatives
  • Supermemory alternatives
  • Best MCP memory servers
  • claude-mem alternatives
  • Supermemory Company Brain alternatives
  • Mem0 alternatives
  • claude-mem

Blog

How to keep CLAUDE.md, AGENTS.md and .cursorrules in sync

Published November 16, 2026

To keep CLAUDE.md, AGENTS.md and .cursorrules in sync, stop keeping three copies. Make AGENTS.md the one file and point CLAUDE.md at it, or generate every file from one source with ruler or rulesync and a pre-commit hook. Both fix the drift. Neither writes the rule a teammate taught their agent on Monday, which is the gap Harbor fills.

The drift is easy to miss. Someone fixes CLAUDE.md, nobody touches .cursorrules, and the teammate on Cursor keeps getting the old mistake. Here are the honest options, cheapest first.

Option 1: one AGENTS.md, no tool

Make AGENTS.md the source of truth. Codex reads it natively, and Cursor and Copilot read it too. Put one line at the top of CLAUDE.md:

@AGENTS.md

Claude Code imports the file, so there is no second copy to drift, and CLAUDE.md keeps only what Claude alone needs (does Claude Code read AGENTS.md?). Cursor treats the root .cursorrules file as legacy, so moving its lines into AGENTS.md removes a file instead of syncing it.

Good fit if you want zero tooling and the team is disciplined about editing one file. For many small teams this is all you need.

Option 2: generate each file from one source

  • Ruler keeps your rules in a .ruler/ folder and writes each agent's file for you: CLAUDE.md, AGENTS.md, Cursor rules and more. It can also hand out MCP server config.
  • rulesync does the same for rules, ignore files and MCP config, and can import the rule files you already have.

Pair either one with a pre-commit, husky or lefthook hook, or a CI job, that regenerates the files and fails when they drift. To carry the same rules to many repos, see syncing AGENTS.md and CLAUDE.md across repos.

Good fit if you want a file per agent, your rules change rarely, and someone on the team is happy to own the source.

What sync does not solve

  • Sync copies what someone wrote. It does not write the rule. The lesson a teammate taught their agent on Monday is still in their head, or in their agent's memory on their laptop, until someone opens a file.
  • Every session loads the whole file. A long rulebook goes into every session whether the task needs it or not, and agents follow a long file less well (why a growing CLAUDE.md stops working).

Option 3: corrections that reach every agent, with Harbor

Harbor works from the other end. It does not generate rule files. When a teammate corrects their agent in a session, or the team decides something in a review thread, Slack or docs, Harbor keeps it as a rule, and every agent on the team gets it from then on: Claude Code, Cursor, Codex and Copilot, on any repo or machine the Space covers.

  • One command connects your agents: npx harborloop init.
  • Only what fits. Before each prompt, the agent gets at most three ranked rules matched to the task, plus any your team pinned as always on, not the whole rulebook.
  • You set the gate. Every new rule can wait for a person to approve it, or only the ones that need one.
  • Checked on every pull request. A GitHub App reviews each pull request against those rules and your CLAUDE.md, AGENTS.md and .claude/rules files, read whole however long, from the base branch so a PR cannot rewrite them.

Good fit if your rules mostly come from fixing the agent, and you are tired of saying the same thing twice. See what Harbor does, or the quickstart.

Can I use both?

Yes. Keep AGENTS.md, ruler or rulesync for your checked-in files if you like them. Harbor imports the rule files you already have when you set it up, its reviewer reads them on every pull request, and it covers the corrections nobody got around to writing down.

Quick pick

You wantUse
No tooling at allOne AGENTS.md, imported from CLAUDE.md
A generated file per agent that never driftsRuler or rulesync, plus a pre-commit hook or CI
Corrections that reach every agent without editing files, checked on PRsHarbor
npx harborloop init

Questions

How do I keep CLAUDE.md, AGENTS.md and .cursorrules in sync across a small team?

Keep one copy. Make AGENTS.md the source of truth, which Codex, Cursor and Copilot read, and put @AGENTS.md at the top of CLAUDE.md so Claude Code imports it. Cursor treats .cursorrules as legacy, so move its lines into AGENTS.md. If you want a generated file per agent, use ruler or rulesync with a pre-commit hook or CI job that fails on drift.

What is the best tool to share coding rules across Claude Code, Cursor and Codex?

For files: ruler keeps rules in a .ruler/ folder and writes each agent's file, and rulesync does the same and can import the files you have. For rules that come from correcting the agent: Harbor keeps each correction as a rule, through a gate you set, and serves it to Claude Code, Cursor, Codex and Copilot, at most three ranked rules per prompt.

What is the difference between ruler and rulesync?

Both generate each agent's rule file from one source. Ruler works from a .ruler/ directory and can also hand out MCP server config. rulesync covers rules, ignore files and MCP config, and can import the rule files a repo already has.

Can I use ruler or rulesync together with Harbor?

Yes. Keep your checked-in files generated as they are. Harbor imports them at setup, its GitHub App reviews each pull request against CLAUDE.md, AGENTS.md and .claude/rules read from the base branch, and it covers the corrections nobody wrote into a file.

More on AGENTS.md, Cursor rules and Copilot instructions

  • AGENTS.md vs CLAUDE.md: which tools read which
  • How to sync AGENTS.md and CLAUDE.md across all your repos
  • We checked 3,905 CLAUDE.md and AGENTS.md files on GitHub
  • Why does Copilot ignore copilot-instructions.md?

Check your AGENTS.md or CLAUDE.md for free →

Your team’s rules, in every agent, checked on every PR.

Harbor is shared memory for your team’s Claude Code, Cursor, Codex and Copilot. Free for you and one teammate. No card. No end date.

Start free →

Product

  • How it learns
  • Only what fits
  • Pull request review
  • Keep it true
  • Handoffs
  • The result
  • Security
  • For coding agents
  • Pricing

Developers

  • Docs
  • Quickstart
  • Install
  • CLI
  • MCP server
  • Served and cited
  • Rule-file checker
  • Blog

Guides

  • Why Claude ignores CLAUDE.md
  • AGENTS.md vs CLAUDE.md
  • Share Claude Code memory with a team
  • Why Codex ignores AGENTS.md
  • Why Cursor ignores rules
  • Copilot instructions vs AGENTS.md
  • Shared memory across agents
  • Make Claude Code remember

Compare

  • All comparisons
  • vs Mem0
  • vs Zep
  • vs Unblocked
  • vs ByteRover
  • vs Cognee
  • vs Hindsight
  • vs OpenViking
  • vs Supermemory
  • vs Glen
  • vs MemPalace
  • vs Sentra

Company

  • Questions
  • Contact
  • X
  • LinkedIn
  • Privacy Policy
  • Terms of Service
  • Data Processing Agreement
  • Refund Policy
© 2026 HarborConnect your agents