SLM-powered semantic hook enforcement for Claude Code — classifies assistant output against YAML rules using local Phi-4-mini inference
You are a rule-tuning Designer. Your job is to analyze an underperforming vaudeville rule and produce a prioritized action plan for the Tuner to execute. You run once (no loop). Think carefully — the Tuner is cheap but not smart.
You are a rule-creation Designer. You run ONCE. Produce 3 new vaudeville rule YAMLs at `{{ args.rules_dir }}/<name>.yaml`, each with `tier: shadow` (or `tier: warn` if `--mode live`), based on the instructions below and any analytics patterns found.
You are a rule-tuning Judge. You evaluate the results of a tuning round and decide whether to accept, continue, escalate, or abandon. You run once (no loop). You NEVER edit rule files.
Install prerequisites and download the SLM model for vaudeville
You are a mechanical rule-tuning agent. You consume a plan written by a Designer agent and execute each item — edit the rule YAML, eval, keep or roll back via in-memory snapshot. You do NOT self-direct or hypothesize, and you do NOT touch git. Your job is faithful plan execution.
Writes deterministic JS/Python/Bash hook scripts and registers them in settings.json or hooks.json. Use this agent when the user describes enforcement that can be done with regex, string matching, file inspection, or structural checks. The enforcement target is shaped data (commands, file paths, JSON fields), not natural language. Spawned by the vaudeville:add-hook skill, but also directly invocable. <example> Context: User wants to prevent a dangerous command user: "Block rm -rf /" assistant: "I'll use the vaudeville:hard-hook-writer agent to create a PreToolUse Bash guard." <commentary> Structural pattern match on a command string — deterministic, no SLM needed. </commentary> </example> <example> Context: User wants automatic formatting after writes user: "Auto-format Python files after Claude writes them" assistant: "I'll use the vaudeville:hard-hook-writer agent to create a PostToolUse formatter hook." <commentary> Structural automation triggered by file extension — fast, deterministic. </commentary> </example> <example> Context: User wants to protect sensitive files user: "Warn when editing .env files" assistant: "I'll use the vaudeville:hard-hook-writer agent to create a PreToolUse Edit/Write guard." <commentary> File path pattern match — regex is sufficient, no intent classification needed. </commentary> </example> <example> Context: User wants context injection at session start user: "Inject my team's coding standards when a session starts" assistant: "I'll use the vaudeville:hard-hook-writer agent to create a SessionStart context hook." <commentary> Context injection is structural — read a file, print to stdout. No classification. </commentary> </example>
Writes vaudeville YAML rules that classify text using the local SLM (Phi-4-mini) via the daemon, plus test cases and hooks.json registration. Use this agent when the user describes enforcement that requires understanding intent, tone, or meaning in natural language — where regex would either miss too much or false-positive too much. Spawned by the vaudeville:add-hook skill, but also directly invocable. <example> Context: User wants to catch hedging in Claude's responses user: "Detect when Claude hedges about untested code" assistant: "I'll use the vaudeville:slm-rule-writer agent to create a Stop rule that classifies hedging language." <commentary> Hedging is semantic — "should work" vs "works" requires intent classification, not regex. </commentary> </example> <example> Context: User wants to catch dismissal of test failures user: "Catch when Claude dismisses test failures" assistant: "I'll use the vaudeville:slm-rule-writer agent to create a Stop rule for dismissal detection." <commentary> Dismissal is nuanced — "pre-existing issue" can be legitimate or evasive depending on context. </commentary> </example> <example> Context: User wants to detect deferral language in PR replies user: "Flag when Claude defers to follow-up PRs in review replies" assistant: "I'll use the vaudeville:slm-rule-writer agent to create a PostToolUse rule for deferral detection." <commentary> "Follow-up PR" language has many variants — SLM catches them all without enumerating patterns. </commentary> </example> <example> Context: User wants to detect sycophantic agreement user: "Stop Claude from agreeing with everything I say" assistant: "I'll use the vaudeville:slm-rule-writer agent to create a Stop rule for sycophancy detection." <commentary> Sycophancy is contextual — "Great idea!" is fine sometimes, problematic other times. Needs SLM. </commentary> </example>
Unified hook creation entry point that routes natural language descriptions to the right specialist agent. Use when the user wants to enforce behavior in Claude Code sessions. Trigger when the user says "add a hook", "create a hook", "new hook", "enforce X", "guard against X", "block X", "prevent X", "detect when Claude does X", "catch X", "stop Claude from X", "add enforcement", "quality gate for X", or describes any behavior to enforce. This skill routes to vaudeville:hard-hook-writer (JS/Python/Bash) or vaudeville:slm-rule-writer (SLM/YAML) based on whether the enforcement is structural or semantic. Also trigger when the user says "add a rule", "new rule", "create a detector", "SLM rule for X", or describes behavior requiring semantic classification. Do NOT use for suggesting hooks from usage data (use vaudeville:hook-suggester), querying session analytics (use vaudeville:session-analytics), checking daemon status (use `vaudeville:status` skill), or debugging existing hooks.
Analyze Claude Code session history to suggest hooks tailored to the user's actual usage patterns. Mines vaudeville:session-analytics data for dangerous commands, tool misuse, high error rates, permission friction, missing quality gates, broken hooks, and repeated automatable patterns — then generates concrete hook implementations via vaudeville:add-hook. Use when the user asks "what hooks should I add", "suggest hooks", "analyze my usage for hooks", "what should I enforce", "improve my hooks", "hook suggestions", or wants to discover enforcement opportunities they haven't thought of. Also trigger for "vaudeville suggestions", "hook recommendations", "what am I doing wrong", "what hooks do I need", "hook audit", "analyze my hooks", "optimize my workflow", "what's failing in my sessions", "guard against", or any question about optimizing their Claude Code workflow through hooks. Do NOT use for creating a specific known hook (use vaudeville:add-hook), querying raw session data (use vaudeville:session-analytics), or general workflow questions.
Promote, demote, or edit vaudeville rule tiers. Use when the user says "promote rule", "demote rule", "move rule to warn", "move rule to block", "rule-admin", "change tier", "promote to warn", "promote to block", "demote to shadow", "delete rule", "enable rule", "disable rule", or invokes /rule-admin. Typically used after /tier-advisor produces recommendations. Do NOT use for analysis — use /tier-advisor for that.
Audit existing vaudeville rules for design-level usefulness. Distinct from /tier-advisor (which audits eval data for promotion). This skill asks: does the rule's event × tier combination produce useful behavior change *at any reachable tier*? Surfaces rules that are useless by design — rules whose violations cannot be acted on in a future turn, rules stuck at SLM model ceilings, rules whose max-useful tier is below their current tier, rules duplicated by other rules, and rules that should be hard hooks instead of SLM rules. Use when the user says "audit my rules", "find useless rules", "are my rules useful", "review rule design", "rule audit", "which rules should I delete", "do my rules make sense", "design audit", or invokes /rule-audit. Do NOT use for promotion analysis (use /tier-advisor) or modifying tiers (use /rule-admin).
Query Claude Code's own JSONL session logs via DuckDB for usage analytics, tool patterns, error forensics, hook impact analysis, and routing decisions. Use when the user asks about their Claude usage patterns, tool frequencies, error rates, permission denials, agent routing, skill invocations, MCP server usage, session timelines, hook effectiveness, or any question about "how has Claude been working". Also trigger when the user says "session analytics", "query my logs", "tool usage", "how often do I use", "check my sessions", "analyze my usage", "hook stats", "what hooks fired", or asks about specific tool/agent/skill/hook behavior across sessions. Also trigger for "vaudeville hook analytics", "hook effectiveness", "hook firing rate", "enforcement stats", or any question about how vaudeville hooks are performing. This skill turns raw JSONL into a queryable DuckDB database — use it instead of writing ad-hoc Python scripts to parse logs. Do NOT use for debugging current code issues, reading individual session transcripts, or questions about Claude's capabilities — this skill is for aggregate usage analytics across historical sessions.
Matches all tools
Hooks run on every tool call, not just specific ones
Uses power tools
Uses Bash, Write, or Edit tools
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
SLM-powered semantic hook enforcement for Claude Code. Classifies AI assistant output against YAML rules using local Phi-4-mini inference.

In turn-of-the-century vaudeville theatres, a stagehand waited in the wings with a long shepherd's crook. When an act started flailing — forgetting lines, losing the crowd, running past its slot — the manager would signal and the hook would shoot out from the curtain and yank the performer offstage before the audience soured on the whole bill. "Get the hook!" became shorthand for cutting a bad act short.
That's the job here. A local small language model watches what Claude is about to say or do and, when the performance goes off the rails — hedging about untested code, dismissing a test failure as "pre-existing," deferring a reviewer's concern to a follow-up PR, declaring work complete with known gaps — it reaches out from the wings and pulls the act. Unlike regex hooks, the SLM reads intent, so it catches the act whether Claude says "this should work," "I believe this addresses it," or "we can tighten this up later." Bad patterns get yanked; honest uncertainty gets through.
Vaudeville runs a local inference daemon (Phi-4-mini, 3.8B params, int4) that classifies Claude Code's output in real time. You write rules as YAML files with few-shot prompt templates. The daemon evaluates them on every hook event and returns block/warn/log verdicts.
Apple Silicon is the first-class target. On Macs the daemon uses the MLX backend, running Phi-4-mini on the GPU via unified memory (~200ms per classification). On x86_64 the daemon falls back to the GGUF backend (llama-cpp-python, CPU only) — same Phi-4-mini weights, but expect noticeably higher latency. Other platforms/models aren't supported; both backends hard-code the Phi-4-mini repos.
Fail-open by design — if the daemon is down, the model isn't downloaded, or inference errors out, your session continues normally. Vaudeville never blocks you from working.
/plugin marketplace add paulnsorensen/vaudeville
/plugin install vaudeville@paulnsorensen
Then run the one-time setup to download the model (~2.4 GB):
/vaudeville:setup
This detects your platform (Apple Silicon or x86_64) and downloads the appropriate model variant.
Copy the bundled rules to your global rules directory:
mkdir -p ~/.vaudeville/rules
cp ~/.claude/plugins/**/paulnsorensen/vaudeville/**/examples/rules/*.yaml ~/.vaudeville/rules/
Start a new Claude Code session — the daemon launches automatically on SessionStart.
Try it: ask Claude to make a small change and watch it finish. If it ends with "Should I commit and push?" instead of just doing it, git-gate warns. Reply to a PR comment with "I'll address this in a follow-up PR" and deferral-detector blocks the comment.
/plugin remove vaudeville removes the plugin files but does not clean up the standalone vaudeville CLI shim or the argcomplete helper that /vaudeville:setup installed into uv's tool bin (often ~/.local/bin). To remove them:
uv tool uninstall vaudeville
uv tool uninstall argcomplete
If you added the tab-completion activation line to your shell rc (~/.bashrc, ~/.zshrc, or ~/.config/fish/config.fish), remove it as well — it references register-python-argcomplete, which will no longer exist.
To also clear the downloaded model and rules:
rm -rf ~/.vaudeville
The plugin ships a set of example rules in examples/rules/. They are examples, not active configuration — the rule loader reads from ~/.vaudeville/rules/ (global) and <project>/.vaudeville/rules/, so nothing fires until you copy the ones you want into one of those directories (see Quick Start step 1).
The bundled examples:
| Rule | Event | What it catches |
|---|---|---|
git-gate | Stop | Asking permission to commit/push/open a PR when work is clearly done ("Should I commit?", "Want me to push?") |
deferral-detector | PreToolUse | PR replies that defer reviewer concerns to "follow-up PRs", tickets, or "next iteration" |
Any rule can be gated with draft: true at the top of its YAML — the loader will skip it until that line is removed. Useful while iterating on a new rule without removing it from the directory.
Rules live in ~/.vaudeville/rules/ (global) or .vaudeville/rules/ (per-project, higher priority). Per-project rules take priority over global ones.
See examples/rules/ for the bundled rules as starting points for your own.
No description provided.
Opinionated coding harness plugin scaffold for portable agents and skills.
Install hallouminate and bootstrap your first LLM-authored per-repo wiki.
Mikado execution engine — decomposes goals into dependency graphs, executes as parallel ralph loops
npx claudepluginhub paulnsorensen/vaudeville --plugin vaudevilleLLM-powered guardrails for Claude Code. Turn every AI mistake into a rule AI can't repeat.
Create custom behavioral rules through markdown configuration files - prevent unwanted behaviors with pattern matching
Quadruple verification for Claude Code — automatically blocks placeholder code, security vulnerabilities, and ensures output quality on every operation. Built by CustomGPT.ai for production teams.
YES.md — PUA says NO, YES says YES. 6-layer AI governance: format → trigger → hooks → anti-slack → gates → memory. Makes AI do things RIGHT with encouragement, not pressure. Available in English, 中文, 日本語.
Enforce mandatory pre-action verification checkpoints to prevent pattern-matching from overriding explicit reasoning. Use this skill when about to execute implementation actions (Bash, Write, Edit) to verify hypothesis-action alignment. Blocks execution when hypothesis unverified or action targets different system than hypothesis identified. Critical for preventing cognitive dissonance where correct diagnosis leads to wrong implementation.
Verify CLAUDE.md/AGENTS.md references, compile typed specs, and test the agent harness