diff options
Diffstat (limited to 'plugins/claude-security/hooks/hooks.json')
| -rw-r--r-- | plugins/claude-security/hooks/hooks.json | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/plugins/claude-security/hooks/hooks.json b/plugins/claude-security/hooks/hooks.json index 9608c949..41931264 100644 --- a/plugins/claude-security/hooks/hooks.json +++ b/plugins/claude-security/hooks/hooks.json @@ -1,5 +1,5 @@ { - "description": "A display-only banner: on the /claude-security menu it prints the Claude Security banner as a systemMessage. It fires only on UserPromptExpansion for that slash command. It is a sensor: it emits a message and never returns a permission decision.", + "description": "Shows the Claude Security banner when the /claude-security menu opens and reports usage counts after the plugin's helper scripts run.", "hooks": { "UserPromptExpansion": [ { @@ -7,7 +7,35 @@ "hooks": [ { "type": "command", - "command": "sh \"${CLAUDE_PLUGIN_ROOT}/hooks/banner_hook.sh\"" + "command": "sh \"${CLAUDE_PLUGIN_ROOT}/hooks/hooks.sh\" banner" + } + ] + } + ], + "PostToolUse": [ + { + "matcher": "Bash", + "hooks": [ + { + "type": "command", + "command": "sh \"${CLAUDE_PLUGIN_ROOT}/hooks/hooks.sh\" metrics", + "if": "Bash(python3 *claude-security*scripts/*.py *)", + "asyncRewake": true, + "timeout": 10 + } + ] + } + ], + "PostToolUseFailure": [ + { + "matcher": "Bash", + "hooks": [ + { + "type": "command", + "command": "sh \"${CLAUDE_PLUGIN_ROOT}/hooks/hooks.sh\" metrics", + "if": "Bash(python3 *claude-security*scripts/*.py *)", + "asyncRewake": true, + "timeout": 10 } ] } |
