Fixed a configuration error in the hooks Chinese guide

This commit is contained in:
ytche
2026-04-15 09:03:06 +08:00
parent 9c224ff249
commit 83542f2781
+23 -9
View File
@@ -42,15 +42,29 @@ chmod +x ~/.claude/hooks/*.sh
```json
{
"hooks": {
"PreToolUse": [{
"matcher": "Write",
"hooks": ["~/.claude/hooks/format-code.sh"]
}],
"PostToolUse": [{
"matcher": "Write",
"hooks": ["~/.claude/hooks/security-scan.sh"]
}]
}
"PreToolUse": [
{
"matcher": "Write",
"hooks": [
{
"type": "command",
"command": "~/.claude/hooks/format-code.sh"
}
]
}
],
"PostToolUse": [
{
"matcher": "Write",
"hooks": [
{
"type": "command",
"command": "~/.claude/hooks/security-scan.sh"
}
]
}
]
},
}
```