Notify Before Bash
Show notification before any Bash command execution for security awareness. This hook displays a simple echo message '🔔 About to run bash command...' before Claude executes any bash command, giving you visibility into when system commands are about to run. Useful for monitoring and auditing command execution.
$ npx claude-code-templates@latest --hook="pre-tool/notify-before-bash" --yesRequires Claude Code. The command adds this hook to your project's .claudedirectory — nothing runs on ToolZip's servers.
What's inside this hook
Component source
{
"description": "Show notification before any Bash command execution for security awareness. This hook displays a simple echo message '🔔 About to run bash command...' before Claude executes any bash command, giving you visibility into when system commands are about to run. Useful for monitoring and auditing command execution.",
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "echo '🔔 About to run bash command...'"
}
]
}
]
}
}
Related Claude Code Hooks
Update Search Year
Automatically adds current year to WebSearch queries when no year is specified. This hook intercepts WebSearch tool usage and appends the current year to queries that don't already contain a year, ensuring search results are current and relevant.
Backup Before Edit
Create automatic backup of files before any Edit operation for safety. This hook creates a timestamped backup copy (filename.backup.timestamp) of any existing file before Claude modifies it. Provides a safety net to recover previous versions if needed. Only backs up existing files, includes error suppression to handle edge cases gracefully.
Console Log Cleaner
Warns about console.log statements when editing files on production branches (main/master). Helps prevent debug code from reaching production.
Simple Notifications
Send desktop notifications when Claude Code finishes working or needs user input. Works on macOS and Linux systems.
Smart Commit
Intelligent git commit creation with automatic message generation and validation. Creates meaningful commits based on file changes.
Smart Formatting
Smart code formatting based on file type. Automatically formats code using Prettier, Black, gofmt, rustfmt, and other language-specific formatters.
Catalog data and component content are sourced from the open-source davila7/claude-code-templates project (MIT license). ToolZip curates the listing and writes original descriptions; every component links back to its original source. Claude Code is a product of Anthropic. ToolZip is an independent catalog and is not affiliated with or endorsed by Anthropic.