npx claudepluginhub sagarmk/beacon-pluginDefined in hooks/hooks.json
{
"PreCompact": [
{
"hooks": [
{
"type": "command",
"command": "node ${CLAUDE_PLUGIN_ROOT}/scripts/status.js --compact-warning",
"timeout": 5,
"description": "Beacon: inject index status into context before compaction so search capability survives"
}
],
"matcher": ""
}
],
"PreToolUse": [
{
"hooks": [
{
"type": "command",
"command": "node ${CLAUDE_PLUGIN_ROOT}/scripts/grep-intercept.js",
"timeout": 5,
"description": "Beacon: intercept grep and redirect to hybrid search when Beacon handles the query better"
}
],
"matcher": "Grep"
}
],
"PostToolUse": [
{
"hooks": [
{
"type": "command",
"async": true,
"command": "node ${CLAUDE_PLUGIN_ROOT}/scripts/embed-file.js \"$TOOL_INPUT_file_path\"",
"timeout": 15,
"description": "Beacon: re-embed changed file"
}
],
"matcher": "Write|Edit|MultiEdit"
},
{
"hooks": [
{
"type": "command",
"async": true,
"command": "node ${CLAUDE_PLUGIN_ROOT}/scripts/gc.js",
"timeout": 10,
"description": "Beacon: garbage collect embeddings for deleted files after bash commands"
}
],
"matcher": "Bash"
}
],
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "node ${CLAUDE_PLUGIN_ROOT}/scripts/ensure-deps.js",
"timeout": 180,
"description": "Beacon: ensure npm dependencies are installed (first run only)"
},
{
"type": "command",
"async": true,
"command": "node ${CLAUDE_PLUGIN_ROOT}/scripts/sync.js",
"timeout": 300,
"description": "Beacon: sync code embeddings index (full index on first run, diff-based on subsequent)"
}
],
"matcher": ""
}
]
}"{\"riskFlags\": {\"touchesBash\": true, \"matchAllTools\": false, \"touchesFileWrites\": true}, \"typeStats\": {\"command\": 6}, \"eventStats\": {\"PreCompact\": 1, \"PreToolUse\": 1, \"PostToolUse\": 2, \"SessionStart\": 2}, \"originCounts\": {\"absolutePaths\": 0, \"pluginScripts\": 6, \"projectScripts\": 0}, \"timeoutStats\": {\"commandsWithoutTimeout\": 0}}"