Should you commit CLAUDE.md and the .claude folder? Anthropic's .claude directory reference, checked on 2026-09-23 against Claude Code 2.1.280, advises committing CLAUDE.md, .claude/settings.json, .claude/rules/, skills, agents, commands and .mcp.json to git while keeping CLAUDE.local.md and .claude/settings.local.json untracked. The guidance notes that committing .claude/settings.json is safe but should be reviewed like code because its hooks run shell commands on every teammate's machine, and that Claude Code automatically adds **/.claude/settings.local.json to a user's global git excludes the first time it writes that file. Auto memory lives under ~/.claude/projects//memory/ and is never synced into a repository. 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 https://code.claude.com/docs/en/claude-directory , which marks each file as committed, gitignored or local, and the settings docs https://code.claude.com/docs/en/settings , both checked on 2026-09-23 against Claude Code 2.1.280. Which files in .claude should I commit? | File | Commit? | Why | |---|---|---| | CLAUDE.md or .claude/CLAUDE.md | Yes | Team instructions. The docs describe it as shared with team members through source control. | | CLAUDE.local.md | No | Your private notes for this project. Create it by hand and add it to .gitignore. | | .claude/settings.json | Yes | Shared permissions, hooks, env and plugins for everyone who clones. | | .claude/settings.local.json | No | Personal overrides. Claude Code adds it to your global git excludes when it first writes it. | | .claude/rules/ .md | Yes | Topic or path-scoped instructions for the team. | | .claude/skills/ , .claude/commands/ | Yes | Shared /name workflows. Commands and skills are now the same mechanism; new ones should be skills. | | .claude/agents/ .md | Yes | Shared subagent definitions. | | .claude/agent-memory/ | Yes, if you use it | Written by subagents with memory: project. Use memory: local to keep it out of git. | | .mcp.json | Yes | Team MCP servers. Personal ones go in ~/.claude.json. | | .worktreeinclude | Yes | Lists gitignored files, like .env, to copy into new worktrees. | | ~/.claude/CLAUDE.md , auto memory | Never in a repo | Machine-local. Auto memory lives in ~/.claude/projects/