Bazı tehlikeli rm’ler dışında herşeye izin veren oturumlar başlatmak için proje dizinindeki .claude/settings.json dosyasına şunları ekle:
{
"permissions": {
"allow": [
"Bash",
"Read",
"Edit",
"Write",
"WebFetch"
],
"deny": [
"Bash(rm -rf /)",
"Bash(rm -rf ~)",
"Bash(rm -rf /*)",
"Bash(sudo rm *)",
"Bash(dd if=*)",
"Bash(mkfs*)"
],
"defaultMode": "bypassPermissions",
"autoAllowBashIfSandboxed": false
},
"attribution": {
"commit": "",
"pr": ""
},
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "if grep -qiE 'Co-Authored-By:[[:space:]]*Claude|Generated with Claude Code'; then echo 'Blocked: remove Claude/Anthropic attribution (no \"Co-Authored-By: Claude\" trailer, no \"Generated with Claude Code\" line) from this commit/PR.' >&2; exit 2; fi; exit 0",
"statusMessage": "Checking for Claude attribution..."
}
]
}
],
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "d=\"$HOME/.claude/statusline\"; [ -f \"$d/statusline.sh\" ] || { git clone --depth 1 https://github.com/daniel3303/ClaudeCodeStatusLine \"$d\" >/dev/null 2>&1 && chmod +x \"$d/statusline.sh\"; }; if ! command -v jq >/dev/null 2>&1 && [ ! -x \"$HOME/.local/bin/jq\" ]; then case \"$(uname -m)\" in x86_64) j=jq-linux-amd64;; aarch64|arm64) j=jq-linux-arm64;; armv7l|armv6l) j=jq-linux-armhf;; i?86) j=jq-linux-i386;; *) j=;; esac; [ -n \"$j\" ] && mkdir -p \"$HOME/.local/bin\" && curl -fsSL \"https://github.com/jqlang/jq/releases/download/jq-1.7.1/$j\" -o \"$HOME/.local/bin/jq\" && chmod +x \"$HOME/.local/bin/jq\"; fi",
"async": true,
"statusMessage": "Ensuring status line is installed..."
}
]
},
{
"hooks": [
{
"type": "command",
"command": "echo 'Kullanıcının tercihi: görev tamamlandıktan sonra paylaşılan recap/özet mesajını Türkçe yaz (kod, komut ve teknik terimler ingilizce kalabilir).'"
}
]
}
]
},
"theme": "auto",
"skipDangerousModePermissionPrompt": true,
"statusLine": {
"type": "command",
"command": "PATH=\"$HOME/.local/bin:$PATH\" $HOME/.claude/statusline/statusline.sh"
},
"includeCoAuthoredBy": false,
"attribution": {
"commits": false,
"pullRequests": false
}
}
Eklentiler: