Handrail

a guardrail / hook pack for AI coding-agent CLIs · works with Claude Code hooks

What it blocks / asks

What it does not do

Install in 2 minutes

As a Claude Code plugin (nothing is written into your repository; disable it from /plugin at any time):

/plugin marketplace add trimkeep/claude-plugins
/plugin install handrail@trimkeep

Or as plain files you can read and edit in-repo:

No curl | bash — Handrail blocks exactly that pattern, so it ships the same way it expects everyone else to install things:

git clone https://github.com/trimkeep/handrail-kit
cd handrail-kit
./install.sh /path/to/your/project

This copies the six hook scripts into <your-project>/.claude/hooks/handrail/ and merges the hooks block into <your-project>/.claude/settings.json, backing up an existing file first. Running it again is a no-op if nothing changed.

To remove it:

./uninstall.sh /path/to/your/project

Fail-closed, only-tightens

Every hook treats what it doesn't understand as dangerous, not safe: missing jq, empty stdin, stdin that isn't valid JSON, or a tool call with no tool_input all make the hook deny rather than pass the call through.

And every hook only ever removes permission — it denies outright, or asks the human to confirm; none of the six scripts ever emits a decision that grants permission on its own. See test/hooks.test.js on GitHub for the assertions this makes, per hook, against the shipped fixtures.

Early access pack

The early-access pack (v0.9) adds the full rule set on top of the six free hooks: a protected-path guard, per-role write scopes, secret detection in edits, and a wider dangerous-command matrix. v1.0 ships to every buyer within 14 days of purchase, at no extra cost, and every purchase includes 12 months of updates.

Handrail v0.9 — early-access price: $19 one-time. Early access is limited to the first 20 buyers; when it closes, this page will say so — no live counter, no countdown. Handrail v0.9 comes with a voluntary 14-day, no-questions refund, processed through Polar in addition to — not in place of — any statutory withdrawal right shown at checkout; refunds deactivate your licence key.

Early access is open — first 20 buyers.

Checkout runs on Polar, the merchant of record; see Polar's terms and privacy policy.

FAQ

Does it phone home?

No, everything is local. Secret detection, command checks and every decision happen on your machine; no scan result, prompt content, command, file path or file content is transmitted to us or anyone else.

Will it slow the agent down?

Each hook is a small bash + jq script that inspects one tool call. It runs and exits before the agent's own request would otherwise complete — in practice, no noticeable delay.

Can I add my own rules?

Yes. Hooks are plain shell scripts under .claude/hooks/handrail/. Add your own alongside them and wire them into .claude/settings.json the same way — settings.example.json shows the shape.

What if a hook errors?

It fails closed: missing jq, empty stdin, invalid JSON, or a tool call with no tool_input all deny the call rather than pass it through.

Refunds?

Handrail v0.9 comes with a voluntary 14-day, no-questions refund, processed through Polar in addition to — not in place of — any statutory withdrawal right shown at checkout; refunds deactivate your licence key.

Is it affiliated with Anthropic?

No. Handrail works with Claude Code and other agent CLIs in plain text only; it is not affiliated with, endorsed by, or a product of Anthropic.

Public roadmap

  1. v0.9Early-access pack — available now, scope above.
  2. v1.0Ships to every buyer within 14 days of their purchase.
  3. MaintenanceOngoing hook and rule-matrix updates for 12 months from purchase.