Defined in hooks/hooks.json
{
"PreToolUse": [
{
"hooks": [
{
"type": "command",
"command": "npx tsx ${CLAUDE_PLUGIN_ROOT}/shared/hooks/log-task-call.ts",
"description": "Logs Task tool calls before agent execution. Saves context for later retrieval in SubagentStop hooks."
}
],
"matcher": "Task"
},
{
"hooks": [
{
"type": "command",
"command": "npx tsx ${CLAUDE_PLUGIN_ROOT}/shared/hooks/validate-folder-structure-write.ts",
"matcher": "Write",
"description": "Validates folder structure when creating .claude configuration files. Ensures proper directory organization for agents, hooks, skills, and rules."
},
{
"type": "command",
"command": "npx tsx ${CLAUDE_PLUGIN_ROOT}/shared/hooks/validate-rules-file.ts",
"matcher": "Write|Edit",
"description": "Validates rule file structure and frontmatter. Ensures rules have proper Required Skills metadata and valid YAML frontmatter."
}
],
"matcher": "Write|Edit"
},
{
"hooks": [
{
"type": "command",
"command": "npx tsx ${CLAUDE_PLUGIN_ROOT}/shared/hooks/validate-folder-structure-mkdir.ts",
"description": "Validates mkdir commands for .claude directories. Prevents creation of invalid or non-standard directory structures."
}
],
"matcher": "Bash"
}
],
"PostToolUse": [
{
"hooks": [
{
"type": "command",
"command": "npx tsx ${CLAUDE_PLUGIN_ROOT}/shared/hooks/log-task-result.ts",
"description": "Logs Task tool results after agent completion. Captures agent output and context for analysis."
}
],
"matcher": "Task"
},
{
"hooks": [
{
"type": "command",
"command": "npx tsx ${CLAUDE_PLUGIN_ROOT}/hooks/create-plan-symlink.ts",
"description": "Creates PLAN.md symlink when plan files are written. Maintains active plan reference."
},
{
"type": "command",
"command": "npx tsx ${CLAUDE_PLUGIN_ROOT}/shared/hooks/enforce-plan-scoping.ts",
"description": "Enforces plan-based path scoping for writes/edits. Denies operations outside allowed scope."
}
],
"matcher": "Write|Edit"
},
{
"hooks": [
{
"type": "command",
"command": "npx tsx ${CLAUDE_PLUGIN_ROOT}/hooks/add-folder-context.ts",
"description": "Discovers and adds CLAUDE.md context when reading files. Automatically enriches Claude's context with folder-level documentation."
},
{
"type": "command",
"command": "npx tsx ${CLAUDE_PLUGIN_ROOT}/shared/hooks/enforce-plan-scoping.ts",
"description": "Warns when reads are outside plan scope. Non-blocking guidance to stay within plan boundaries."
}
],
"matcher": "Read"
}
],
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "npx tsx ${CLAUDE_PLUGIN_ROOT}/hooks/encourage-context-review.ts",
"description": "Encourages updating plans, agents, skills, and CLAUDE.md files based on user prompts"
}
]
}
]
}{
"riskFlags": {
"touchesBash": true,
"matchAllTools": false,
"touchesFileWrites": true
},
"typeStats": {
"command": 10
},
"eventStats": {
"PreToolUse": 4,
"PostToolUse": 5,
"UserPromptSubmit": 1
},
"originCounts": {
"absolutePaths": 0,
"pluginScripts": 10,
"projectScripts": 0
},
"timeoutStats": {
"commandsWithoutTimeout": 10
}
}