New: watch your coding agents work, step by step, on a live board. Try the demo, no account

Free tools

Claude Code permissions builder for settings.json

Claude Code reads permissions.allow, permissions.ask and permissions.deny from settings.json. Rules are checked deny first, then ask, then allow, so a narrow allow can never override a broader deny. Tick what you want below and copy the block.

Runs in your browser. What you type or paste stays on this page. By Jake Marsh. Checked against Claude Code docs: Configure permissions (rule syntax, evaluation order, path patterns, modes) on 2026-11-16.

Look around
Run tests and builds
Git and GitHub
Keep out
Things to confirm
Your project
One per line, relative to the project root, for example src or tests.
One hostname per line. *.example.com covers subdomains but not example.com itself.
One server name per line, as it appears in the tool names (mcp__name__tool).
One path per line, added as additionalDirectories (file access outside the project).
One per line. Start with allow:, ask: or deny: (no prefix means allow).

Checks on these rules

No problems found. Deny rules are checked first, then ask, then allow.

settings.json

Merge the permissions block into .claude/settings.json. Create the file if it does not exist.

{
  "permissions": {
    "allow": [
      "Bash(git status)",
      "Bash(git diff *)",
      "Bash(git log *)",
      "Bash(git show *)",
      "Bash(gh pr view *)",
      "Bash(gh pr list *)",
      "Bash(gh issue view *)",
      "Bash(gh issue list *)",
      "Bash(npm test *)",
      "Bash(npm run test *)",
      "Bash(npm run lint *)",
      "Bash(bun test *)",
      "Bash(bun run lint *)",
      "Bash(pnpm test *)",
      "Bash(pnpm lint *)",
      "Bash(npx tsc --noEmit *)",
      "Bash(bunx tsc --noEmit *)"
    ],
    "ask": [
      "Bash(git push *)",
      "Bash(npm publish *)",
      "Bash(cargo publish *)",
      "Bash(git clean *)"
    ],
    "deny": [
      "Bash(git push --force *)",
      "Bash(git push -f *)",
      "Bash(git reset --hard *)",
      "Read(./.env)",
      "Read(./.env.*)",
      "Read(./secrets/**)",
      "Read(~/.ssh/**)",
      "Bash(rm -rf *)",
      "Bash(sudo *)"
    ]
  }
}

Same rules as command line flags

For a single run. Flags add to your settings files; a deny anywhere still wins. There is no flag for ask rules, so the 4 ask rules stay in settings.json only.

claude \
  --allowedTools 'Bash(git status)' 'Bash(git diff *)' 'Bash(git log *)' 'Bash(git show *)' 'Bash(gh pr view *)' 'Bash(gh pr list *)' 'Bash(gh issue view *)' 'Bash(gh issue list *)' 'Bash(npm test *)' 'Bash(npm run test *)' 'Bash(npm run lint *)' 'Bash(bun test *)' 'Bash(bun run lint *)' 'Bash(pnpm test *)' 'Bash(pnpm lint *)' 'Bash(npx tsc --noEmit *)' 'Bash(bunx tsc --noEmit *)' \
  --disallowedTools 'Bash(git push --force *)' 'Bash(git push -f *)' 'Bash(git reset --hard *)' 'Read(./.env)' 'Read(./.env.*)' 'Read(./secrets/**)' 'Read(~/.ssh/**)' 'Bash(rm -rf *)' 'Bash(sudo *)'

Check a settings.json you already have

Checked in this page only. Looks for rules Claude Code skips, wrong path anchors and allow rules a deny overrides.

How to use it

  1. Set each group to Allow, Ask or Deny, or leave it Not set. The defaults allow read-only git and test commands, ask before a push and deny secrets and destructive commands.
  2. Add your project folders, websites and MCP servers in the boxes below the groups. Add anything else as your own rule, one per line.
  3. Pick a starting mode and where the file will live. Read the checks, which flag rules Claude Code skips or that another rule overrides.
  4. Copy the settings.json block into .claude/settings.json (shared with the team), .claude/settings.local.json (just you) or ~/.claude/settings.json (every project), merging it with what is there.
  5. Run /permissions in Claude Code to see every rule and the file it came from.

Rule syntax in one place

  • Bash(npm run *): a space before the trailing * matches any arguments. Bash(ls:*) is the older spelling of the same thing. Put the * after the subcommand: Bash(git log *) allows only git log, Bash(git *) allows every git command.
  • Read(./.env) and Edit(/src/**): paths use gitignore patterns. // is an absolute path, ~/ is your home folder, / is relative to the settings file's project and ./ is relative to the current folder.
  • WebFetch(domain:example.com): matches the hostname only. *.example.com covers subdomains, not the bare domain.
  • mcp__server and mcp__server__tool: every tool from one MCP server, or one tool. Dots and spaces in a server name become underscores, and a name that contains __ or ends in _ needs the mcp__server__* form.
  • Edit and Read carry every path rule. Claude Code accepts Write(docs/**) or Grep(docs/**) but never matches them, so write Edit(docs/**) or Read(docs/**).
  • Agent(Explore): a subagent by name. Use it in deny to switch one off.

A bare tool name in deny, such as Bash, removes the tool from Claude's context. A scoped deny like Bash(rm *) leaves the tool in place and blocks matching calls.

{
  "permissions": {
    "allow": ["Bash(npm run test *)"],
    "ask": ["Bash(git push *)"],
    "deny": ["Read(./.env)", "Bash(rm -rf *)"]
  }
}
The smallest useful block

What rules do not cover

Bash rules match the command text, so patterns that try to limit arguments are easy to get around: a rule for curl with one URL misses other flags, other protocols and redirects. To restrict network access, deny curl and wget and allow WebFetch for named domains. A Read deny covers Claude's file tools and the common file commands in Bash, but not a script that opens the file itself. For a hard limit, use the sandbox.

Questions

Which wins when an allow and a deny rule both match?
Deny. Rules are evaluated deny first, then ask, then allow, and the first match decides. A narrow allow such as Bash(aws s3 ls) cannot make an exception to a broad deny such as Bash(aws *), and a matching ask rule still prompts. The checks above flag these cases.
What is the difference between Bash(npm test *) and Bash(npm test)?
Bash(npm test) matches that exact command only. Bash(npm test *) also matches npm test with any arguments, such as npm test --watch. The * must come after the subcommand, because a * earlier in an allow rule triggers a startup warning.
How do I stop Claude Code from reading my .env file?
Add a deny rule such as Read(./.env). A Read deny also blocks the Edit and Write tools on that path and applies to common file commands in Bash like cat. It does not stop a script that opens the file itself, so use the sandbox if that matters.
Why is my absolute path not matching?
One leading slash does not mean the filesystem root. It anchors at the settings file's project. For an absolute path write two slashes, as in Read(//Users/alice/secrets/**), or use ~/ for your home folder.
How do I pass the same rules with --allowedTools?
Give claude --allowedTools a list of rules in quotes, as in claude --allowedTools 'Bash(git log *)' 'Bash(npm test *)', and --disallowedTools for deny rules. They apply to that run on top of your settings files. Ask rules have no flag, so keep those in settings.json. The flags box above prints the command for your rules.
Where does the settings.json go, and which file wins?
Use .claude/settings.json to share rules with a team, .claude/settings.local.json for yourself in one project, or ~/.claude/settings.json for every project. Rules from all of them apply together, and a deny in any scope blocks a matching allow in any other.

Sources

Checked 2026-11-16.

Give the agent a task list it can work from

Permissions decide what the agent may do. Taskhold decides what it works on: one list you and Claude Code both use, with each step reported on a live board and a question to you when it is blocked. Add taskhold to the builder's MCP servers box and the agent can read and update the list without a prompt per call.

Or connect your agent first, no sign-up: add https://taskhold.com/api/mcp as an MCP server. The first time it uses Taskhold, it gives you the trial link.

Related tools

  • CLAUDE.md and AGENTS.md generator

    Answer a few questions about your repo (stack, commands, rules, do-nots) and get a starter CLAUDE.md and AGENTS.md, either as one shared file or as two.

  • Claude Code subagent generator

    Fill in a name, a description and a tool list, or start from a code reviewer, debugger or test runner, and get a ready .claude/agents/ file with the frontmatter checked.

  • Claude Code notification hook generator

    Get alerted when Claude Code waits for input or finishes a reply: pick macOS, Linux, ntfy, Pushover, Slack or a sound and copy the Notification and Stop hooks plus a tested script.

All free tools