diff --git a/.kiro/skills/strategic-compact/SKILL.md b/.kiro/skills/strategic-compact/SKILL.md index 27e5f20f6..0d88fe563 100644 --- a/.kiro/skills/strategic-compact/SKILL.md +++ b/.kiro/skills/strategic-compact/SKILL.md @@ -38,7 +38,9 @@ The `suggest-compact.js` script runs on PreToolUse (Edit/Write) and: ## Hook Setup -Add to your `~/.claude/settings.json`: +**Installed as a plugin?** No setup is needed. The plugin's `hooks/hooks.json` already registers `suggest-compact.js` (hook id `pre:edit-write:suggest-compact`, active in the `standard` and `strict` hook profiles). Do not copy the block below into `~/.claude/settings.json` — `~/.claude/scripts/` does not exist on plugin installs, and duplicating a plugin hook causes double execution. + +**If installed manually** (`./install.sh`), add to your `~/.claude/settings.json`: ```json { diff --git a/docs/ja-JP/skills/strategic-compact/SKILL.md b/docs/ja-JP/skills/strategic-compact/SKILL.md index e43866dd1..ef248b73c 100644 --- a/docs/ja-JP/skills/strategic-compact/SKILL.md +++ b/docs/ja-JP/skills/strategic-compact/SKILL.md @@ -29,7 +29,9 @@ description: 任意の自動コンパクションではなく、タスクフェ ## フック設定 -`~/.claude/settings.json`に追加: +**プラグインとしてインストール済みの場合**:設定は不要です。プラグインの `hooks/hooks.json` が既に `suggest-compact.js` を登録しています(フック ID `pre:edit-write:suggest-compact`、`standard` と `strict` フックプロファイルで有効)。下のブロックを `~/.claude/settings.json` にコピーしないでください — プラグインインストールでは `~/.claude/scripts/` は存在せず、プラグインフックを重複させると二重実行になります。 + +**手動インストール**(`./install.sh`)の場合、`~/.claude/settings.json` に追加: ```json { diff --git a/docs/ko-KR/skills/strategic-compact/SKILL.md b/docs/ko-KR/skills/strategic-compact/SKILL.md index a45adfc67..e49eacc59 100644 --- a/docs/ko-KR/skills/strategic-compact/SKILL.md +++ b/docs/ko-KR/skills/strategic-compact/SKILL.md @@ -38,21 +38,21 @@ origin: ECC ## Hook 설정 -`~/.claude/settings.json`에 추가합니다: +**플러그인으로 설치한 경우**: 별도 설정이 필요 없습니다. 플러그인의 `hooks/hooks.json`이 이미 `suggest-compact.js`를 등록합니다(훅 ID `pre:edit-write:suggest-compact`, `standard` 및 `strict` 훅 프로파일에서 활성). 아래 블록을 `~/.claude/settings.json`에 복사하지 마세요 — 플러그인 설치에는 `~/.claude/scripts/`가 존재하지 않으며, 플러그인 훅을 중복하면 이중 실행이 발생합니다(`${CLAUDE_PLUGIN_ROOT}`는 사용자 `settings.json`에서 해석되지 않습니다). + +**수동 설치**(`./install.sh`)인 경우 `~/.claude/settings.json`에 추가합니다: ```json { "hooks": { "PreToolUse": [ { - "matcher": "Edit|Write", - "hooks": [ - { - "type": "command", - "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/run-with-flags.js\" \"pre:edit-write:suggest-compact\" \"scripts/hooks/suggest-compact.js\" \"standard,strict\"" - } - ], - "description": "Suggest manual compaction at logical intervals" + "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" }] } ] } diff --git a/docs/zh-CN/skills/strategic-compact/SKILL.md b/docs/zh-CN/skills/strategic-compact/SKILL.md index 1f5947c19..cb2e05d76 100644 --- a/docs/zh-CN/skills/strategic-compact/SKILL.md +++ b/docs/zh-CN/skills/strategic-compact/SKILL.md @@ -40,7 +40,9 @@ origin: ECC ## 钩子设置 -添加到你的 `~/.claude/settings.json`: +**作为插件安装?** 无需任何设置。插件的 `hooks/hooks.json` 已经注册了 `suggest-compact.js`(钩子 ID `pre:edit-write:suggest-compact`,在 `standard` 和 `strict` 钩子配置档中生效)。不要把下面的代码块复制到 `~/.claude/settings.json` — 插件安装中不存在 `~/.claude/scripts/`,并且重复注册插件钩子会导致双重执行。 + +**如果是手动安装**(`./install.sh`),添加到你的 `~/.claude/settings.json`: ```json { diff --git a/docs/zh-TW/skills/strategic-compact/SKILL.md b/docs/zh-TW/skills/strategic-compact/SKILL.md index 9b2842f88..8b3dd0d76 100644 --- a/docs/zh-TW/skills/strategic-compact/SKILL.md +++ b/docs/zh-TW/skills/strategic-compact/SKILL.md @@ -29,7 +29,9 @@ description: Suggests manual context compaction at logical intervals to preserve ## Hook 設定 -新增到你的 `~/.claude/settings.json`: +**以外掛安裝?** 無需任何設定。外掛的 `hooks/hooks.json` 已經註冊了 `suggest-compact.js`(Hook ID `pre:edit-write:suggest-compact`,在 `standard` 與 `strict` hook 設定檔中生效)。請勿將下方區塊複製到 `~/.claude/settings.json` — 外掛安裝中不存在 `~/.claude/scripts/`,且重複註冊外掛 hook 會導致重複執行。 + +**如果是手動安裝**(`./install.sh`),新增到你的 `~/.claude/settings.json`: ```json { diff --git a/skills/strategic-compact/SKILL.md b/skills/strategic-compact/SKILL.md index 7bf3b11ca..bbb516685 100644 --- a/skills/strategic-compact/SKILL.md +++ b/skills/strategic-compact/SKILL.md @@ -40,7 +40,9 @@ Tool count alone is a weak proxy for window pressure: a few large file reads or ## Hook Setup -Add to your `~/.claude/settings.json`: +**Installed as a plugin?** No setup is needed. The plugin's `hooks/hooks.json` already registers `suggest-compact.js` (hook id `pre:edit-write:suggest-compact`, active in the `standard` and `strict` hook profiles). Do not copy the block below into `~/.claude/settings.json` — `~/.claude/scripts/` does not exist on plugin installs, and duplicating a plugin hook causes double execution. + +**If installed manually** (`./install.sh`), add to your `~/.claude/settings.json`: ```json {