Skip to content

Commit d78f71f

Browse files
committed
docs(strategic-compact): fix hook command path in zh-CN/zh-TW/ja-JP SKILL.md
Extends the hook command path correction from PR #1682 (English source) to the zh-CN, zh-TW, and ja-JP translated mirrors so the PreToolUse hook example matches the actual script location at ~/.claude/scripts/hooks/suggest-compact.js. Changes per locale: - docs/zh-CN/skills/strategic-compact/SKILL.md: update both command strings from ~/.claude/skills/strategic-compact/suggest-compact.js to ~/.claude/scripts/hooks/suggest-compact.js. - docs/zh-TW/skills/strategic-compact/SKILL.md: replace the outdated suggest-compact.sh reference (the .sh variant was removed in merged PR #41) with the current node-invoked suggest-compact.js, and align the matcher block structure with the English canonical SKILL.md post-#1682. - docs/ja-JP/skills/strategic-compact/SKILL.md: same .sh -> .js migration and matcher alignment as zh-TW. The ko-KR mirror already uses the correct CLAUDE_PLUGIN_ROOT-based hook path and needs no change. Refs #1675
1 parent 841beea commit d78f71f

3 files changed

Lines changed: 24 additions & 18 deletions

File tree

‎docs/ja-JP/skills/strategic-compact/SKILL.md‎

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ description: 任意の自動コンパクションではなく、タスクフェ
2121

2222
## 仕組み
2323

24-
`suggest-compact.sh`スクリプトはPreToolUse(Edit/Write)で実行され:
24+
`suggest-compact.js`スクリプトはPreToolUse(Edit/Write)で実行され:
2525

2626
1. **ツール呼び出しを追跡** - セッション内のツール呼び出しをカウント
2727
2. **閾値検出** - 設定可能な閾値で提案(デフォルト:50回)
@@ -34,13 +34,16 @@ description: 任意の自動コンパクションではなく、タスクフェ
3434
```json
3535
{
3636
"hooks": {
37-
"PreToolUse": [{
38-
"matcher": "tool == \"Edit\" || tool == \"Write\"",
39-
"hooks": [{
40-
"type": "command",
41-
"command": "~/.claude/skills/strategic-compact/suggest-compact.sh"
42-
}]
43-
}]
37+
"PreToolUse": [
38+
{
39+
"matcher": "Edit",
40+
"hooks": [{ "type": "command", "command": "node ~/.claude/scripts/hooks/suggest-compact.js" }]
41+
},
42+
{
43+
"matcher": "Write",
44+
"hooks": [{ "type": "command", "command": "node ~/.claude/scripts/hooks/suggest-compact.js" }]
45+
}
46+
]
4447
}
4548
}
4649
```

‎docs/zh-CN/skills/strategic-compact/SKILL.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ origin: ECC
4848
"PreToolUse": [
4949
{
5050
"matcher": "Edit",
51-
"hooks": [{ "type": "command", "command": "node ~/.claude/skills/strategic-compact/suggest-compact.js" }]
51+
"hooks": [{ "type": "command", "command": "node ~/.claude/scripts/hooks/suggest-compact.js" }]
5252
},
5353
{
5454
"matcher": "Write",
55-
"hooks": [{ "type": "command", "command": "node ~/.claude/skills/strategic-compact/suggest-compact.js" }]
55+
"hooks": [{ "type": "command", "command": "node ~/.claude/scripts/hooks/suggest-compact.js" }]
5656
}
5757
]
5858
}

‎docs/zh-TW/skills/strategic-compact/SKILL.md‎

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ description: Suggests manual context compaction at logical intervals to preserve
2121

2222
## 運作方式
2323

24-
`suggest-compact.sh` 腳本在 PreToolUse(Edit/Write)執行並:
24+
`suggest-compact.js` 腳本在 PreToolUse(Edit/Write)執行並:
2525

2626
1. **追蹤工具呼叫** - 計算工作階段中的工具呼叫次數
2727
2. **門檻偵測** - 在可設定門檻建議(預設:50 次呼叫)
@@ -34,13 +34,16 @@ description: Suggests manual context compaction at logical intervals to preserve
3434
```json
3535
{
3636
"hooks": {
37-
"PreToolUse": [{
38-
"matcher": "tool == \"Edit\" || tool == \"Write\"",
39-
"hooks": [{
40-
"type": "command",
41-
"command": "~/.claude/skills/strategic-compact/suggest-compact.sh"
42-
}]
43-
}]
37+
"PreToolUse": [
38+
{
39+
"matcher": "Edit",
40+
"hooks": [{ "type": "command", "command": "node ~/.claude/scripts/hooks/suggest-compact.js" }]
41+
},
42+
{
43+
"matcher": "Write",
44+
"hooks": [{ "type": "command", "command": "node ~/.claude/scripts/hooks/suggest-compact.js" }]
45+
}
46+
]
4447
}
4548
}
4649
```

0 commit comments

Comments
 (0)