From pro-workflow
Uses Claude Code's prompt hooks to create AI-powered quality gates that validate commit messages, enforce code conventions, and prevent destructive operations. Set up intelligent guardrails for your workflow.
How this skill is triggered — by the user, by Claude, or both
Slash command
/pro-workflow:llm-gateThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use Claude Code's `type: "prompt"` hooks to create intelligent quality gates that use AI to verify operations.
Use Claude Code's type: "prompt" hooks to create intelligent quality gates that use AI to verify operations.
Use when:
Claude Code supports hooks with type: "prompt" that run a small LLM (Haiku by default) to verify conditions:
{
"PreToolUse": [{
"matcher": "Bash",
"hooks": [{
"type": "prompt",
"if": "Bash(git commit*)",
"prompt": "Check if this git commit follows conventional commit format (<type>(<scope>): <summary>). The commit command is: $ARGUMENTS. Return {\"ok\": true} if valid, {\"ok\": false, \"reason\": \"...\"} if not.",
"model": "haiku",
"timeout": 15
}]
}]
}
The hook:
$ARGUMENTS with the JSON hook input{"ok": true} or {"ok": false, "reason": "..."}{
"type": "prompt",
"if": "Bash(git commit*)",
"prompt": "Verify this git commit follows conventional commits: type(scope): summary. Types: feat,fix,refactor,test,docs,chore,perf,ci. Summary under 72 chars. Input: $ARGUMENTS",
"model": "haiku"
}
{
"type": "prompt",
"if": "Bash(rm *)",
"prompt": "Check if this rm command is safe. Flag if it uses -rf on important directories (src/, node_modules/, .git/). Input: $ARGUMENTS",
"model": "haiku"
}
{
"type": "prompt",
"matcher": "Write",
"prompt": "Check if this file write contains hardcoded API keys, secrets, passwords, or tokens. Input: $ARGUMENTS. Return ok:false if secrets found.",
"model": "haiku"
}
For complex verification, use type: "agent" (runs a full agent):
{
"type": "agent",
"if": "Bash(git push*)",
"prompt": "Review all staged changes for security issues before pushing. Check for: hardcoded secrets, SQL injection, XSS vulnerabilities, exposed internal URLs.",
"model": "haiku",
"timeout": 60
}
if condition to avoid running on every tool callnpx claudepluginhub afriokaner/pro-workflow6plugins reuse this skill
First indexed Jun 4, 2026
Uses Claude Code's prompt hooks to create AI-powered quality gates that validate commit messages, enforce code conventions, and prevent destructive operations. Set up intelligent guardrails for your workflow.
Guides creation of Claude Code writing hooks for code quality gates, static analysis, and workflow automation using structured TDD tasks on events like PreToolUse.
Sets up or improves repository pre-commit checks, Git hook workflows, staged-file quality checks, and optional slow AI commit review with Codex or Claude.