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
Start free →
For teamsFor individualsHow it worksCode reviewSecurityDocsPricingSign inStart free →
Home/Blog

Blog

  • 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

Should you commit CLAUDE.md and the .claude folder?

Published: September 23, 2026

Yes. Commit CLAUDE.md, .claude/settings.json, .claude/rules/, skills, agents, commands and .mcp.json, so everyone who clones the repo gets the same setup. Keep CLAUDE.local.md and .claude/settings.local.json out of git. Auto memory never enters the repo; it lives under ~/.claude.

This follows Anthropic's own .claude directory reference, which marks each file as committed, gitignored or local, and the settings docs, both checked on 2026-09-23 against Claude Code 2.1.280.

Which files in .claude should I commit?

FileCommit?Why
CLAUDE.md or .claude/CLAUDE.mdYesTeam instructions. The docs describe it as shared with team members through source control.
CLAUDE.local.mdNoYour private notes for this project. Create it by hand and add it to .gitignore.
.claude/settings.jsonYesShared permissions, hooks, env and plugins for everyone who clones.
.claude/settings.local.jsonNoPersonal overrides. Claude Code adds it to your global git excludes when it first writes it.
.claude/rules/*.mdYesTopic or path-scoped instructions for the team.
.claude/skills/, .claude/commands/YesShared /name workflows. Commands and skills are now the same mechanism; new ones should be skills.
.claude/agents/*.mdYesShared subagent definitions.
.claude/agent-memory/Yes, if you use itWritten by subagents with memory: project. Use memory: local to keep it out of git.
.mcp.jsonYesTeam MCP servers. Personal ones go in ~/.claude.json.
.worktreeincludeYesLists gitignored files, like .env, to copy into new worktrees.
~/.claude/CLAUDE.md, auto memoryNever in a repoMachine-local. Auto memory lives in ~/.claude/projects/<project>/memory/ and is not synced.

Should I commit the .claude folder?

Mostly, yes. The docs put it plainly: commit most files in .claude/ so the team shares them. The one file that should never be tracked is settings.local.json, and Claude Code handles it for you: the first time it writes that file in a repo that does not already ignore it, it adds **/.claude/settings.local.json to your global git excludes. That protects you, not your teammates. If you want the rule in the repo, add the same line to the project .gitignore.

Tracking the local file has a side effect worth knowing. While it is untracked, its allow rules apply without the workspace trust step. Once git tracks it, the trust step applies to it as it does to the committed settings.json.

What is CLAUDE.local.md for?

Your sandbox URLs, your preferred test data, anything true for you and not for the team. Claude Code loads it after the CLAUDE.md at the same level, so it is the last thing Claude reads there. Two traps:

  • It only exists in the worktree where you created it. For notes that follow you across worktrees, import a file from your home directory instead.
  • It counts as a CLAUDE.md for the AGENTS.md check. In a repo that relies on AGENTS.md, creating one stops Claude reading AGENTS.md for you under the default mode.

Is it safe to commit .claude/settings.json?

It is safe to commit and worth reviewing like code, because it is code. The settings docs recommend committing it so everyone gets the same permissions, hooks and plugins. A hook in that file runs shell commands on every teammate's machine, which is why Claude Code asks each person to trust the workspace before project hooks and allow rules take effect. Keep secrets out of its env block; it is in git.

The same caution applies to CLAUDE.md imports. The first time Claude Code sees an @path import that resolves outside the working directory, it asks for approval, because a file someone else committed chose what gets loaded.

Should CLAUDE.md be in .gitignore?

The project file, no. Ignoring it means every engineer writes their own, and the agent on each laptop works from a different brief. If something in it is personal, that line belongs in CLAUDE.local.md; if it is true for you in every repo, it belongs in ~/.claude/CLAUDE.md. The one case for keeping a project file out of a public repo is content you would not publish: internal hostnames, customer names, incident details. Strip those rather than ignore the file.

Can I commit Claude Code's auto memory?

Not in any supported way. Auto memory is written to ~/.claude/projects/<project>/memory/, one directory per repository shared across its worktrees, and the docs say plainly that it is not shared across machines or cloud environments. The autoMemoryDirectory setting moves it, but only to an absolute path or one under ~/. When Claude saves something the whole team should know, the route today is by hand: open MEMORY.md with /memory, copy the line into CLAUDE.md, and open a pull request.

How do I share CLAUDE.md with my team?

Commit it, and review changes to it in pull requests like any other file. For rules that must reach every repo in the company, an admin can deploy a managed CLAUDE.md to a fixed system path (/Library/Application Support/ClaudeCode/CLAUDE.md on macOS, /etc/claude-code/CLAUDE.md on Linux). Managed files cannot be excluded by individual settings.

If some of the team uses Cursor, Codex or Copilot, commit the shared rules as AGENTS.md and point CLAUDE.md at it with @AGENTS.md. Codex does not read CLAUDE.md at all. The full matrix is in AGENTS.md vs CLAUDE.md, and the rest of the setup is in Claude Code best practices for teams.

What git does not solve

Git answers where the file lives and who changed which line. Three questions stay open.

  • Who reviews a rule? A pull request review checks the diff. It does not check whether the line is still true, or whether it contradicts a line someone else added in another directory. The docs warn that when two rules conflict, Claude may pick one arbitrarily.
  • Where does the rule come from? The decision that webhook handlers acknowledge and enqueue was made in #eng-payments and argued again in a review thread. It reaches the file only when someone remembers to copy it.
  • What does each agent actually get? Claude Code's auto memory is machine-local and not synced. What one engineer's agent learned on Tuesday is not in anyone's committed file on Wednesday, and a teammate on Codex never sees it.

Harbor is built for those three. It reads the places the team already decides (Slack channels you opt in, merged pull requests and their review threads, docs) and turns them into facts. You set the gate: under the default Hybrid mode routine conventions go live on trial, and anything risky or a clash Harbor cannot settle is held for a person. harbor init wires the same facts into Claude Code, Codex, Cursor and Copilot, and what a session learns goes back through that same gate. The quickstart is the place to start.

Related: how each agent's memory is scoped and one memory for Claude Code, Cursor and Codex.

Questions

Should CLAUDE.md be in .gitignore?

No. The project CLAUDE.md is meant to be shared through source control. Personal notes go in CLAUDE.local.md, which you should gitignore, or in ~/.claude/CLAUDE.md for every repo.

Should I commit .claude/settings.local.json?

No. It holds your personal overrides and the permissions you approved. Claude Code adds it to your global git excludes the first time it writes the file; add it to the project .gitignore too if you want the rule shared.

Is Claude Code auto memory shared with my team?

No. Auto memory lives under ~/.claude/projects on your machine and is not shared across machines or cloud environments. To share something it learned, copy the line into CLAUDE.md and open a pull request.

Can teammates using Codex use my CLAUDE.md?

Codex does not read CLAUDE.md by default. Put the shared rules in AGENTS.md and add a CLAUDE.md that imports it with @AGENTS.md, so Claude Code, Codex, Cursor and Copilot read the same text.

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 HarborStart free