llm-gate

Configures prompt-based hooks that validate commits, commands, and file writes using LLM checks.

1|Updated May 6, 2026
One-click install
npx skills add https://github.com/surfingalien/FinSurfing --skill llm-gate-surfingalien
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: llm-gate
Source: https://github.com/surfingalien/FinSurfing/tree/main/.claude/skills/llm-gate
Command: npx skills add https://github.com/surfingalien/FinSurfing --skill llm-gate-surfingalien

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Static linters and regex rules cannot catch semantic issues like malformed commit messages, risky shell commands, or hardcoded secrets in file writes. This Skill sets up 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 the operation when the model returns {"ok": false}. - Ready-Made Gates: Includes templates for conventional commit validation, destructive rm command guarding, and API key leak detection on file writes. - Agent Hooks: Escalate to type: "agent" hooks for deeper reviews, such as scanning staged changes for security issues before a git push. - Use Case: A team wants every commit to follow conventional commit format. Add the provided PreToolUse hook matching Bash(git commit*) so non-conforming messages are blocked with an explanatory reason. ## Quick Start Set up a prompt hook that validates my git commit messages against conventional commit format before allowing them to run.

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 an LLM hook?

Add a PreToolUse hook with type "prompt" matching Bash(git commit*). The prompt asks Haiku to check 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 review, such as scanning staged changes for security issues, with longer timeouts around 60 seconds.

Can prompt hooks detect hardcoded API keys in file writes?

Yes. Configure a prompt hook on the Write matcher asking the model to check the file content for hardcoded secrets, passwords, or tokens. If any are found, the hook returns ok:false and blocks the write.

Which model should I use for Claude Code verification hooks?

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

Why is my prompt hook slowing down every tool call?

The hook is missing an `if` condition, so it runs on every tool invocation. Always scope hooks with a matcher like Bash(git commit*) and keep prompts under 100 words with a 15-second timeout.