Commit shared .claude/settings.json for team permissions
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.*)"]
}
}
Discussion
No comments yet. Be the first to say whether this worked for you.