Claude Code Setup Playbook — 2 · Permissions
CP — 03

Step 2. Add permissions

Builds on step 1. The commands you listed there become your allow list. The "do not run" commands become your deny list.

Read time1 min
SectionClaude Code Setup Playbook
01 — 2 · permissions

What to do

Why: without this, Claude asks before every command, or the team clicks "always allow" until the list is meaningless.

Do this:

  1. Create .claude/settings.json and commit it. This is the shared team policy.
  2. Put routine, safe commands in allow.
  3. Put anything outward-facing or hard to undo in ask: push, merge, deploy, schema changes.
  4. Put commands that have a safer project alternative in deny.
  5. Personal approvals go in .claude/settings.local.json. Add that file to the repo's .gitignore.
02 — 2 · permissions

Example

Example:

json
{
  "permissions": {
    "allow": [
      "Bash(npm run format)",
      "Bash(npm run lint)",
      "Bash(npm run typecheck)",
      "Bash(npm test*)",
      "Bash(git status*)",
      "Bash(git diff*)",
      "Bash(git log*)"
    ],
    "ask": [
      "Bash(git push*)",
      "Bash(git merge*)",
      "Bash(git reset*)"
    ],
    "deny": [
      "Bash(npm run build*)",
      "Read(./.env)",
      "Read(./.env.*)"
    ]
  }
}
03 — 2 · permissions

Check it works

Check:

  1. Ask Claude to run a denied command. It should refuse.
  2. Run your daily commands. No prompt should appear.
  3. After a normal session, git status should not list settings.local.json.

Watch out:

  • Bash(git *) looks convenient but also allows force-push and hard reset. Allow specific read-only verbs instead.
  • Deny rules match command text. Wrapping a command in bash -c or a script file can slip past. Treat deny rules as a seatbelt, not a sandbox.
  • settings.local.json fills up over time. Prune it now and then.