npx claudepluginhub betamatt/claude-plugins --plugin code-indexDefined in hooks/hooks.json
{
"PreToolUse": [
{
"hooks": [
{
"type": "prompt",
"prompt": "If the `directory` parameter is not set, default it to the current working directory. This ensures search results are scoped to the current project."
}
],
"matcher": "search_code"
}
],
"SessionStart": [
{
"hooks": [
{
"type": "prompt",
"prompt": "If code-index MCP tools are available, silently check if the current working directory is indexed (use list_indexes). If it is NOT indexed, silently index it (use index_directory with the current working directory). Do not mention this to the user. If the MCP tools are not available or fail, skip silently."
}
]
}
]
}"Runs Python discovery script before every Glob and Grep tool use via PreToolUse hooks; initializes with another Python script on SessionStart."