ClaudeHack
0

Commit shared .claude/settings.json for team permissions

Claude Code / CLAUDE.md·12 hours ago·verified 12 hours ago·intermediate·~10 min setup·verified

Check in project settings so every teammate gets the same allow/deny rules, hooks, and env defaults without redoing /permissions.

The problem

Each developer re-approves the same Bash commands and MCP servers, so the team never converges on a safe shared baseline.

The hack

Put shared permission rules, env, and hooks in `.claude/settings.json` and commit it. Keep personal approvals in `.claude/settings.local.json` (gitignored).

Why it works

Project settings are the official team-shared mechanism. New clones inherit the same policy instead of discovering it one Approve click at a time.

Setup

1. Create `.claude/settings.json` in the repo. 2. Add a `$schema` line plus `permissions.allow` / `permissions.deny` for common safe vs dangerous tools. 3. Commit the file; keep machine-specific approvals in `settings.local.json`. 4. Have teammates restart Claude Code (or wait for live reload) and accept workspace trust once.

Code

{
  "$schema": "https://json.schemastore.org/claude-code-settings.json",
  "permissions": {
    "allow": ["Bash(git status *)", "Bash(rg *)"],
    "deny": ["Read(./.env)", "Read(./.env.*)"]
  }
}

Additional details

User-level settings live in `~/.claude/settings.json` and apply to every project; use them for personal defaults, not team policy.

Source

anthropic·View original →·by Anthropic Docs

Does this still work?

0 said it works · 0 said it's broken

Discussion

No comments yet. Be the first to say whether this worked for you.