Black Friday sale: 85 Claude Code agents for $29 one-time · lifetime updatesGet access →
Free Tool

Claude Code Permissions Generator

Decide once which commands Claude Code may run without asking, which need your OK, and which are never allowed. This builds the permissions block of settings.json using the official rule syntax.

Project scripts
npm run lint
Bash(npm run lint *)
npm run test
Bash(npm run test *)
npm run build
Bash(npm run build *)
npm install
Bash(npm install *)
Git
git status
Bash(git status *)
git diff
Bash(git diff *)
git log
Bash(git log *)
git add
Bash(git add *)
git commit
Bash(git commit *)
git push
Bash(git push *)
git reset --hard
Bash(git reset --hard *)
Files
Edit files
Edit
rm -rf
Bash(rm -rf *)
Secrets
Read .env
Read(./.env)
Read .env.*
Read(./.env.*)
Read secrets/
Read(./secrets/**)
Web
Web search
WebSearch
Fetch any web page
WebFetch
curl
Bash(curl *)
settings.json
.claude/settings.json
{
  "$schema": "https://json.schemastore.org/claude-code-settings.json",
  "permissions": {
    "allow": [
      "Bash(npm run lint)",
      "Bash(npm run lint *)",
      "Bash(npm run test)",
      "Bash(npm run test *)",
      "Bash(npm run build)",
      "Bash(npm run build *)",
      "Bash(git status)",
      "Bash(git status *)",
      "Bash(git diff)",
      "Bash(git diff *)",
      "Bash(git log)",
      "Bash(git log *)",
      "Bash(git add)",
      "Bash(git add *)",
      "WebSearch"
    ],
    "ask": [
      "Bash(npm install)",
      "Bash(npm install *)",
      "Bash(git commit)",
      "Bash(git commit *)",
      "Bash(git push)",
      "Bash(git push *)",
      "WebFetch",
      "Bash(curl)",
      "Bash(curl *)"
    ],
    "deny": [
      "Bash(git reset --hard)",
      "Bash(git reset --hard *)",
      "Bash(rm -rf)",
      "Bash(rm -rf *)",
      "Read(./.env)",
      "Read(./.env.*)"
    ]
  }
}

How to use the file

  1. Save it as .claude/settings.json. If that file already exists, merge the permissions block into it.
  2. Restart Claude Code, then run /permissions to see the rules it loaded.
  3. Rules are checked deny first, then ask, then allow. The first match wins.
Skip the setup: 85 ready-made agents for Claude Code

Coding, SEO and marketing agents, 52 skills and 53 slash commands. Installs with one line.

All free tools →

Frequently asked questions

There are three you will use: ~/.claude/settings.json for all your projects, .claude/settings.json in a project to share with your team (commit it), and .claude/settings.local.json for your own project settings that stay out of git. Lists like permissions.allow are combined across files, and project settings beat user settings.

Related guides and tools