Claude Code hook
Claude Warden
Security hooks and monitoring for Claude Code — quiet overrides, SSRF protection, MCP compression, OTEL tracing
Install
git clone https://github.com/johnzfitch/claude-warden.gitFrom the README
claude-warden [![version][badge-version]][releases] [![license][badge-license]][license-file] [![platform][badge-platform]][repo] claude-warden(token guardian) is a hook system for [Claude Code][claude-code] that intercepts every tool call before and after execution. It silences verbose commands, compresses large outputs, blocks unsafe network calls, enforces subagent budgets, and surfaces a live statusline — saving tens of thousands of tokens per session with negligible added latency. Quickstart 1. Install prerequisites: jq (required). Optional: rg, fd. 2. Install hooks into ~/.claude/ (symlink mode): 3. Choose a profile when prompted (or pass --profile standard). 4. Start a new Claude Code session. Hooks run automatically. Run ./install.sh --dry-run first to preview every change before anything touches ~/.claude/. What it does claude-warden installs shell hooks that intercept every Claude Code tool call. Each hook enforces token-efficient patterns and blocks unsafe operations. Guard catalog Architecture Token savings pipeline — tool calls enter the hook membrane, get silenced/compressed/blocked, and exit with fewer tokens. Claude Code tool calls pass through the hook membrane (bash enforcement) into the warden-collector Go backbone, which stores spans in WAL-mode SQLite and enforces subagent budgets via sub-millisecond stat() checks. Requirements Install Quick install (latest release) Downloads a release tarball, verifies its SHA-256 checksum, validates contents, then runs install.sh --copy. To pin a version: Install from source (development) Profiles The installer applies a configuration profile that sets token limits, tool permissions, and internal thresholds. Choose one during install or pass --profile: Profiles live in…
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.
Details
- Repository
- johnzfitch/claude-warden
- Type
- Hooks
- Language
- Shell
- License
- MIT
- Last updated
- 8 April 2026
- Topics
- alignmentanthropicclaude-aiclaude-codehooksinterpretabilitymonitoringpermissionssafetysecurityssrf-protectiontoken-optimization
FAQ
What is Claude Warden?
Security hooks and monitoring for Claude Code — quiet overrides, SSRF protection, MCP compression, OTEL tracing It is a hook for Claude Code, from johnzfitch/claude-warden on GitHub.
How do I install Claude Warden?
Clone johnzfitch/claude-warden from GitHub and follow the setup steps in its README.
Is Claude Warden popular?
johnzfitch/claude-warden has 60 GitHub stars and 2 forks. It was last updated on 8 April 2026.
More hooks
claude-warden
32banyudu/claude-warden
Command safety filter hook that parses shell pipelines and judges each sub-command separately.
Evolving Lite
50primeline-ai/evolving-lite
A self-evolving Claude Code plugin. Context routing, memory bootup, smart delegation, self-correction — out of the box.
Claude Sdlc Harness
53BaseInfinity/claude-sdlc-harness
Self-evolving SDLC enforcement for AI coding agents — hooks, skills, and one-command setup for Claude Code. Plan before coding, test before shipping, escalate when uncertain. Measures itself getting better over time.
CC Hooks Ts
39sushichan044/cc-hooks-ts
Define Claude Code hooks with full type safety.
claude-code-guardrails
41tillmeier/claude-code-guardrails
Guardrail hooks derived from real incidents plus a plan-implement-verify delivery loop.
agent-guard
38JeongJaeSoon/agent-guard
Secret-leak guardrails for Claude Code and Codex, also usable as git hooks and in CI.
Browse the most popular Claude Code mods, all hooks, or the skills and MCP server directories.