Ai Bash Guard
Hooks security 70
AI-powered bash command security guard. Before any Bash command runs, a lightweight Claude subagent evaluates it for destructive or irreversible patterns — recursive deletes, force pushes to protected branches, database drops, and credential exposure — and blocks execution with a clear explanation if flagged. Uses PreToolUse with type:agent, which is the only hook pattern that can block tool execution via AI reasoning.
npx claude-code-templates@latest --hook security/ai-bash-guard claude-code — ai-bash-guard
Content
JSON
{
"description": "AI-powered bash command security guard. Before any Bash command runs, a lightwei..."
"hooks": {
"PreToolUse": [1 item]
}
}