hooks.json 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. {
  2. "description": "Shows the Claude Security banner when the /claude-security menu opens and reports usage counts after the plugin's helper scripts run.",
  3. "hooks": {
  4. "UserPromptExpansion": [
  5. {
  6. "matcher": "^claude-security:claude-security$",
  7. "hooks": [
  8. {
  9. "type": "command",
  10. "command": "sh \"${CLAUDE_PLUGIN_ROOT}/hooks/hooks.sh\" banner"
  11. }
  12. ]
  13. }
  14. ],
  15. "PostToolUse": [
  16. {
  17. "matcher": "Bash",
  18. "hooks": [
  19. {
  20. "type": "command",
  21. "command": "sh \"${CLAUDE_PLUGIN_ROOT}/hooks/hooks.sh\" metrics",
  22. "if": "Bash(python3 *claude-security*scripts/*.py *)",
  23. "asyncRewake": true,
  24. "timeout": 10
  25. }
  26. ]
  27. }
  28. ],
  29. "PostToolUseFailure": [
  30. {
  31. "matcher": "Bash",
  32. "hooks": [
  33. {
  34. "type": "command",
  35. "command": "sh \"${CLAUDE_PLUGIN_ROOT}/hooks/hooks.sh\" metrics",
  36. "if": "Bash(python3 *claude-security*scripts/*.py *)",
  37. "asyncRewake": true,
  38. "timeout": 10
  39. }
  40. ]
  41. }
  42. ]
  43. }
  44. }