1.2 KiB
1.2 KiB
name, description, when_to_use, aliases, allowed_tools
| name | description | when_to_use | aliases | allowed_tools |
|---|---|---|---|---|
| update-config | Configure settings via settings.json - hooks, permissions, env vars. | When the user wants to configure hooks, permissions, or settings. | config-help | read_file |
Help configure the agent settings.
Settings File Locations
- Global:
~/.claude/settings.jsonapplies to all projects. - Project:
.claude/settings.jsonis project-specific and committed to git. - Local:
.claude/settings.local.jsonis project-specific and gitignored.
Configurable Settings
Hooks
Event-driven shell commands that run on tool use or lifecycle events:
PreToolUseruns before a tool executes and can block with exit code 2.PostToolUseruns after a tool completes.PreCompactruns before conversation compaction.
Hook format:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "echo 'tool: $TOOL_NAME'"
}
]
}
]
}
}
Permissions
Tool permission rules:
{
"permissions": {
"allow": ["Read", "Grep", "Glob"],
"deny": ["Bash(rm:*)"]
}
}
Environment Variables
{
"env": {
"MY_VAR": "value"
}
}