Claude Code · Configuration files
Allow and deny tools
In .claude/settings.json, allow safe commands without prompts and block sensitive files.
{
"permissions": {
"allow": ["Bash(npm run test:*)", "Bash(git diff:*)"],
"deny": ["Read(./.env)", "Read(./secrets/**)"]
}
}
Official Claude Code documentation