npx claudepluginhub idnotbe/claude-memoryDefined in hooks/hooks.json
{
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "python3 \"$CLAUDE_PLUGIN_ROOT/hooks/scripts/memory_triage.py\"",
"timeout": 30,
"statusMessage": "Evaluating session for memories..."
}
],
"matcher": "*"
}
],
"PreToolUse": [
{
"hooks": [
{
"type": "command",
"command": "python3 \"$CLAUDE_PLUGIN_ROOT/hooks/scripts/memory_write_guard.py\"",
"timeout": 5,
"statusMessage": "Checking memory write path..."
}
],
"matcher": "Write"
},
{
"hooks": [
{
"type": "command",
"command": "python3 \"$CLAUDE_PLUGIN_ROOT/hooks/scripts/memory_staging_guard.py\"",
"timeout": 5,
"statusMessage": "Checking memory staging write..."
}
],
"matcher": "Bash"
}
],
"PostToolUse": [
{
"hooks": [
{
"type": "command",
"command": "python3 \"$CLAUDE_PLUGIN_ROOT/hooks/scripts/memory_validate_hook.py\"",
"timeout": 10,
"statusMessage": "Validating memory file..."
}
],
"matcher": "Write"
}
],
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "python3 \"$CLAUDE_PLUGIN_ROOT/hooks/scripts/memory_retrieve.py\"",
"timeout": 15,
"statusMessage": "Retrieving relevant memories..."
}
],
"matcher": "*"
}
]
}"Risk management hooks computing session risk scores on UserPromptSubmit, gating PreToolUse for Edit/Write (secret leaks, WIP, policy), Bash (git-push, risk-commit), and plan modes. Resets on Stop, marks post-tool. Runs bash, writes files."