docs(strategic-compact): fix hook command path in zh-CN/zh-TW/ja-JP SKILL.md (#1701)

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
This commit is contained in:
Gaurav Dubey
2026-05-11 10:43:12 +05:30
committed by GitHub
parent 105b524c8f
commit 2bb88cff47
3 changed files with 24 additions and 18 deletions

View File

@@ -21,7 +21,7 @@ description: 任意の自動コンパクションではなく、タスクフェ
## 仕組み
`suggest-compact.sh`スクリプトはPreToolUseEdit/Writeで実行され
`suggest-compact.js`スクリプトはPreToolUseEdit/Writeで実行され
1. **ツール呼び出しを追跡** - セッション内のツール呼び出しをカウント
2. **閾値検出** - 設定可能な閾値で提案デフォルト50回
@@ -34,13 +34,16 @@ description: 任意の自動コンパクションではなく、タスクフェ
```json
{
"hooks": {
"PreToolUse": [{
"matcher": "tool == \"Edit\" || tool == \"Write\"",
"hooks": [{
"type": "command",
"command": "~/.claude/skills/strategic-compact/suggest-compact.sh"
}]
}]
"PreToolUse": [
{
"matcher": "Edit",
"hooks": [{ "type": "command", "command": "node ~/.claude/scripts/hooks/suggest-compact.js" }]
},
{
"matcher": "Write",
"hooks": [{ "type": "command", "command": "node ~/.claude/scripts/hooks/suggest-compact.js" }]
}
]
}
}
```

View File

@@ -48,11 +48,11 @@ origin: ECC
"PreToolUse": [
{
"matcher": "Edit",
"hooks": [{ "type": "command", "command": "node ~/.claude/skills/strategic-compact/suggest-compact.js" }]
"hooks": [{ "type": "command", "command": "node ~/.claude/scripts/hooks/suggest-compact.js" }]
},
{
"matcher": "Write",
"hooks": [{ "type": "command", "command": "node ~/.claude/skills/strategic-compact/suggest-compact.js" }]
"hooks": [{ "type": "command", "command": "node ~/.claude/scripts/hooks/suggest-compact.js" }]
}
]
}

View File

@@ -21,7 +21,7 @@ description: Suggests manual context compaction at logical intervals to preserve
## 運作方式
`suggest-compact.sh` 腳本在 PreToolUseEdit/Write執行並
`suggest-compact.js` 腳本在 PreToolUseEdit/Write執行並
1. **追蹤工具呼叫** - 計算工作階段中的工具呼叫次數
2. **門檻偵測** - 在可設定門檻建議預設50 次呼叫)
@@ -34,13 +34,16 @@ description: Suggests manual context compaction at logical intervals to preserve
```json
{
"hooks": {
"PreToolUse": [{
"matcher": "tool == \"Edit\" || tool == \"Write\"",
"hooks": [{
"type": "command",
"command": "~/.claude/skills/strategic-compact/suggest-compact.sh"
}]
}]
"PreToolUse": [
{
"matcher": "Edit",
"hooks": [{ "type": "command", "command": "node ~/.claude/scripts/hooks/suggest-compact.js" }]
},
{
"matcher": "Write",
"hooks": [{ "type": "command", "command": "node ~/.claude/scripts/hooks/suggest-compact.js" }]
}
]
}
}
```