# Claude Code settings.json permissions builder

Claude Code reads permission rules from the permissions object in settings.json: allow runs a tool without asking, ask always prompts, and deny blocks it, with deny checked first. This builder writes that block from a preset, explains each rule in plain words and flags risky ones, all in your browser.

Use the tool: https://agentshandbook.com/tools/claude-code-permissions (runs in the browser).

## How to use it

1. **Pick a job and a scope.** Choose the preset closest to the work, such as coding with tests or inbox triage with no sends. Then choose where the rules live: all your projects, this project for the whole team, or this project for you alone.
2. **Adjust the rules.** Turn guards on or off, add your own allow, ask and deny rules, and pick the mode sessions start in. Each rule gets one plain line that says what it does, and the checks flag risky or broken rules as you type.
3. **Save it and confirm.** Copy or download the JSON and save it at the path shown. If the file already exists, merge the permissions object into it. Claude Code reloads permission changes without a restart. Run /permissions to see every rule and the file it came from.

## Questions

### Where is the Claude Code settings.json file?

Your personal file is ~/.claude/settings.json and applies in every project. A project has .claude/settings.json, which you commit for the team, and .claude/settings.local.json, which is yours alone and stays out of git. Organizations can also deploy managed settings that override all three.

### In what order does Claude Code check allow, ask and deny rules?

Deny first, then ask, then allow, and the first match wins no matter how specific the rules are. So a deny rule on Bash(aws *) blocks aws s3 ls even when an allow rule names it. Rules from every settings file merge into one list, so a deny in any file beats an allow in any other.

### How do I allow all commands in Claude Code?

Set defaultMode to bypassPermissions in ~/.claude/settings.json, or start with claude --dangerously-skip-permissions. The docs say to use it only in an isolated container or VM, because it skips almost every prompt. Auto mode is the safer option: a classifier reviews each action, and deny and ask rules still apply.

### What are the defaultMode values in Claude Code?

default (Manual, asks before edits and commands), acceptEdits, plan, auto, dontAsk and bypassPermissions. manual is an alias for default. auto and bypassPermissions take effect only from your user settings, not from a project or local file.

### How do I stop Claude Code reading .env files?

Add Read(**/.env) and Read(**/.env.*) to permissions.deny. A Read deny rule also blocks edits to the same files. It covers Claude's file tools and commands such as cat, but not a script that opens files itself, so turn on the sandbox if you need a hard boundary.

### Why does Claude Code still ask after I allowed a command?

Usually an ask rule in another settings file also matches, and ask is checked before allow. A compound command such as a && b also needs every part allowed. Allow rules also never pre-approve writes to protected paths such as .git and .claude.

### How do I give Claude Code access to a folder outside my project?

List it in permissions.additionalDirectories, or add it for one session with --add-dir or /add-dir. Files there follow the same rules as your project folder. Folders listed in a project's .claude/settings.json apply only after you accept the workspace trust dialog.

## Sources

- [Configure permissions (Claude Code docs)](https://code.claude.com/docs/en/permissions) (checked 2026-10-30)
- [Settings files and precedence (Claude Code docs)](https://code.claude.com/docs/en/settings) (checked 2026-10-30)
- [Permission settings reference (Claude Code docs)](https://code.claude.com/docs/en/settings-reference#permission-settings) (checked 2026-10-30)
- [Choose a permission mode (Claude Code docs)](https://code.claude.com/docs/en/permission-modes) (checked 2026-10-30)
- [Tools reference (Claude Code docs)](https://code.claude.com/docs/en/tools-reference) (checked 2026-10-30)

## Related playbooks

- [Upgrade a framework across a repo with a coding agent and the test suite as the gate](https://agentshandbook.com/p/upgrade-a-framework-across-a-repo-with-tests-as-the-gate.md)
- [Triage a production error from Sentry or logs into a tested fix pull request](https://agentshandbook.com/p/triage-production-error-into-a-fix-pr.md)
- [Map an unfamiliar codebase into a checked architecture document before you change it](https://agentshandbook.com/p/map-an-unfamiliar-codebase-before-you-change-it.md)
- [Sort a messy Downloads or photos folder without losing a single file](https://agentshandbook.com/p/sort-a-messy-downloads-folder.md)
- [Triage your support inbox and draft replies that a person approves before sending](https://agentshandbook.com/p/triage-support-inbox-with-approved-replies.md)
- [Run a weekly SEO agent that checks your site and opens fixes for you to review](https://agentshandbook.com/p/run-a-weekly-seo-agent-that-proposes-fixes.md)

## Lessons

- [Agents act before you approve, even when you told them to ask first](https://agentshandbook.com/lessons/agents-act-before-you-approve.md)
- [Desktop and terminal agents delete files while they tidy up](https://agentshandbook.com/lessons/agents-delete-files-while-organizing.md)
- [Coding agents change, skip or misreport tests to reach a green run](https://agentshandbook.com/lessons/coding-agents-weaken-tests-to-pass.md)
- [Scheduled agents break quietly when a connector or node version changes](https://agentshandbook.com/lessons/connector-updates-silently-break-scheduled-agents.md)
- [An email can carry hidden instructions to the agent that reads it](https://agentshandbook.com/lessons/email-can-carry-instructions-to-your-agent.md)

More free tools: https://agentshandbook.com/tools.md