// Configure, manage, update and review Claude Code permissions, sandboxing, and tool access. Use when user wants to set up permissions, configure sandboxing, update allowed tools, manage settings.json permissions, or review permissions in skills or commands or agents or settings.json. When user writes a new skill, command, agent, or updates settings.json, they should use this skill to manage permissions.
| name | claude-permissions |
| description | Configure, manage, update and review Claude Code permissions, sandboxing, and tool access. Use when user wants to set up permissions, configure sandboxing, update allowed tools, manage settings.json permissions, or review permissions in skills or commands or agents or settings.json. When user writes a new skill, command, agent, or updates settings.json, they should use this skill to manage permissions. |
| allowed-tools | Read, Write, Edit, Grep, Glob |
Guide for configuring permissions, sandboxing, and tool access in Claude Code.
Claude Code uses a tiered permission system to balance functionality and security. Permissions control what actions Claude can perform without explicit approval.
These operations are automatically allowed:
BashTool execution requires user approval. Users can:
settings.jsonThese operations require session-based approval:
Claude Code provides these tools:
/permissions CommandUse the /permissions command to access the interactive UI for managing permissions:
settings.json ConfigurationConfigure persistent permissions in .claude/settings.json or ~/.claude.json:
{
"permissions": {
"allow": [
"Read",
"Write",
"Edit",
"Bash(git status)",
"Bash(git commit -m:*)"
],
"deny": ["Read(.env*)", "Bash(rm -rf /)", "Bash(sudo:*)"],
"ask": ["Bash(git push --force:*)", "Bash(docker run:*)"]
}
}
/allowed-tools CommandUse CLI to add or remove tools from allowlist:
/allowed-tools +Edit/allowed-tools -Bash/allowed-tools +Bash(git commit:*)Use --allowedTools flag for session-specific permissions (not persistent).
"Read", "Write", "Edit", "Bash""Bash(git status)""Bash(git commit:*)" (matches all git commit commands)"Read(.env*)" (matches .env files)"Read(./secrets/**)" (matches files in secrets directory)* matches any string** matches directories recursively"SlashCommand(*)""Skill(typescript-coding)""Skill(plugin-name:*)" (e.g., "Skill(meta-work:*)")"Skill(plugin-name:skill-name)" (e.g., "Skill(meta-work:prompting)")Skill(*) may not work for plugin-scoped skills; use explicit names or plugin wildcardsSandboxing provides filesystem and network isolation to enhance security and reduce permission prompts.
Add sandboxing configuration to settings.json:
{
"sandbox": {
"enabled": true,
"autoAllowBashIfSandboxed": true,
"excludedCommands": ["git", "npm"],
"network": {
"allowUnixSockets": ["/path/to/socket"],
"allowLocalBinding": false
}
}
}
.env, credentials, secretsBash(git:*)settings.json into source control for team-wide permissionsexcludedCommands if needed.claude/settings.json for project-specific permissions~/.claude.json for personal preferences{
"permissions": {
"allow": [
"Bash(git status)",
"Bash(git diff:*)",
"Bash(git commit -m:*)",
"Bash(git push origin:*)"
],
"ask": ["Bash(git push --force:*)", "Bash(git rebase:*)"]
}
}
{
"permissions": {
"deny": [
"Read(.env*)",
"Write(.env*)",
"Read(./secrets/**)",
"Read(~/.ssh/**)",
"Read(~/.aws/credentials)"
]
}
}
{
"permissions": {
"allow": [
"Read",
"Write",
"Edit",
"Bash(git:* except: git push --force, git rebase)",
"Bash(pnpm:* except: pnpm remove)"
],
"deny": ["Read(.env*)", "Bash(rm -rf /)", "Bash(sudo:*)"],
"ask": ["Bash(git push --force:*)", "Bash(docker run:*)"]
},
"sandbox": {
"enabled": true,
"autoAllowBashIfSandboxed": true,
"excludedCommands": ["git"]
}
}
{
"permissions": {
"allow": [
"SlashCommand(*)",
"Skill(analyze-size)",
"Skill(brainwriting)",
"Skill(scratchpad-fetch)",
"Skill(timestamp)",
"Skill(typescript-coding)",
"Skill(meta-work:*)",
"Skill(development-lifecycle:*)"
]
}
}
Skills can restrict tool access using allowed-tools in frontmatter:
---
name: safe-reader
description: Read-only file operations
allowed-tools: Read, Grep, Glob
---
Agents (subagents) can be configured with specific tool permissions at:
~/.claude/agents/ (available across all projects).claude/agents/ (shareable with team)Each agent can have custom prompts and tool permissions defined in their YAML frontmatter.
settings.json for deny rules matching the operationsandbox.enabled is trueexcludedCommands if commands should run outside sandbox