docs: fix plugin quick start for continuous learning v2 (#1546)

This commit is contained in:
Affaan Mustafa
2026-04-21 18:41:36 -04:00
committed by GitHub
parent e63241c699
commit 4e66b2882d
7 changed files with 94 additions and 110 deletions

View File

@@ -138,32 +138,13 @@ Each project gets a 12-character hash ID (e.g., `a1b2c3d4e5f6`). A registry file
### 1. Enable Observation Hooks
Add to your `~/.claude/settings.json`.
**If installed as a plugin** (recommended):
```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"
}]
}]
}
}
```
No extra `settings.json` hook block is required. Claude Code v2.1+ auto-loads the plugin `hooks/hooks.json`, and `observe.sh` is already registered there.
**If installed manually** to `~/.claude/skills`:
If you previously copied `observe.sh` into `~/.claude/settings.json`, remove that duplicate `PreToolUse` / `PostToolUse` block. Duplicating the plugin hook causes double execution and `${CLAUDE_PLUGIN_ROOT}` resolution errors because that variable is only available inside plugin-managed `hooks/hooks.json` entries.
**If installed manually** to `~/.claude/skills`, add this to your `~/.claude/settings.json`:
```json
{