Anchorwatch

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
MIT licensed121 tests, 3 parsersmacOS · Linux · Windows
claude — ~/app
# Claude, inside your project $ git push --force origin main ✗ Anchorwatch blocked this: force push to protected branch 'main'. Push to a feature branch and open a PR instead. [git-force-push-protected]

$ 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.

Claudeproposes a call Anchorwatch PreToolUse hook · 25 rules · ~20 ms deny · warn · pass Your repofiles, git, db git push --force safe → runs blocked → the reason goes back to Claude, which proposes a safer path

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

Guides

Written against the current docs, verified in real sessions.

All guides

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 →