simple-notifications
Send desktop notifications when Claude Code finishes working or needs user input. Works on macOS and Linux systems.
Find event automations (hooks) for Claude Code in the Doutor AI Library. Make your applications more efficient.
Event automations, also known as hooks, are essential tools for anyone who works with Claude Code. They let developers add reactive functionality to their applications, responding to specific events efficiently.
Installing hooks from the Doutor AI Library gives you access to a wide range of 81 automations, which makes developing and customizing your applications easier. Our library is a reliable source that helps you optimize your workflow and maximize productivity.
If you already know the task you want to solve, start from a hand-picked selection: we chose the components that are really worth it and explain why.
Send desktop notifications when Claude Code finishes working or needs user input. Works on macOS and Linux systems.
Intelligent git commit creation with automatic message generation and validation. Creates meaningful commits based on file changes.
Automatically run linting tools after file modifications. Supports ESLint for JavaScript/TypeScript, Pylint for Python, and RuboCop for Ruby.
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…
Smart code formatting based on file type. Automatically formats code using Prettier, Black, gofmt, rustfmt, and other language-specific formatters.
Advanced dependency analysis and security checking. Monitors for outdated packages, security vulnerabilities, and license compatibility.
Enforce Next.js best practices, proper file structure, component patterns, and TypeScript usage with automated code reviews and suggestions. Validates Next.js App Router conventions, Server/Client component patterns, proper imports, and…
Scan code for security vulnerabilities and secrets after modifications. Uses multiple security tools to detect potential issues.
Automatically run quick tests after code modifications to ensure nothing breaks. This hook executes 'npm run test:quick' silently after any Edit operation and provides feedback on test status. Helps catch breaking changes immediately…
Track file changes in a simple log. Records which files were modified and when for easy tracking of Claude Code activity.
Automatically format Python files after any Edit operation using black formatter. This hook runs 'black' on any .py file that Claude modifies, ensuring consistent Python code formatting. Requires black to be installed ('pip install…
Automatically loads AGENTS.md configuration file content at session start to ensure Claude Code follows project-specific agent behavior. Only loads if AGENTS.md exists, otherwise passes empty context. Supports the universal AGENTS.md…
Protect critical files from accidental modification. Prevents editing of important system files, configuration files, and production code.
Automatically stage modified files with git add after editing. Helps maintain a clean git workflow by staging changes as they're made.
Send Telegram notifications when Claude Code finishes working. Requires TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID environment variables. Get bot token from @BotFather, get chat ID by messaging the bot and visiting…
for pattern, desc in critical_paths: if re.search(pattern, cmd, re.IGNORECASE): print(f'🛑 BLOCKED: Critical path protection activated!', file=sys.stderr) print(f'', file=sys.stderr) print(f'Protected resource: {desc}', file=sys.stderr)…
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:…
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…
print('❌ COMMIT BLOCKED: Remove secrets before committing', file=sys.stderr) print('', file=sys.stderr) print('How to fix:', file=sys.stderr) print(' 1. Move secrets to environment variables:', file=sys.stderr) print(' • Create/update .env…
Automatically detects hardcoded secrets before git commits. Scans for API keys from 30+ providers (Anthropic: sk-ant-..., OpenAI: sk-..., AWS: AKIA..., Stripe: sk_live_..., Google: AIza..., GitHub: ghp_..., Vercel, Supabase, Hugging Face:…
Automatically run relevant tests after code changes. Detects test files and runs appropriate test commands based on file extensions and project structure.
Automatically backup files before editing. Creates timestamped backups in a .backups directory when files are modified.
Log all Claude Code commands to a file for audit and debugging purposes. Simple logging that records tool usage with timestamps.
Monitor system performance during Claude Code operations. Tracks CPU, memory usage, and execution time for performance optimization.
Automatically format JavaScript/TypeScript files after any Edit operation using prettier. This hook runs 'npx prettier --write' on any .js, .ts, .jsx, or .tsx file that Claude modifies, ensuring consistent code formatting. Uses npx so…
Enforce conventional commit message format for all git commits. Validates commit messages follow the pattern: type(scope): description. Supported types: feat, fix, docs, style, refactor, perf, test, chore, ci, build, revert. Ensures…
Automatically trigger build processes when source files change. Detects common build tools and runs appropriate build commands.
Automatically stage changes in git after file modifications for easier commit workflow. This hook runs 'git add' on any file that Claude edits or writes, automatically staging changes for the next commit. Includes error suppression so it…
Real-time browser visualization of Claude Code's context window and subagent/tool execution as a git-graph timeline. Opens http://localhost:7878 on SessionStart with a vertical timeline (most recent on top), one column per agent (main +…
Send detailed Telegram notifications with session information when Claude Code finishes. Includes working directory, session duration, and system info. Requires TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID environment variables.
Git Flow workflow: 1. Create a feature branch: /feature
Prevent direct pushes to protected branches (main, develop). Blocks git push commands targeting main or develop branches to enforce Git Flow workflow. Requires using feature/release/hotfix branches and pull requests instead of direct…
Monitor deployment status, error rates, and performance metrics, sending notifications for failed deployments or performance degradation. Tracks Vercel deployment health, monitors build success/failure rates, and provides alerts for…
Automatically trigger Vercel deployments when code changes are committed, with environment-specific deployment strategies and rollback on failure. Setup: Export environment variables 'export VERCEL_TOKEN=your_token' and 'export…
Validate Git Flow branch naming conventions before checkout. Ensures branches follow the pattern: feature/*, release/v*.*.*, hotfix/*. Prevents creation of branches that don't follow Git Flow standards.
Git Flow branches must follow these patterns: • feature/ • release/v . . • hotfix/
Monitor bundle size and Core Web Vitals metrics during development, blocking deployments that exceed performance budgets with detailed reports. Automatically analyzes Next.js build output, checks bundle sizes against predefined budgets,…
Synchronize environment variables between local development and Vercel deployments, ensuring consistency across all environments. Detects changes to .env files and provides options to sync with Vercel, validates environment variable…
Send detailed Discord notifications with session information when Claude Code finishes. Includes working directory, session duration, and system info with rich embeds. Requires DISCORD_WEBHOOK_URL environment variable.
Send Slack notifications when Claude Code finishes working. Requires SLACK_WEBHOOK_URL environment variable. Get webhook URL from Slack App settings -> Incoming Webhooks.
Send Telegram notifications when Claude Code encounters long-running operations or when tools take significant time. Helps monitor productivity and catch potential issues. Requires TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID environment…
Worktree Ghostty Layout. Opens a 3-panel Ghostty layout when creating worktrees: Claude Code (left) | lazygit (top-right) / yazi (bottom-right). Creates worktrees in a sibling directory (../worktrees/ / /) and cleans up on…
Automatically send Claude Code conversation traces to LangSmith for monitoring and analysis. Prerequisites: jq (brew install jq on macOS or sudo apt-get install jq on Linux), curl and uuidgen (usually pre-installed), LangSmith account and…
posts_batch=$(echo "$posts_batch" | jq --argjson data "$assistant_data" '. += [$data]')
Send detailed Slack notifications with session information when Claude Code finishes. Includes working directory, session duration, and system info. Requires SLACK_WEBHOOK_URL environment variable.
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…
Send Discord notifications when Claude Code finishes working. Requires DISCORD_WEBHOOK_URL environment variable. Get webhook URL from Discord Server Settings -> Integrations -> Webhooks.
Send Discord notifications when Claude Code encounters long-running operations or when tools take significant time. Helps monitor productivity and catch potential issues with rich embeds. Requires DISCORD_WEBHOOK_URL environment variable.
Need help with Claude Code?
Ask Dr AI - it explains things simply.
From component to Claude Code, without friction.
Agents, skills, commands and connectors ready to install.
A single install command in your project.
Claude Code starts using it automatically.
You are working with AI for real the same day.
Installing hooks in your Claude Code application is a simple process. First, open the Doutor AI Library and look for the automations section. Once you find the hook you want, follow the installation instructions, which include integrating it with your project and the configuration it needs.
Prompts and resources curated from international sources, normalized and categorized: over 11 thousand. A Doutor AI bot checks the sources every day and brings in what is new.
Need a tailor-made solution?
Not sure where to start with AI in your business? Get a free assessment and a tailored plan - no commitment.
Doutor AI gives you 1,859 ready-to-copy AI prompts, by industry and in plain English - plus a complete technical library for those who want to go further.