Prevent writing to .env files using the if condition for lightweight filtering. Blocks any Write tool call targeting .env* files, protecting secrets from accidental overwrites. Uses the if field to avoid spawning a process unless the file pattern matches.
Restrict authentication to Claude.ai accounts only. This prevents users from logging in with Anthropic Console accounts, ensuring all access goes through the Claude.ai platform for consistent user experience and billing.
Restrict authentication to Anthropic Console accounts only. This ensures all usage is billed through the API billing system and prevents access via Claude.ai accounts, ideal for enterprise environments with centralized billing.
Block git force push commands using the if condition for efficient filtering. Prevents accidental force pushes that can overwrite remote history. Covers --force, --force-with-lease, and the -f shorthand.
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 prettier doesn't need to be globally installed. Includes error suppression so it won't fail if prettier is not available.
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 black'). The command includes error suppression (2>/dev/null || true) so it won't fail if black is not installed.
Replaces the default spinner verbs with a humorous 'Don't Deploy On Fridays' reminder. Every time Claude is thinking, the spinner will display this message as a lighthearted warning against risky end-of-week deployments.