npx claudepluginhub nbkm8y5/claude-plugins --plugin context-graphDefined in hooks/hooks.json
{
"PreCompact": [
{
"hooks": [
{
"type": "prompt",
"prompt": "Before context is compressed, check if any new knowledge was discovered in this session that should be persisted to the context graph. If .claude/context-graph/ exists, review: (1) Were any new components, decisions, or patterns discovered that are not yet in the graph? (2) Have any existing entities changed (new dependencies, status changes, ownership changes)? (3) Are there any relations between entities that were revealed during this session? If updates are needed, write new entity files or update existing ones in .claude/context-graph/entities/ following the schema in ${CLAUDE_PLUGIN_ROOT}/skills/knowledge-management/references/entity_schema.md, and update .claude/context-graph/index.md. If the graph doesn't exist yet, skip this — the user must explicitly bootstrap it with /context-bootstrap."
}
],
"matcher": ""
}
],
"PostToolUse": [
{
"hooks": [
{
"type": "command",
"command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/check_entity_format.py \"$FILE_PATH\"",
"timeout": 5
}
],
"matcher": "Write|Edit"
}
]
}"{\"riskFlags\": {\"touchesBash\": false, \"matchAllTools\": false, \"touchesFileWrites\": true}, \"typeStats\": {\"prompt\": 1, \"command\": 1}, \"eventStats\": {\"PreCompact\": 1, \"PostToolUse\": 1}, \"originCounts\": {\"absolutePaths\": 0, \"pluginScripts\": 1, \"projectScripts\": 0}, \"timeoutStats\": {\"commandsWithoutTimeout\": 0}}"