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:
@@ -144,28 +144,11 @@ Use functional patterns over classes when appropriate.
|
||||
|
||||
**如果作为插件安装**(推荐):
|
||||
|
||||
```json
|
||||
{
|
||||
"hooks": {
|
||||
"PreToolUse": [{
|
||||
"matcher": "*",
|
||||
"hooks": [{
|
||||
"type": "command",
|
||||
"command": "${CLAUDE_PLUGIN_ROOT}/skills/continuous-learning-v2/hooks/observe.sh"
|
||||
}]
|
||||
}],
|
||||
"PostToolUse": [{
|
||||
"matcher": "*",
|
||||
"hooks": [{
|
||||
"type": "command",
|
||||
"command": "${CLAUDE_PLUGIN_ROOT}/skills/continuous-learning-v2/hooks/observe.sh"
|
||||
}]
|
||||
}]
|
||||
}
|
||||
}
|
||||
```
|
||||
不需要在 `~/.claude/settings.json` 中额外添加 hooks。Claude Code v2.1+ 会自动加载插件的 `hooks/hooks.json`,其中已经注册了 `observe.sh`。
|
||||
|
||||
**如果手动安装**到 `~/.claude/skills`:
|
||||
如果您之前把 `observe.sh` 复制到了 `~/.claude/settings.json`,请删除重复的 `PreToolUse` / `PostToolUse` 配置。重复注册会导致重复执行,并触发 `${CLAUDE_PLUGIN_ROOT}` 解析错误,因为该变量只会在插件自己的 `hooks/hooks.json` 中展开。
|
||||
|
||||
**如果手动安装**到 `~/.claude/skills`,请将以下内容添加到 `~/.claude/settings.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user