PostToolUse
env-check.sh
Validates environment files and blocks .env commits. Checks for secrets in .env.example and duplicate keys
Checks Performed
Block .env file commits
Check .env.example for secrets
Detect duplicate keys
Overview
Validates environment files and blocks .env commits. Checks for secrets in .env.example and duplicate keys. This hook runs on the PostToolUse event.
Configuration
Add this hook to your .claude/settings.json:
{
"hooks": {
"PostToolUse": [
{
"matcher": "Edit",
"command": "bash .claude-plugins/laravel-agent/hooks/scripts/env-check.sh"
}
]
}
}