Generate .claude/settings.local.json:
Read references/permission-presets.md for preset definitions, then:
a. Always include Universal Base — file ops, text processing, network, system, git. These are needed by every project.
b. Add detected language presets — JS/TS, Python, PHP, Go, Rust, Ruby, etc. When in doubt, include more rather than less. Adding Bash(cargo *) to a JS project costs nothing if Rust isn't installed.
c. Add deployment presets if detected — Cloudflare Worker, Vercel, Docker, Cloud CLIs.
d. Auto-discover MCP servers — Use ToolSearch to find available MCP tools, extract the unique server names from tool names (e.g. mcp__vault__secret_list → server is vault), and generate mcp__servername__* for each. This is necessary because:
mcp__* (single wildcard) does NOT work — wildcard doesn't cross __ boundary
mcp__*__* (double wildcard) also does NOT work
- Each server must be listed individually:
mcp__vault__*, mcp__brain__*, etc.
e. Always include: WebSearch, WebFetch
f. Always include explicit gh subcommands alongside Bash(gh *) — there's a known bug where Bash(gh *) doesn't match some subcommands:
"Bash(gh *)",
"Bash(gh repo *)",
"Bash(gh issue *)",
"Bash(gh pr *)",
"Bash(gh api *)",
"Bash(gh search *)",
"Bash(gh run *)",
"Bash(gh release *)",
g. Write with // comment groups for organisation.
h. Warn the user: "Project settings.local.json SHADOWS your global settings — it does not merge. A session restart is needed for changes to take effect."