Skip to content
For your teamWhat one developer teaches an agent, a teammate’s agent can use.How it worksWhere a lesson starts and how it reaches every agent.Code reviewYour team’s knowledge, checked in every PR.SecurityWhat it sends, what it changes and how to leave.Book a call30 minutes with Roei, if you want a hand. Never required.
On your ownYour corrections follow you across agents and repos.Install itnpx harborloop init, in your repo.Every commandWhat the CLI does, and how to take it off again.
DocsPricingSign in
Connect your agents →
For teamsFor individualsHow it worksCode reviewSecurityDocsPricingSign inConnect your agents →
Home/Blog

Blog

  • Sync rules across repos
  • Hand off between agents
  • Supermemory alternatives
  • PR review against AGENTS.md
  • Claude Code second brain
  • Why Copilot ignores it
  • Cursor Team Rules
  • Rules vs skills
  • Claude Tag vs Claude Code
  • GitHub Copilot Memory
  • Codex memories
  • Cursor memories
  • Claude Code auto memory
  • Claude Code team memory
  • Supermemory Company Brain alternatives
  • 3,905 files checked
  • Why Codex ignores it
  • Mem0 alternatives
  • Codex skills
  • Karpathy's LLM wiki
  • Auto mode
  • Memory or documentation?
  • Best company brain tools
  • Claude Code and AGENTS.md
  • Claude Code skills
  • Claude Code hooks
  • claude-mem
  • Claude Code best practices
  • Karpathy CLAUDE.md
  • AGENTS.md vs CLAUDE.md
  • Cursor rules
  • copilot-instructions.md
  • Why Claude ignores it
  • CLAUDE.md length
  • Committing CLAUDE.md
  • Agent memory compared
  • CLAUDE.md vs skills vs hooks
  • Make Claude Code remember
  • Review comments to rules
  • Slack decisions
  • Company brain
  • Context engineering, Claude 5
  • Context rot, stale rules
  • AGENTS.md research
  • ADRs for agents
  • Memory poisoning
  • Best MCP memory servers
  • Shared memory across agents
  • Growing CLAUDE.md
  • Which rules got used

Blog

How to sync AGENTS.md and CLAUDE.md across all your repos

Published: November 13, 2026

To sync AGENTS.md and CLAUDE.md across repos, keep the shared rules in one repository and send them to every other repo as a pull request: either a GitHub Action that copies the file out on each push, or rulesync, which installs rules from a shared repo and writes each agent's file. Put the shared text in AGENTS.md, and have each CLAUDE.md import it, so you sync one file, not two.

Sync one file: AGENTS.md

Codex, Cursor and Copilot read AGENTS.md. Claude Code reads it when the repo has no CLAUDE.md, and otherwise through a line that says @AGENTS.md at the top of the CLAUDE.md (Does Claude Code read AGENTS.md?). So the shared rules belong in AGENTS.md, and CLAUDE.md keeps the import plus anything only Claude needs. Which file each tool reads is in AGENTS.md vs CLAUDE.md.

Push: a GitHub Action that opens a pull request in every repo

repo-file-sync-action runs in the rules repo on every push and copies the files you list into the repos you list. By default it opens a pull request in each one, so every team still decides what merges:

# .github/sync.yml in your rules repo
group:
  - files:
      - source: AGENTS.md
        dest: AGENTS.md
    repos: |
      acme/payments
      acme/web
      acme/api
  • It needs its own token. The default GITHUB_TOKEN cannot write to other repos. Its README asks for a personal access token with full repo scope, or a GitHub App installation token.
  • It copies the whole file. A repo's own root rules are overwritten on the next sync, so this suits repos whose root rules are all shared. To mix in each repo's own, use rulesync, below.
  • Check it is still maintained. Its last release, v1.21.1, is from May 2024. A short workflow of your own with gh pr create does the same job.

Pull: rulesync and a shared rules repo

rulesync is a command-line tool that writes the rules file for each agent (Claude Code, Codex, Cursor, Copilot and dozens more) from one source in a .rulesync/ folder. It can also pull rules from another GitHub repo and pin them in a lockfile:

# in each repo, once
npx rulesync add acme/ai-standards --rules team-rules
npx rulesync install && npx rulesync generate

# in CI: fail when this repo is behind the shared rules
npx rulesync install --outdated

Each repo keeps its own rules next to the shared ones, and rulesync combines them into one AGENTS.md, so nothing is overwritten. The pull runs when someone runs it, so add the --outdated check to CI to see which repos are behind.

Without touching the repos: each vendor's admin setting

An admin setting reaches every repo on a machine or in an organization, one tool at a time:

ToolOrganization-wide instructionsReaches
Claude CodeA managed CLAUDE.md at /Library/Application Support/ClaudeCode/ (macOS) or /etc/claude-code/ (Linux), or a claudeMd key in managed settingsEvery session on that machine. You ship the file with MDM or similar
CodexNone documented. Managed configuration covers approvals, sandbox, network and telemetryEach person's ~/.codex/AGENTS.md is the closest thing
CursorTeam Rules, on Teams and EnterpriseEvery member, and an admin can enforce them
CopilotOrganization custom instructions, in the organization’s Copilot settingsCloud sessions on GitHub and code review, not local sessions in an editor

That is three admin consoles, each on its own plan, and nothing for Codex, which is why most teams end up syncing a file anyway.

What a sync does not do

  • Edits in one repo do not travel back. Someone fixes a rule in acme/web, and the next sync either overwrites it or conflicts with it. Only edits made in the rules repo reach everyone.
  • Nobody writes the new rule down. A correction typed in an agent session, or a review comment on a pull request, stays where it was said unless a person copies it into the rules repo.
  • A file grows until it stops working. One shared file for every repo gets long, and agents follow a long file less well (why a growing CLAUDE.md stops working).

With Harbor: one source the agents read, no copies

Harbor keeps the team's rules in one place and hands them to Claude Code, Codex, Cursor and Copilot at the start of each session, through hooks that npx harborloop init installs, so there is no file in each repo to keep in step. Each session gets the rules that apply to its repo and task, not the whole set. New rules come from where the team already decides (agent sessions, pull request reviews, Slack threads and docs), and you set the gate on which go live without a person. The AGENTS.md and CLAUDE.md files you already have are imported when you set it up, and each of their rules waits for a person to review it (rules files). The steps are in the quickstart, and the wider picture in sharing memory across Claude Code, Codex and Cursor.

Questions

How do I share one AGENTS.md across many repositories?

Keep it in a rules repo and send it out as pull requests. A GitHub Action such as repo-file-sync-action copies the file into each repo you list on every push. rulesync instead lets each repo pull named rules from the shared repo, pins them in a lockfile and combines them with the repo's own.

Do I need to sync CLAUDE.md as well as AGENTS.md?

No. Put the shared rules in AGENTS.md and start each CLAUDE.md with a line that says @AGENTS.md. Claude Code then reads the shared file, and CLAUDE.md keeps only what Claude alone needs. Claude Code also reads AGENTS.md by itself when a repo has no CLAUDE.md.

Can an admin set CLAUDE.md for the whole organization?

Yes, per machine. Claude Code reads a managed CLAUDE.md from /Library/Application Support/ClaudeCode/ on macOS or /etc/claude-code/ on Linux, or a claudeMd key in managed settings, shipped to each machine with MDM or a similar tool. Developers cannot exclude it.

Does Codex have organization-wide instructions?

Not in its docs as of 13 November 2026. Codex managed configuration covers approvals, sandbox, network and telemetry. Each person can keep ~/.codex/AGENTS.md for their own repos, and the shared text otherwise has to be in each repo's AGENTS.md.

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 works
  • Every agent
  • Code review
  • The result
  • Security
  • For coding agents
  • Pricing

Developers

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

Guides

  • Why Claude ignores CLAUDE.md
  • AGENTS.md vs CLAUDE.md
  • Does Claude Code read AGENTS.md?
  • Why Codex ignores AGENTS.md
  • Why Cursor ignores rules
  • Copilot instructions vs AGENTS.md
  • Shared memory across agents
  • Make Claude Code remember

Compare

  • vs Mem0
  • vs Zep
  • vs Unblocked
  • vs ByteRover
  • vs Cognee
  • vs Hindsight
  • vs OpenViking
  • vs Supermemory
  • vs Glen

Company

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