Properly follow Superpowers 6.1.1 pattern:
- SessionStart command hook (type: command) runs run-hook.cmd session-start
- run-hook.cmd is a cross-platform polyglot wrapper (Unix/Windows)
- session-start script reads engineering-principles/SKILL.md and injects
it as additionalContext wrapped in EXTREMELY_IMPORTANT tags
- The 29 engineering principles are active in context from turn 1
plugin.json: remove sessionStart.skill, keep skills: ./skills/
The command hook is the primary mechanism (just like Superpowers' using-superpowers).
Change plugin name from 'hub-guide' to 'code-guide' to avoid AI
interpreting it as Hub-specific. Skills now show as code-guide:skill-name.
Universal best-practice, not limited to any specific project.
hooks.json in ~/.claude/skills/hub-guide/hooks/hooks.json IS auto-detected
by Claude Code for skills-dir plugins. Remove from settings.local.json
to avoid duplication.
- hooks.json restored with hooks wrapper + proper matchers
- install.sh simplified, no settings.json manipulation
Skills-dir plugins (~/.claude/skills/) may not execute hooks from
hooks/hooks.json. Per documentation, hooks need to be in settings files.
- install.sh: add hook registration in ~/.claude/settings.local.json
- Hooks use absolute paths to hub-guide scripts
- SessionStart matcher: startup|resume|compact
- PreToolUse matcher: Write|Edit
- Remove hooks/hooks.json from plugin (redundant for skills-dir)
Not split per-skill directory. Single symlink/copy of the entire plugin. Skills are
auto-discovered from ~/.claude/skills/<name>/skills/<skill>/SKILL.md.