Executes custom bash commands before and after key Claude events like tool usage, sessions, and subagent operations.
/plugin marketplace add https://www.claudepluginhub.com/api/plugins/mysmon-spec-workflow-toolkit/marketplace.json/plugin install mysmon-spec-workflow-toolkit@cpd-mysmon-spec-workflow-toolkitDefined in ./hooks/hooks.json
{
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/session_summary.sh",
"timeout": 5
}
],
"matcher": ""
}
],
"PreCompact": [
{
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/pre_compact_save.sh",
"timeout": 5
}
],
"matcher": ""
}
],
"PreToolUse": [
{
"hooks": [
{
"type": "command",
"command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/safety_check.py",
"timeout": 5
}
],
"matcher": "Bash|mcp__.*__(exec|run|shell|command|bash|terminal)"
},
{
"hooks": [
{
"type": "command",
"command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/prevent_secret_leak.py",
"timeout": 5
}
],
"matcher": "Write|Edit"
},
{
"hooks": [
{
"type": "command",
"command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/external_content_validator.py",
"timeout": 5
}
],
"matcher": "WebFetch|WebSearch"
}
],
"SessionEnd": [
{
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/session_cleanup.sh",
"timeout": 5
}
],
"matcher": ""
}
],
"PostToolUse": [
{
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/audit_log.sh",
"timeout": 2
}
],
"matcher": ""
}
],
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/spec_context.sh",
"timeout": 5
},
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/enforce_japanese_mode.sh",
"timeout": 3
}
],
"matcher": ""
}
],
"SubagentStop": [
{
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/subagent_summary.sh",
"timeout": 5
},
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/insight_capture.sh",
"timeout": 3
},
{
"type": "command",
"command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/verify_references.py",
"timeout": 5
}
],
"matcher": ""
}
],
"PostToolUseFailure": [
{
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/audit_log.sh",
"timeout": 2
}
],
"matcher": ""
}
]
}{
"riskFlags": {
"touchesBash": true,
"matchAllTools": true,
"touchesFileWrites": true
},
"typeStats": {
"command": 13
},
"eventStats": {
"Stop": 1,
"PreCompact": 1,
"PreToolUse": 3,
"SessionEnd": 1,
"PostToolUse": 1,
"SessionStart": 2,
"SubagentStop": 3,
"PostToolUseFailure": 1
},
"originCounts": {
"absolutePaths": 0,
"pluginScripts": 13,
"projectScripts": 0
},
"timeoutStats": {
"commandsWithoutTimeout": 0
}
}