From pro-workflow
Creates AI-powered quality gates using Claude Code prompt hooks to validate commit messages, code patterns, and conventions before allowing operations.
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 rohitg00/pro-workflow --plugin pro-workflowGuides creation of Claude Code writing hooks for code quality gates, static analysis, and workflow automation using structured TDD tasks on events like PreToolUse.
Develops Claude Code hooks to run shell commands or LLM prompts on events like PreToolUse for automations, guardrails, quality checks, and pre-push tests.
Validates git commits against COMMIT_WORKFLOW.md standards: checks AI attribution, single focus, no secrets in diffs, and pre-commit requirements. Blocks invalid commits and provides fix instructions.