Skip to content

System Settings

One-Liner

System Settings manages global and project-level configuration — Controls hooks, agents, skills, and core system behavior.


Configuration Files

FileScopePurpose
~/.claude/CLAUDE.mdGlobalGlobal instructions
.claude/CLAUDE.mdProjectProject instructions
~/.claude/cli-tools.jsonGlobalCLI tool config
.claude/settings.jsonProjectProject settings
.claude/settings.local.jsonLocalLocal overrides

Settings Schema

json
{
  "permissions": {
    "allow": ["Bash(npm install)", "Bash(git status)"],
    "deny": ["Bash(rm -rf)"]
  },
  "env": {
    "ANTHROPIC_API_KEY": "your-key"
  },
  "enableAll": false,
  "autoCheck": true
}

Key Settings

Permissions

json
{
  "permissions": {
    "allow": [
      "Bash(npm run*)",
      "Read(**)",
      "Edit(**/*.ts)"
    ],
    "deny": [
      "Bash(rm -rf /*)"
    ]
  }
}

Hooks

json
{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Bash",
        "hooks": [".claude/hooks/pre-bash.sh"]
      }
    ]
  }
}

MCP Servers

json
{
  "mcpServers": {
    "ccw-tools": {
      "command": "node",
      "args": ["./mcp-server/dist/index.js"]
    }
  }
}

Hook Configuration

Hooks are scripts that run at specific events:

EventWhenUse Case
PreToolUseBefore tool executionValidation, logging
PostToolUseAfter tool executionCleanup, notifications
NotificationOn notificationsCustom handlers
StopOn session endCleanup

Hook Example

bash
#!/bin/bash
# .claude/hooks/pre-bash.sh
echo "Executing: $1" >> ~/.claude/bash.log

Agent Configuration

json
// .claude/agents/my-agent.md
---
description: Custom analysis agent
model: claude-sonnet
tools:
  - Read
  - Grep
---

# Agent Instructions
...

Released under the MIT License.