Event Hooks

safety-hooks

2 events · 5 hooks

From safety-hooks
Install
1
Run in your terminal
$
npx claudepluginhub pchalasani/claude-code-tools --plugin safety-hooks
Risk Indicators
Executes bash commandsModifies files
Source

Defined in hooks/hooks.json

Configuration
{
  "PreToolUse": [
    {
      "hooks": [
        {
          "type": "command",
          "command": "bash -c 'if test -f \"${CLAUDE_PLUGIN_ROOT}/hooks/bash_hook.py\"; then python3 \"${CLAUDE_PLUGIN_ROOT}/hooks/bash_hook.py\"; else echo \"{\\\"decision\\\":\\\"approve\\\"}\"; fi'",
          "timeout": 10
        }
      ],
      "matcher": "Bash"
    },
    {
      "hooks": [
        {
          "type": "command",
          "command": "bash -c 'if test -f \"${CLAUDE_PLUGIN_ROOT}/hooks/file_length_limit_hook.py\"; then python3 \"${CLAUDE_PLUGIN_ROOT}/hooks/file_length_limit_hook.py\"; else echo \"{\\\"decision\\\":\\\"approve\\\"}\"; fi'",
          "timeout": 10
        }
      ],
      "matcher": "Edit"
    },
    {
      "hooks": [
        {
          "type": "command",
          "command": "bash -c 'if test -f \"${CLAUDE_PLUGIN_ROOT}/hooks/file_length_limit_hook.py\"; then python3 \"${CLAUDE_PLUGIN_ROOT}/hooks/file_length_limit_hook.py\"; else echo \"{\\\"decision\\\":\\\"approve\\\"}\"; fi'",
          "timeout": 10
        }
      ],
      "matcher": "Write"
    },
    {
      "hooks": [
        {
          "type": "command",
          "command": "bash -c 'if test -f \"${CLAUDE_PLUGIN_ROOT}/hooks/read_env_protection_hook.py\"; then python3 \"${CLAUDE_PLUGIN_ROOT}/hooks/read_env_protection_hook.py\"; else echo \"{\\\"decision\\\":\\\"approve\\\"}\"; fi'",
          "timeout": 10
        }
      ],
      "matcher": "Read"
    }
  ],
  "UserPromptSubmit": [
    {
      "hooks": [
        {
          "type": "command",
          "command": "bash -c 'if test -f \"${CLAUDE_PLUGIN_ROOT}/hooks/allow_git_hook.py\"; then python3 \"${CLAUDE_PLUGIN_ROOT}/hooks/allow_git_hook.py\"; else echo \"{\\\"decision\\\":\\\"approve\\\"}\"; fi'",
          "timeout": 10
        }
      ]
    }
  ]
}
Summary
{
  "riskFlags": {
    "touchesBash": true,
    "matchAllTools": false,
    "touchesFileWrites": true
  },
  "typeStats": {
    "command": 5
  },
  "eventStats": {
    "PreToolUse": 4,
    "UserPromptSubmit": 1
  },
  "originCounts": {
    "absolutePaths": 0,
    "pluginScripts": 5,
    "projectScripts": 0
  },
  "timeoutStats": {
    "commandsWithoutTimeout": 0
  }
}
Stats
Parent Repo Stars1594
Parent Repo Forks100
Last CommitFeb 15, 2026