Handrail

a guardrail / hook pack for Claude Code

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.

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.

Is it affiliated with Anthropic?

No. Handrail is not affiliated with, endorsed by, or a product of Anthropic.

Public roadmap

  1. v0.9Paid pack — available now, scope above.