⌨️Permission Rule
Also known as Claude Code permission rules, allow rule, deny rule
A line that says yes, ask or no to a tool.
Think of it like
It is like a house list. Always fine, ask me first, and never.
Example
Jack is tired of approving npm test. He adds one allow rule for it, and one deny rule so Claude can never read his .env file.
Why it matters
The mode sets the broad rule. Rules give exact control over each tool.
Definition
Example code
json
{"permissions": {"allow": ["Bash(npm test)"], "deny": ["Read(./.env)"]}}Common mistake
Key takeaways
- 1Allow, ask, deny. Three kinds.
- 2Tool and pattern. Bash(npm test).
- 3Deny first. First match wins.