llm-gate

Validates commits, commands, and file writes using LLM-powered prompt hooks.

2.8k|277|Updated Feb 1, 2026
One-click install
npx skills add https://github.com/rohitg00/pro-workflow --skill llm-gate
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: llm-gate
Source: https://github.com/rohitg00/pro-workflow/tree/main/skills/llm-gate
Command: npx skills add https://github.com/rohitg00/pro-workflow --skill llm-gate

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Static linters and regex rules cannot catch semantic issues like malformed commit messages, risky destructive commands, or hardcoded secrets in file writes. This Skill configures Claude Code prompt hooks that use a small LLM to verify operations before they execute.

Core Features & Use Cases

  • Prompt Hooks: Configure type: "prompt" hooks that send tool-call input to Haiku and block operations returning {"ok": false}.
  • Ready-Made Gates: Includes examples for conventional commit validation, destructive rm command guarding, and API key leak prevention on file writes.
  • Agent Hooks: Use type: "agent" hooks for deeper verification, such as reviewing staged changes for security issues before a git push.
  • Use Case: A team wants every commit to follow conventional commit format. Add a PreToolUse prompt hook matching Bash(git commit*) so non-conforming commits are blocked with an explanatory reason.

Quick Start

Set up a Claude Code prompt hook that validates my git commit messages against conventional commit format using Haiku.

Frequently Asked Questions about llm-gate

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate git commit messages with Claude Code hooks?

Add a PreToolUse hook with type "prompt" and an if condition matching Bash(git commit*). The prompt asks Haiku to verify conventional commit format and return {"ok": true} or {"ok": false, "reason": "..."}, blocking invalid commits.

What is the difference between prompt hooks and agent hooks in Claude Code?

Prompt hooks run a single small LLM call (Haiku by default) for fast yes/no verification with a 15-second timeout. Agent hooks run a full agent for complex multi-step analysis, such as security review of staged changes, with timeouts around 60 seconds.

Which model should I use for Claude Code prompt hooks?

Use Haiku for simple checks like commit format or secret detection because it is fast and cheap. Reserve Sonnet for complex analysis where accuracy matters more than latency.

Can prompt hooks block file writes containing API keys?

Yes. Set a prompt hook on the Write tool that asks the model to check the file content for hardcoded API keys, passwords, or tokens. If secrets are found, the hook returns ok:false and blocks the write.

Why is my Claude Code hook running on every tool call?

The hook is missing an if condition or matcher filter. Always include an if condition such as Bash(git commit*) so the LLM check only runs on relevant operations, avoiding latency and cost on every tool call.