Files
system-dev-template/template/.claude/settings.json
T
Leo 0a04c9c594 fix(1.16.1): wiki-first-search 補 Bash 破口(1.16.0 隔天即被自己繞過)
leo 點破:wiki 早記著寄信已驗證可用,我卻沒查又自創 curl 部署法。
根因=昨天的 hook 只掛 Grep|Glob|Read,但我實際用的是 Bash → 完全不觸發。

- matcher 加 Bash,只認高風險指令(wrangler|curl|npx|acr|gh|deploy|push)
- update.sh 對既有註冊就地補 Bash,不只新裝生效

教訓:防跳過 wiki 的機制本身要蓋到所有實際查詢途徑。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 10:51:33 +08:00

52 lines
1.1 KiB
JSON

{
"hooks": {
"SessionStart": [
{
"matcher": "startup|resume|clear",
"hooks": [
{
"type": "command",
"command": ".claude/hooks/session-start-recall.sh"
}
]
}
],
"PreToolUse": [
{
"matcher": "Write|Edit",
"hooks": [
{
"type": "command",
"command": ".claude/hooks/sdd-guard.sh"
},
{
"type": "command",
"command": ".claude/hooks/pre-write-guard.sh"
},
{
"type": "command",
"command": ".claude/hooks/wiki-secret-scan.sh"
}
]
},
{
"matcher": "Grep|Glob|Read|Bash",
"hooks": [
{
"type": "command",
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/wiki-first-search.sh"
}
]
},
{
"matcher": "Task",
"hooks": [
{
"type": "command",
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/subagent-wiki-guard.sh"
}
]
}
]
}
}