Configure Claude Code permission settings and tool access
✓Works with OpenClaudeYou are a Claude Code security administrator. The user wants to configure Claude Code permission settings and control which tools Claude can access during code execution.
What to check first
- Check if
claude.jsonor.claudercexists in your project root withls -la | grep claude - Run
claude --versionto verify Claude Code CLI is installed and accessible - Review your current permissions with
claude config showor check environment variables withenv | grep CLAUDE
Steps
- Create or open the
claude.jsonconfiguration file in your project root withtouch claude.json && cat claude.json - Define the
permissionsobject at the root level with tool access policies:"permissions": { "filesystem": {...}, "network": {...}, "execution": {...} } - Set filesystem permissions by adding
"filesystem": { "read": true, "write": false, "paths": ["/allowed/path"] }to restrict file access - Configure network access with
"network": { "enabled": false }or"enabled": true, "allowedDomains": ["api.example.com"]to control outbound requests - Set execution permissions with
"execution": { "shell": false, "nodejs": true, "python": true }to specify which runtimes are allowed - Define tool access via
"tools": { "filesystem": true, "web_search": false, "database": false }to enable/disable specific tool categories - Add sandbox restrictions with
"sandbox": { "cpu_limit": "2", "memory_limit": "512M", "timeout_seconds": 30 }for resource constraints - Validate the JSON with
claude config validateor usejq . claude.jsonto check syntax - Apply settings with
claude config applyor restart your Claude Code session
Code
{
"permissions": {
"filesystem": {
"read": true,
"write": true,
"paths": [
"./src",
"./config",
"./data"
],
"blocked_paths": [
"/etc/passwd",
"~/.ssh",
"~/.aws/credentials"
]
},
"network": {
"enabled": true,
"allowedDomains": [
"api.github.com",
"api.openai.com",
"registry.npmjs.org"
],
"blockedDomains": [
"internal-company-system.local"
],
"timeout_seconds": 10
},
"execution": {
"shell": false,
"nodejs": true,
"python": true,
"allowed_commands": [
"npm",
"python3",
"git"
]
},
"tools": {
"filesystem": true,
"web_search": false,
"bash_execution": false,
"database": false,
Note: this example was truncated in the source. See the GitHub repo for the latest full version.
Common Pitfalls
- Treating this skill as a one-shot solution — most workflows need iteration and verification
- Skipping the verification steps — you don't know it worked until you measure
- Applying this skill without understanding the underlying problem — read the related docs first
When NOT to Use This Skill
- When a simpler manual approach would take less than 10 minutes
- On critical production systems without testing in staging first
- When you don't have permission or authorization to make these changes
How to Verify It Worked
- Run the verification steps documented above
- Compare the output against your expected baseline
- Check logs for any warnings or errors — silent failures are the worst kind
Production Considerations
- Test in staging before deploying to production
- Have a rollback plan — every change should be reversible
- Monitor the affected systems for at least 24 hours after the change
Related Claude Code Skills
Other Claude Code skills in the same category — free to download.
CLAUDE.md Writer
Write effective CLAUDE.md project configuration files for Claude Code
MCP Server Setup
Set up Model Context Protocol servers for Claude Code
Custom Slash Commands
Create custom slash commands for Claude Code workflows
Hooks Configuration
Configure Claude Code hooks for automated pre/post actions
Skills Writer
Write custom Claude Code skill files with proper format
Memory Setup
Configure Claude Code persistent memory system
Agent SDK Setup
Build custom agents with Claude Agent SDK
Context Management
Optimize context window usage in Claude Code conversations
Want a Claude Code skill personalized to YOUR project?
This is a generic skill that works for everyone. Our AI can generate one tailored to your exact tech stack, naming conventions, folder structure, and coding patterns — with 3x more detail.