Claude Code hook

claude-code-guardrails

Guardrail hooks derived from real incidents plus a plan-implement-verify delivery loop.

41 starsHooks Plugin marketplace Source

Install

Inside Claude Code
/plugin marketplace add tillmeier/claude-code-guardrails
From source
git clone https://github.com/tillmeier/claude-code-guardrails.git

From the README

claude-code-guardrails

Hooks, commands and an output style I use with Claude Code, extracted
from my private config.

- Hooks — run outside the model's judgment: block bulk git add / git commit -a and
  WHERE-less SQL before the Bash call executes, record the session-start commit, snapshot work
  state before context compaction and feed it back in right after, run the project's own formatter
  after edits.
- Commands — a delivery loop (/plan → /implement → /verify → /critical-review →
  /crosscheck) and doc-maintenance commands (/save-learnings-to-docs, /cleanup-docs,
  /refactor-claude-md, /init-local-md).
- Reviewer backend — /critical-review runs an independent, read-only reviewer on the diff
  (Codex CLI, Claude Code CLI, or your own command) through one adapter script, and never shows it
  the task brief.
- Skill — browser-mcp: how to drive chrome-devtools-mcp cheaply and safely (which server for
  what, token-cheap check order, screenshot/emulate pitfalls, secrets, logged-in apps).
- Output style — terse.md: result first, no padding.
- Fleet sync — push commands/skills/styles to your servers over SSH, audit drift with --check.

Quick start (fresh Mac)

You need Claude Code ≥ 2.1, installed and logged in. Homebrew is optional.

1. Command-line tools. Install them if git --version asks for them: xcode-select --install.
   They provide git and python3.
2. The plugin. In Claude Code, run the two commands below, then restart Claude Code:

   - Hooks are active right away.
   - Commands and the skill are namespaced: /guardrails:plan, /guardrails:critical-review,
     guardrails:browser-mcp, ….
3. Check what works here. /guardrails:setup-check prints ✓/✗ per part, with the exact fix for
   each gap. It installs nothing. Each ✓ says what it rests on, e.g. "login not…
Read the full README on GitHub

How hooks work

  • Hooks are shell commands Claude Code runs at fixed points: before or after a tool call, when you submit a prompt, when Claude stops, on notifications and at session start.
  • They are set in the hooks section of ~/.claude/settings.json (or .claude/settings.json for a project), or come bundled in a plugin.
  • A hook can block a tool call, add context, or run a formatter or test. Read the scripts before you install them: they run on your machine with your permissions.
Claude Code docs

Details

Type
Hooks
Language
Shell
License
MIT
Last updated
3 November 2026
Topics
claude-codeclaude-code-plugindeveloper-toolsgit-safetyhooks

FAQ

What is claude-code-guardrails?

Guardrail hooks derived from real incidents plus a plan-implement-verify delivery loop. It is a hook for Claude Code, from tillmeier/claude-code-guardrails on GitHub.

How do I install claude-code-guardrails?

Run /plugin marketplace add tillmeier/claude-code-guardrails inside Claude Code, then follow the setup in the README.

Is claude-code-guardrails popular?

tillmeier/claude-code-guardrails has 41 GitHub stars and 0 forks. It was last updated on 3 November 2026.

More hooks

Browse the most popular Claude Code mods, all hooks, or the skills and MCP server directories.