diff --git a/zh/06-hooks/README.md b/zh/06-hooks/README.md index 3a84f8a..95359db 100644 --- a/zh/06-hooks/README.md +++ b/zh/06-hooks/README.md @@ -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" + } + ] + } + ] + }, } ```