Skip to content

A visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.

Fixed a configuration error in the hooks Chinese guide

ytche83542f2781ff
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"
+ }
+ ]
+ }
+ ]
+ },
}
```