tillmeier/claude-code-guardrails

45 stars · Last commit 2026-09-16

Incident-derived guardrail hooks and a plan→implement→verify→crosscheck delivery loop for Claude Code. Hook cost measured; 35 bats tests.

README preview

# claude-code-guardrails

[![CI](https://github.com/tillmeier/claude-code-guardrails/actions/workflows/ci.yml/badge.svg)](https://github.com/tillmeier/claude-code-guardrails/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)

Hooks, commands and an output style I use with [Claude Code](https://code.claude.com), 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, 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.
- **Output style** — `terse.md`: result first, no padding.
- **Fleet sync** — push commands/skills/styles to your servers over SSH, audit drift with `--check`.

View full repository on GitHub →