Back to Hooks

Dangerous Command Blocker

Hooks security 1,254

Advanced protection against dangerous shell commands with multi-level security. Blocks catastrophic operations (rm -rf /, dd, mkfs), protects critical paths (.claude/, .git/, node_modules/), and warns about suspicious patterns. Features: catastrophic command blocking, critical path protection, smart pattern detection, and detailed safety messages.

Install Command
npx claude-code-templates@latest --hook security/dangerous-command-blocker
View on GitHub
claude-code — dangerous-command-blocker

Content

JSON
{
"description": "Advanced protection against dangerous shell commands with multi-level security. ..."
"supportingFiles": [
{3 keys}
]
"hooks": {
"PreToolUse": [1 item]
}
}

Stack Builder

0 components

Your stack is empty

Browse components and click the + button to add them to your stack for easy installation.