Install the hook pack
September 20, 2026 · View on GitHub
examples/ is the source of truth for every host adapter. This document
packages those files plus hooks/run.ts (and the fail-closed HTTP wrappers)
as the install unit. Per-host deny JSON and honest limits:
docs/hosts.md. The Next workbench is optional once hooks can
reach the scorer.
RH Guard is not Augustus. Augustus places typed System One judgments. This pack is the live hazard gate on agent tools. It is also not jevgate: an allowlist proves what may run, Jev judges only the rest, and the tool cannot block. Same layering as structural deny + sidecar, different job.
1. Sidecar (required for live scoring)
From a clone of 24601/rh-guard:
git clone https://github.com/24601/rh-guard.git
cd rh-guard
npm install
cp .env.example .env.local # set TYPESAFE_API_KEY for Jev
npm run dev # 127.0.0.1:43147
Without a key the process still listens. Structural denies still fire. Lexical / GLiClass-shaped scoring is degraded, not risk zero.
2. Claude Code
Project settings (copy from examples/)
- HTTP-only (prompt + Stop + PreToolUse): merge
examples/claude-settings.jsoninto.claude/settings.json. - Fail-closed PreToolUse: merge
examples/claude-command-settings.jsoninstead. The commandnpx tsx hooks/run.ts claudemust run with this repo as the working tree (or otherwise resolvehooks/run.tsandsrc/).
Claude HTTP hooks only honor a 2xx JSON body. Timeouts and non-2xx do not block.
Plugin marketplace (skill + hook pack)
claude plugin marketplace add 24601/rh-guard
claude plugin install rh-guard@rh-guard
Layout:
| Path | Role |
|---|---|
.claude-plugin/marketplace.json | Marketplace catalog |
.claude-plugin/plugin.json | Plugin manifest (points at the skill + hooks/hooks.json) |
hooks/hooks.json | Claude plugin hook config (same events/matcher/URL as examples/) |
hooks/claude-hook.sh | Fail-closed PreToolUse: POST stdin to the sidecar, deny + exit 2 on failure |
hooks/run.ts | In-repo command scorer (claude / cursor / grok / generic; aliases codex, dsh, exo) |
hooks/grok-hook.sh | Fail-closed Grok PreToolUse (host is fail-open on crash/timeout) |
.agents/skills/rh-guard/SKILL.md | Protocol skill (not the server) |
hooks/hooks.json uses HTTP for UserPromptSubmit and Stop (fail-open if
the sidecar is down) and hooks/claude-hook.sh for PreToolUse (fail-closed).
Override the sidecar URL with RH_GUARD_URL if you do not bind
127.0.0.1:43147 (HACK_RADAR_URL is still accepted).
Keep the sidecar running. The plugin does not start Next.js.
3. Cursor (hooks.json is the plugin)
There is no Cursor marketplace equivalent. Copy
examples/cursor-hooks.json to
.cursor/hooks.json.
cp examples/cursor-hooks.json /path/to/your-project/.cursor/hooks.json
Command hooks read JSON on stdin via npx tsx hooks/run.ts cursor. That
command must resolve this repo (cloud agents run project hooks from the repo
root; use a checkout or submodule of rh-guard, or change the command to an
absolute path).
Set failClosed: true on shell and tool gates, as in the example.
beforeSubmitPrompt cannot inject context: a gameable prompt is allowed with
a user notice. Tool-denial steering uses a generic agent_message that does
not leak scores.
4. Other hosts (same scorer)
Copy the file in examples/ for that host. Details: docs/hosts.md.
| Host | Copy |
|---|---|
| Codex | examples/codex-hooks.json → ~/.codex/hooks.json or .codex/hooks.json. Command PreToolUse only. |
| Grok Build | examples/grok-hooks.json → ~/.grok/hooks/ or .grok/hooks/. Prefer hooks/grok-hook.sh for fail-closed. |
| Pi | examples/pi-extension.ts → ~/.pi/agent/extensions/ or .pi/extensions/. Optional command settings: examples/pi-hooks-settings.json with @hsingjui/pi-hooks (no HTTP). |
| Amp | examples/amp-plugin.ts → .amp/plugins/ or ~/.config/amp/plugins/. |
| Prime Agent | examples/prime-extension.ts → ~/.prime/agent/extensions/ or .prime/agent/extensions/. |
| dsh | DeepSeek Harness generic stdin: hooks/run.ts dsh or generic with examples/generic-event.json. HTTP skipped (404). Claude/Codex command-hook bridges at tools/pre-execute also work. |
| Exo | support via ToolRuntime wrap, not drop-in hooks; no native hooks.json. examples/exo-tool-runtime.ts / .rs. Optional .exo/agent-tools/ gate: examples/exo-agent-tools-gate.ts. |
Pi / Amp / Prime copies are self-contained (duplicated AGENT_DENY + fetch) so they run outside this repo. They POST to /api/hooks/<flavor>; keep the sidecar running.
5. Companion skill (any skills-compatible agent)
npx skills add 24601/rh-guard --skill rh-guard
Use the skill to design evals, interpret denials, and choose gates. Do not
use it as a runbook for next dev.
6. What not to do
- Do not train RL against this monitor or against chain-of-thought.
- Do not put hidden tests in a workspace file the agent can edit.
- Do not treat lexical scores as a Jev ROC.
- Do not treat Harbor, jevals, or openevals as required to install the hooks (practices, not install dependencies). See eval-integrity.md.
- Do not treat pi-jev-approver, agent-workflow-typesafe-ai, jevscan, jev-testbench, semantic-firewall, claude-code-jev, jev-agent-safety-arena, jev-model-router, gliner25-compaction, jev-compactor, latch, clear-head, jev-marshal, wakegate, if-ai, omp-auto-mode, omp-jev-extensions, omp-greenlight, pi-heed, toolgate, jev-reviewer, safe-sh, interlock, port-cleanup, jev-dspy-control-plane, jev-arena, cmdc-auto-mode, firehose-judge, jav-email-cascade, waymode, skill-broker, jev-gate-student-b, jev-triage, jev-curate, system-one-benchmark, dinostomp, construct-auto-classifier, actiongate-jev, AgentGhost, slo-router, jev-lens, jev-packs, ci-gatekeeper-bot-jev, jev-pr-review, turnstile, jev-capability-atlas, jev-ood-calibration, prune-review, jev-intent-review, jev-baselines-eval, jev-carryforward, jev-labs, seal, how-sure-is-jev, jev-preflight, jev-security-scan, jev-decisions, jev-vs-llm-guardrails-intent-router, pi-jev-guard, pi-jev-control, jev-use, jevex, jev-sift, commitjev, jev-runway, pi-jev-compact, hermes-plugin-jev, hermes-jev-router, jev-routing, jev-routing-mcp, classifier-dev, jev-gate, claude-jev-warden, jev-kit, agent-chaperone, opencode-intent-gate, opencode-context-pruner, fast-jev-compaction, localjev, laya, yolo-shell, jev-home-assistant-sentinel, herdr-jev, apa-agent-harness, alsoleg89/jev-guard, pablozr/JevGuard, ybadragon/jev-proving-ground, jevbrain, jev-crawlers, typed-gate, pi-jev-gate, jev-oas-sentinel, nanoprune, hermes-switchyard, typesafe_agent_gates, jev-pastepilot, jevcache, sutro-sh/jev-align, enzyme, jevguard, jev-ci-selector, tonedown, jevmod, one-dollar-tahoe, pi-jev-sentinel, hermes-jev-skills, hermes-skill-router, xXLODXx/hermes-skill-router, LLM-Architects/hermes-skill-router, bkutasi/hermes-skill-router, MKI13/hermes-skill-router, dgp, typesafe-jev-gate, omo-jevlike-router, llm-vs-jev, jeff, invalidate, hermes-jev-plugin, jev-lint, jev-recall, oxlint-plugin-jev, rspamd-jev, jev-guardrails, moongate, jev-logtriage, bias-bench, jevusher, jev-evaluation, jev-bias-bench, aurum-gate, quicksilver-judge, karat-filter, gold-assay, WaynezProg/jev-kit, Jev-Examiner, pi-jev-tool-guard, alsoleg89/jev-bouncer, gg-friggin-ez, jeveryword, jevfanity-api, iso-jevdit, jev-linkedin, Astro-Han/jev-harness, Atikpui007/jev-sift, jev-cite-check, pi-jev-command-guard, jev-transaction-guard, dsh-jev-guardrails, jev-auto-approve, hush, jev-call-screener, unslopify, no-hallucination, context-evaluator, jev-assist, rag-jev, mailverdict, mailverdict/mailverdict, jaiswalism/mailverdict, open-jev-approvals, beat-the-reviewer, dsh-jev-guard, jev-sentinel, diff-risk-sentinel, agent-firewall, 0xrem/agent-firewall, 2026hoohacks/agent-firewall, /edit, slop-filter, sift, Winnow, x-spam-filter-typesafe, vynnlee/jev-mail, muhammedilyasy/jev-mail, system1-fraud-interceptor-demo, jev-wiki-watch, umby-jev-stack, jev-review, jev-prune-kit, jev-context-fabric, hermes-jev-approvals, yolo-jev-scene-filter, pi-jev-permit, jevgate-action, boldbug1/jev-triage, contact-cleaner, claude-code-jev-guardrails, jev-voice-gate, alp-pr-review, youtube-judol-userscript-jev, Postmark, shipit-gate, jev-brig, JevGuard-NSFA, jevengineeringgate, lgtm, openclaw-tool-prefilter, pi-jev-helm, jev-claude-controller, ask-jev, switchboard, FastRisk-Jev, jev-resume-match, yueli, ismailakdag/typesafe-jev, Mailbox-Boy-With-Jev, jevshield, pi-warden, jev-demo-triage, volumetric-intelligence, Jev-Auto-Router, jev-web-analyzer, ai-provider-triage-comparison, zerosweep, jev-codex-router, pi-jev, pi-jev-prune, jev-guard-mcp, reallygood83/jev-router, pi-jev-router, JEV-Dual-Spectrum-Phishing-Guardian, slop-guard, jev-corrective-rag, jev-issue-radar, MaxIvanyshen/jev-review, jcr, JevPR, model-switch, typesafe-pi, the-jev-enator, jev-vault-gate, dsh-jev-tools, JEV-Prompt-Injection-Guardian, jev-healthcare-support-router, prMonster, dsh-jev, hermes-jev, win4r/pi-jev-router, sys1, jev-regime-gate, model-effort-router, justinhsu1477/jev-router, rizafahmi/pi-jev-task-router, windows2text, JohnsonRan/pi-jev, PavelLizunov/jev-sentinel, omapi-overlay, jev-test-confidence-gate, Twitter-keyword-shield, Laya-GuardRails-Harness, scx-router, pii-masker, PII-Redactor, guardrails-demo, systemone-gatekeeper-war, hermes-slash-router, airlock, jevlike-esp32, typesafeai-dotnet-sdk, RiskAverseTech/toolgate, ailerix, jev-github-quality-gate, win-cu-router, herdr-jev-router, grok-jev-router, braess-router, gowtham980/jev-router, PrivaParse, anonde, decision-kernel, kev-model-router, eugeniughelbur/jev-gate, gentle-browser-jev, MarcoLoDico/pi-jev-router, harshwasan/jev-sentinel, Koushik890/jev-firewall, jackbarunz/jev-tool-router, esinocchi/jev-tool-router, devjtv/jev-router, cyriusweng/omp-jev-gate, CompleteTech-LLC-AI-Research/jev-codex-approval, JxWayne890/jev-control-plane, dr-dimitru/claude-jev-plugin, 4rays/profanity-checker, vzornjak/typesafe-decision, openlayer-ai/jevals, DihRJ/claude-code-jev-compaction, Gtrkrsk/laya, JoacoMarc/jev-harness-router, aniruddh-krovvidi/switchboard, da-vinci-noob/pi-jev-model-router, pi-auto-model-router, outbound-draft-gate, or databricks-jev-pdf-lab as install dependencies (sibling notes; no runtime deps).
- Do not merge this pack into Augustus, JevLint, jevgate, or Abide (or vice versa). Abide is soft project-instruction Jev on diffs, not a reward-hack detector. Do not merge pi-jev-approver, pi-jev-guard, pi-jev-control, jev-use, pi-jev-compact, pi-jev-gate, or pi-jev-sentinel, pi-jev-tool-guard, or pi-jev-command-guard, or pi-jev-permit, or pi-jev-helm, or pi-warden, or pi-jev, or pi-jev-prune, or pi-jev-router into
examples/pi-extension.ts. Do not merge claude-jev-wardenwarden.js, jev-kit, agent-chaperone, opencode-intent-gate, opencode-context-pruner, jev-gate, AgentGhost, yolo-shell zsh/bash/fish hooks, jev-home-assistant-sentinel, herdr-jev, apa-agent-harness, alsoleg89/jev-guard / alsoleg89/jev-bouncerbouncer.py, pablozr/JevGuard, ybadragon/jev-proving-ground, jevbrain, or jev-crawlers, typed-gate, jev-oas-sentinel, nanoprune, hermes-switchyard, typesafe_agent_gates, jev-pastepilot, jevcache, sutro-sh/jev-align, enzyme, jevguard, jev-ci-selector, tonedown, jevmod, one-dollar-tahoe, pi-jev-sentinel, hermes-jev-skills, hermes-skill-router, dgp, typesafe-jev-gate, omo-jevlike-router, llm-vs-jev, jeff, invalidate, hermes-jev-plugin, jev-lint, jev-recall, oxlint-plugin-jev, rspamd-jev, jev-guardrails, moongate, jev-logtriage, bias-bench, jevusher, jev-evaluation, jev-bias-bench, aurum-gate, quicksilver-judge, karat-filter, gold-assay, or WaynezProg/jev-kit, Jev-Examiner, gg-friggin-ez, jeveryword, jevfanity-api, iso-jevdit, jev-linkedin, Astro-Han/jev-harness, Atikpui007/jev-sift, jev-cite-check, pi-jev-command-guard, jev-transaction-guard, dsh-jev-guardrails, jev-auto-approve, hush, jev-call-screener, unslopify, no-hallucination, context-evaluator, jev-assist, rag-jev, mailverdict, mailverdict/mailverdict, jaiswalism/mailverdict, open-jev-approvals, beat-the-reviewer, dsh-jev-guard, jev-sentinel, diff-risk-sentinel, agent-firewall, /edit, slop-filter, sift, Winnow, x-spam-filter-typesafe, vynnlee/jev-mail, system1-fraud-interceptor-demo, jev-wiki-watch, umby-jev-stack, or jev-prune-kit, yolo-jev-scene-filter, jevgate-action, boldbug1/jev-triage, contact-cleaner, claude-code-jev-guardrails, jev-voice-gate, alp-pr-review, youtube-judol-userscript-jev, or Postmark, shipit-gate, jev-brig, JevGuard-NSFA, jevengineeringgate, lgtm, openclaw-tool-prefilter, pi-jev-helm, jev-claude-controller, ask-jev, switchboard, FastRisk-Jev, jev-resume-match, yueli, ismailakdag/typesafe-jev, Mailbox-Boy-With-Jev, jevshield, pi-warden, jev-demo-triage, volumetric-intelligence, Jev-Auto-Router, jev-web-analyzer, ai-provider-triage-comparison, zerosweep, jev-codex-router, pi-jev, pi-jev-prune, jev-guard-mcp, reallygood83/jev-router, pi-jev-router, JEV-Dual-Spectrum-Phishing-Guardian, slop-guard, jev-corrective-rag, jev-issue-radar, MaxIvanyshen/jev-review, jcr, JevPR, model-switch, typesafe-pi, the-jev-enator, jev-vault-gate, dsh-jev-tools, JEV-Prompt-Injection-Guardian, jev-healthcare-support-router, prMonster, dsh-jev, hermes-jev, sys1, jev-regime-gate, model-effort-router intoexamples/. Do not merge win4r/pi-jev-router intoexamples/pi-extension.ts. Do not merge JohnsonRan/pi-jev or omapi-overlay intoexamples/pi-extension.ts. Do not merge windows2text, PavelLizunov/jev-sentinel, jev-test-confidence-gate, Twitter-keyword-shield, or Laya-GuardRails-Harness, scx-router, pii-masker, PII-Redactor, guardrails-demo, systemone-gatekeeper-war, hermes-slash-router, airlock, jevlike-esp32, or typesafeai-dotnet-sdk, RiskAverseTech/toolgate, ailerix, jev-github-quality-gate, win-cu-router, herdr-jev-router, grok-jev-router, braess-router, gowtham980/jev-router, PrivaParse, anonde intoexamples/. Do not merge MarcoLoDico/pi-jev-router intoexamples/pi-extension.ts. Do not merge harshwasan/jev-sentinel, Koushik890/jev-firewall, jackbarunz/jev-tool-router, esinocchi/jev-tool-router, devjtv/jev-router, cyriusweng/omp-jev-gate, CompleteTech-LLC-AI-Research/jev-codex-approval, JxWayne890/jev-control-plane, dr-dimitru/claude-jev-plugin, 4rays/profanity-checker, vzornjak/typesafe-decision, openlayer-ai/jevals, DihRJ/claude-code-jev-compaction, or Gtrkrsk/laya intoexamples/. Do not merge da-vinci-noob/pi-jev-model-router or pi-auto-model-router intoexamples/pi-extension.ts. Do not merge JoacoMarc/jev-harness-router, aniruddh-krovvidi/switchboard, or outbound-draft-gate intoexamples/. Do not merge decision-kernel, kev-model-router, eugeniughelbur/jev-gate, or gentle-browser-jev intoexamples/. - Do not send
continue: falseon Codex PreToolUse (Codex fails the hook and continues the tool). - Do not deny Amp with
action: "error"or by throwing (Amp ignores thrown plugin errors). - Do not reuse Claude stdout for Grok (
{decision:deny,reason}only). - Do not treat Exo as drop-in hooks; wrap
ToolRuntime.execute/executeTool. - Do not invent
exo-hooks.json; Exo has no native hook file.