mcpbeat Sign in

LLM Gate Skill for Claude

LLM-powered quality verification using prompt hooks. Validates commit messages, code patterns, and conventions using AI before allowing operations. Use to set up intelligent guardrails.

757 tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
2755
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/rohitg00/pro-workflow --skill llm-gate

The instruction itself

10 sections, as written by the author

LLM Gate

Use Claude Code's type: "prompt" hooks to create intelligent quality gates that use AI to verify operations.

Trigger

Use when:

  • Setting up commit message validation
  • Enforcing code conventions beyond what linters catch
  • Creating smart guardrails for specific operations

How Prompt Hooks Work

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:

  • Substitutes $ARGUMENTS with the JSON hook input
  • Sends to Haiku (fast, cheap)
  • Expects {"ok": true} or {"ok": false, "reason": "..."}
  • If not ok → blocks the tool call with the reason

Example Gates

Conventional Commit Validator

{
  "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"
}

Destructive Command Guard

{
  "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"
}

API Key Leak Prevention

{
  "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"
}

Agent Hooks

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
}

Setup Guide

  • Choose which operations to gate
  • Write the prompt (keep it focused, under 100 words)
  • Pick the model (haiku for speed, sonnet for accuracy)
  • Set timeout (15s for prompts, 60s for agents)
  • Add to hooks.json under the appropriate event

Rules

  • Use Haiku for simple checks (fast, cheap)
  • Use Sonnet only for complex analysis
  • Keep prompts under 100 words for reliability
  • Always include if condition to avoid running on every tool call
  • Set reasonable timeouts (15s prompt, 60s agent)
  • Test hooks before deploying to avoid blocking workflows

Other skills for the same job

different authors, same section of the catalogue
Trtllm Moe Develop
by NVIDIA
vendor

>- Review, design, and refactor TensorRT-LLM PyTorch MoE code for architecture fit, clean code, maintainability, and testability. Always use for any modification, review, refactor, or design planning that touches MoE modules, including tensorrt_llm/_torch/modules/fused_moe, ConfigurableMoE, MoE backends, MoEScheduler/moe_scheduler.py, forward execution/chunking, communication strategies, EPLB, quantization/weight handling, routing, factories, MoE docs, or MoE tests. Also use when the user asks whether a MoE design follows the current architecture or whether a MoE refactor is reasonable.

14k tokens
Adversarial Review
by redis
vendor

>- Adversarially review a diff, patch, or plan for memtier_benchmark using the real review standards of the project's senior maintainers (Yossi Gottlieb / yossigo, Oran Agra / oranagra, Paulo Sousa / paulorsousa). Use when asked to "adversarially review", "review like the maintainers", "find what a reviewer would block on", or before opening/merging a PR. Emits skeptical, evidence- backed findings; assumes a problem is real until it can be refuted.

2k tokens
Fix Pr
by pytorch
vendor

Address CI failures and unresolved review comments on a Helion pull request. Auto-activate when the user mentions a URL like https://github.com/pytorch/helion/pull/<number>.

745 tokens
Huggingface Zerogpu
by lingxling

AI demos and GPU compute with Gradio Spaces and Hugging Face Spaces ZeroGPU. Use when writing or reviewing code that uses `@spaces.GPU`, configuring `python_version` or `requirements.txt` for a ZeroGPU Space, or handling ZeroGPU-specific code constraints — pickle-based process...

9k tokens
Woz
by WithWoz

WOZCODE utilities. Subcommands — login, logout, status, settings, update, share, review (deep multi-persona code review), benchmark (WOZCODE vs vanilla comparison). Invoke as `/woz <subcommand>`, e.g. `/woz login` or `/woz review`.

6k tokens
Alpha Evolve
by gaasher

> Use when the user wants to evolve an ML model/program through population-based search rather than a single sequential refine loop — a generational evolution where parallel proposers each apply one small SEARCH/REPLACE diff to a parent, scored by a cascade-evaluated training run, and children are kept in a MAP-Elites archive across islands (with migration + checkpointing) so diverse high performers survive. A finite, bounded-parallelism re-creation of AlphaEvolve/OpenEvolve, bent for ML autoresearch. Runs to a fixed compute budget or until interrupted. Not for the sequential single-thread autoresearch loops (one change → measure → keep/revert), and not for verifying a known bug or external claim — this is parallel, diversity-preserving search over a program.

5k tokens
Huggingface Webhooks
by hookdeck

> Receive and verify Hugging Face webhooks. Use when setting up Hugging Face webhook handlers, debugging X-Webhook-Secret verification, or handling events on models, datasets, and Spaces — repo updates, new commits and tags (repo.content), config changes (repo.config), discussions, Pull Requests, and discussion comments.

20k tokens scripts
Pin LLM Wiki
by ndjordjevic

Automates the Karpathy LLM Wiki workflow: turns web, GitHub, and YouTube URLs into well-structured, citable, wikilinked pages with automatic linting and sourcing — invoke with /pin-llm-wiki

29k tokens

How to use it

Copy the folder

Take rohitg00/llm-gate from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.