From pro-workflow
Configures LLM prompt and agent hooks to validate git commits, block destructive commands, detect secrets in writes, and review changes for security before execution.
npx claudepluginhub rohitg00/pro-workflow --plugin pro-workflowThis skill uses the workspace's default tool permissions.
Use Claude Code's `type: "prompt"` hooks to create intelligent quality gates that use AI to verify operations.
Guides 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.
Guides authoring Claude Code hooks: event selection, matcher patterns, types (command/prompt/agent), blocking vs advisory. Use for quality gates, automation, policy enforcement.
Share bugs, ideas, or general feedback.
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 call