Before choosing a sharing approach, it helps to understand the full set of Claude Code configuration files that your team needs to keep in sync. There are six key pieces:
CLAUDE.md — project memory and custom instructions
This is the primary file that shapes how Claude Code behaves. It lives at the root of your project and contains architecture context, coding standards, testing norms, and behavioral instructions. A good team CLAUDE.md might look like:
# Project Instructions
## Architecture
This is a Next.js 14 app with a separate Express API.
Auth is handled in packages/auth using Firebase Auth.
All database access goes through packages/core (Clean Architecture).
## Code Standards
- TypeScript strict mode. No `any` types.
- Prefer functional components with hooks.
- All new code must have unit tests (Vitest).
## Testing
Run `pnpm test` before committing. Run `pnpm test:e2e` for Playwright E2E tests.
Never skip failing tests — fix them or explain why.
## Agent Behavior
- Be concise. Show code, not descriptions of code.
- Never hardcode secrets. Use environment variables only.
- Always run `pnpm check` (lint + type-check) before considering work done.
.claude/settings.json — permissions and tool configuration
This file controls which tools Claude Code can use and what commands it is allowed to run. Sharing a consistent settings.json means every developer's agent has the same guardrails:
{
"permissions": {
"allow": [
"Bash(git *)",
"Bash(pnpm *)",
"Bash(make *)",
"Bash(npx vitest *)"
],
"deny": [
"Bash(rm -rf /)",
"Bash(curl * | bash)",
"Bash(sudo *)"
]
}
}
.claude/commands/*.md — custom slash commands
These are team-specific workflows encoded as slash commands. When shared, every developer gets the same /review, /deploy, or /test commands:
# .claude/commands/review.md
Review the current diff against our coding standards.
Check for:
1. TypeScript strict compliance (no any, no ts-ignore)
2. Test coverage for new functions
3. No hardcoded secrets or API keys
4. Proper error handling (no silent catches)
Output a summary with pass/fail for each check.
.claude/agents/*.md — specialized agent definitions
Agent files define specialized personas that developers can invoke for specific tasks. A shared set ensures the whole team has access to the same expert agents:
# .claude/agents/qa-engineer.md
You are a QA engineer specializing in E2E testing with Playwright.
When given a feature, write comprehensive test scenarios covering:
- Happy path
- Edge cases and error states
- Mobile and desktop viewports
- Accessibility (keyboard navigation, screen readers)
Always use the Page Object pattern and data-testid selectors.
.mcp.json — MCP server configuration
MCP (Model Context Protocol) servers extend Claude Code with external tools. A shared .mcp.json ensures every developer has access to the same integrations:
{
"mcpServers": {
"sentry": {
"command": "npx",
"args": ["-y", "@sentry/mcp-server"],
"env": {
"SENTRY_AUTH_TOKEN": "env:SENTRY_AUTH_TOKEN"
}
},
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"]
}
}
}
.claude/rules/*.md — context-specific rules
Rules files auto-load based on file paths. For example, a rule for API development only loads when editing files in apps/api/. These are powerful for large codebases where a single CLAUDE.md would become unwieldy.
Now that you know what needs to be shared, here are three approaches, from simplest to most robust.