PostToolUse
blade-lint.sh
Validates Blade templates for security and best practices. Checks CSRF tokens, XSS prevention, and directive usage
Checks Performed
Missing @csrf in forms
Unescaped output ({!! !!})
Missing @method for PUT/DELETE
Overview
Validates Blade templates for security and best practices. Checks CSRF tokens, XSS prevention, and directive usage. 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/blade-lint.sh"
}
]
}
}