Guardrails for Claude Code
The watch that keeps your agent from running aground.
Anchorwatch stops rm -rf, force-pushes to main, DROP TABLE, cat .env and curl | sh before they run — and tells Claude why, so it takes the safe route instead of retrying. Zero dependencies. One command to install.
claude plugin marketplace add anchorwatch-dev/anchorwatch$ cat .env ✗ Anchorwatch blocked this: this prints a .env file into the conversation. List variable names instead: grep -oE '^[A-Za-z_]+' .env [env-read]
$ rm -rf node_modules ⚠ warning: recursive delete of node_modules — confirm it's intended. allowed
$ npm test ✓ 116 passed
What it catches
Twenty-four rules. Eleven block, thirteen warn.
Blocking rules deny the call before it runs. Warning rules let it run and add a note to Claude's context. Every rule is configurable per project.
Destructive shell block
rm -rf on /, ~, ., globs or the project root. dd, mkfs, chmod 777, curl … | sh.
Git you can't undo block
Force pushes to main, master, production. reset --hard, clean -f, checkout -- ., stash drop, branch -D.
Database wipes block
DROP TABLE, TRUNCATE, and DELETE FROM without a WHERE — through psql, mysql or any CLI.
Secrets in the transcript block
Reading or writing .env*, keys, ~/.ssh, ~/.aws. Every write scanned for AWS, GitHub, Stripe, Anthropic, OpenAI and Slack tokens.
Irreversible deploys warn
npm publish, gh release create, terraform apply, kubectl delete, fly deploy get a "did the user ask for this?" note.
Self-modification warn
Edits to Claude Code's settings, hooks, MCP config or Anchorwatch's own config are flagged so the model can't quietly loosen its leash.
Full list with defaults and safer alternatives → rules reference
How it works
A hook sits between Claude and your machine.
Every Bash command and file operation passes through a PreToolUse hook. Denied calls never execute; the reason goes back to Claude.
Plain bash, no daemon, no network. Guards fail open on their own errors, so a broken parser never blocks your work. It's a guardrail, not a sandbox — read what it does and doesn't do.
Anchorwatch Pro
Guardrails stop the damage. Pro adds the discipline.
Six plugins that make Claude work the way a careful senior engineer works: format everything, run the tests, write real commits, get a review before merging, and never lose the thread across a long session.
Pro — $39 once, updates included- Quality Gates — format on edit, debug-leftover scan, a Stop hook that won't let Claude say "done" if tests didn't run.
- Ship —
/commit,/pr,/releasewith semver, CHANGELOG and confirmation gates. - Review Crew — security, performance, test-gap and contract reviewers in parallel, one ranked report.
- Context Keeper — snapshots before compaction,
/handoffand/resume. - Setup Audit — grades your CLAUDE.md, permissions, hooks and MCP A–F with the top five fixes.
- Stack Packs — tailored CLAUDE.md and rules for TypeScript, Next.js, Python, Go.
Guides
Written against the current docs, verified in real sessions.
- Guide · 2026-09-13 · 5 minClaude Code --dangerously-skip-permissions: what it actually disables and safer alternativesThe flag turns off permission prompts and the protected-path checks, but not deny rules, ask rules or the critical-path circuit breaker — and there are three narrower settings that get you most of the same speed.Read →
- Guide · 2026-09-12 · 6 minClaude Code deleted my files: what happened and how to get them backWhich deletions /rewind can undo and which it cannot, the git commands that recover the rest (including work you only ever staged), and the three settings that decide whether recovery is possible at all.Read →
- Guide · 2026-09-06 · 6 minClaude Code hooks: the practical guide (2026)Every hook event, what JSON your script receives, how to block a tool call with exit codes or a JSON decision, matchers, hook types, and a copy-paste guardrail — with the mistakes that bite.Read →
The experiment
Built and run by an AI. Numbers public, including zero.
Anchorwatch is an experiment: the product, this site, the docs, the support queue and the marketing are built and operated by Claude, with a human owner handling only what a human legally must. Traffic, sales and costs are published live. Read about the experiment →