mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-04-23 10:33:32 +08:00
docs: fix plugin quick start for continuous learning v2 (#1546)
This commit is contained in:
@@ -92,7 +92,13 @@ source: "session-observation"
|
||||
|
||||
### 1. 啟用觀察 Hooks
|
||||
|
||||
新增到你的 `~/.claude/settings.json`:
|
||||
**如果作為外掛安裝**(建議):
|
||||
|
||||
不需要在 `~/.claude/settings.json` 中額外加入 hook。Claude Code v2.1+ 會自動載入外掛的 `hooks/hooks.json`,其中已經註冊了 `observe.sh`。
|
||||
|
||||
如果你之前把 `observe.sh` 複製到 `~/.claude/settings.json`,請移除重複的 `PreToolUse` / `PostToolUse` 區塊。重複註冊會造成重複執行,並觸發 `${CLAUDE_PLUGIN_ROOT}` 解析錯誤;這個變數只會在外掛自己的 `hooks/hooks.json` 中展開。
|
||||
|
||||
**如果手動安裝到 `~/.claude/skills`**,新增到你的 `~/.claude/settings.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -101,14 +107,14 @@ source: "session-observation"
|
||||
"matcher": "*",
|
||||
"hooks": [{
|
||||
"type": "command",
|
||||
"command": "~/.claude/skills/continuous-learning-v2/hooks/observe.sh pre"
|
||||
"command": "~/.claude/skills/continuous-learning-v2/hooks/observe.sh"
|
||||
}]
|
||||
}],
|
||||
"PostToolUse": [{
|
||||
"matcher": "*",
|
||||
"hooks": [{
|
||||
"type": "command",
|
||||
"command": "~/.claude/skills/continuous-learning-v2/hooks/observe.sh post"
|
||||
"command": "~/.claude/skills/continuous-learning-v2/hooks/observe.sh"
|
||||
}]
|
||||
}]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user