Claude Code automatically loads hooks/hooks.json from the plugin directory.
Explicitly specifying it in plugin.json causes a duplicate hooks error:
Duplicate hooks file detected: ./hooks/hooks.json resolves to already-loaded
file .../hooks/hooks.json. The standard hooks/hooks.json is loaded
automatically, so manifest.hooks should only reference additional hook files.
Fixes#29
Relative paths like ./hooks/... fail when the plugin is installed
because hooks run in the project directory, not the plugin directory.
Using ${CLAUDE_PLUGIN_ROOT} ensures scripts are found regardless of
where the plugin is installed.
Fixed paths:
- hooks/strategic-compact/suggest-compact.sh
- hooks/memory-persistence/pre-compact.sh
- hooks/memory-persistence/session-start.sh
- hooks/memory-persistence/session-end.sh
- skills/continuous-learning/evaluate-session.sh
Using './' lets Claude Code use the already-cloned marketplace repo
directly instead of fetching from GitHub again. This avoids potential
double-fetch issues and simplifies the installation.
Fixes 'Invalid schema: plugins.0.source: Invalid input' error when
installing via /plugin marketplace add. The source field needs to be
a GitHub source object, not a relative path, when the plugin is at
the repo root.