forked from FlorianBruniaux/claude-code-ultimate-guide
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.local.json.example
More file actions
145 lines (130 loc) · 3.46 KB
/
settings.local.json.example
File metadata and controls
145 lines (130 loc) · 3.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
{
"__comment": "settings.local.json - Machine-specific overrides (gitignored)",
"__usage": [
"This file allows you to override team settings.json without Git conflicts",
"Place in: .claude/settings.local.json (project) or ~/.claude/settings.local.json (global)",
"Precedence: global < project settings.json < settings.local.json",
"This file should be listed in .gitignore"
],
"__example_use_cases": [
"1. Skip linting on laptop (slower hardware)",
"2. Use different MCP endpoints for local development",
"3. Personal permission overrides without affecting team",
"4. Machine-specific hooks (e.g., notify Slack only on CI server)"
],
"hooks": {
"__comment": "Override team hooks for this machine only",
"PreToolUse": [
{
"__example": "Skip expensive pre-commit checks on laptop",
"matcher": "Bash|Edit|Write",
"hooks": [
{
"type": "command",
"command": "echo 'Skipping security check (local override)'",
"timeout": 100
}
]
}
],
"PostToolUse": [
{
"__example": "Disable auto-formatting on this machine (prefer manual)",
"matcher": "Edit|Write",
"hooks": []
}
],
"UserPromptSubmit": [
{
"__example": "Add machine-specific context (hostname, branch info)",
"matcher": "",
"hooks": [
{
"type": "command",
"command": ".claude/hooks/local-context.sh"
}
]
}
]
},
"permissions": {
"__comment": "Personal permission overrides (more permissive or restrictive)",
"allow": [
"Bash(npm *)",
"Bash(pnpm *)",
"Bash(git *)",
"Edit",
"Write",
"WebSearch"
],
"deny": [
"__example": "Block dangerous commands even if team allows them",
"Bash(rm -rf *)",
"Bash(sudo *)",
"Bash(dd *)",
"Bash(mkfs.*)"
],
"ask": [
"__example": "Ask before expensive operations (slow on laptop)",
"Bash(npm run build)",
"Bash(docker build)",
"Bash(cargo build --release)"
]
},
"mcpServers": {
"__comment": "Machine-specific MCP server overrides",
"__use_case": "Use local MCP server instead of team's remote endpoint",
"postgres": {
"__example": "Override team's production DB with local dev DB",
"command": "npx",
"args": ["@modelcontextprotocol/server-postgres"],
"env": {
"DATABASE_URL": "postgresql://localhost:5432/dev_db"
}
},
"serena": {
"__example": "Use local Serena build for development",
"command": "node",
"args": ["/Users/yourname/dev/serena-mcp/dist/index.js"],
"env": {
"DEBUG": "true"
}
}
},
"__real_world_examples": {
"__laptop_skip_heavy_checks": {
"hooks": {
"PreToolUse": [
{
"matcher": "Bash|Edit|Write",
"hooks": [
{
"type": "command",
"command": "true",
"timeout": 10
}
]
}
]
}
},
"__ci_server_strict": {
"permissions": {
"deny": [
"Bash(git push)",
"Bash(npm publish)",
"WebSearch"
]
}
},
"__local_dev_overrides": {
"mcpServers": {
"database": {
"env": {
"DATABASE_URL": "postgresql://localhost:5432/test"
}
}
}
}
}
}