npx claudepluginhub hjertefolger/cortex --plugin cortexDefined in hooks/hooks.json
{
"PreCompact": [
{
"hooks": [
{
"type": "command",
"command": "node ${CLAUDE_PLUGIN_ROOT}/dist/index.js pre-compact",
"timeout": 60
}
]
}
],
"SessionEnd": [
{
"hooks": [
{
"type": "command",
"command": "node ${CLAUDE_PLUGIN_ROOT}/dist/index.js session-end",
"timeout": 30
}
]
}
],
"PostToolUse": [
{
"hooks": [
{
"type": "command",
"command": "node ${CLAUDE_PLUGIN_ROOT}/dist/index.js post-tool",
"timeout": 2
}
],
"matcher": "*"
}
],
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "node ${CLAUDE_PLUGIN_ROOT}/dist/index.js session-start",
"timeout": 10
}
]
}
]
}"Runs Node.js scripts at session start (10s), after every tool use (2s), before compact (60s), and session end (30s). Observes Claude Code lifecycle events without bash or file writes."