Anchorwatch

Configuration

Anchorwatch ships with sensible defaults and needs no configuration. When a rule doesn't fit a project, adjust it in .anchorwatch.json.

Where the file lives

Anchorwatch looks for .anchorwatch.json starting at the working directory and walking up to the filesystem root, then falls back to ~/.anchorwatch.json. The first file found wins (there is no merging), so a project file completely overrides your user file.

Schema

{
  "rules": {
    "git-destructive": "warn",
    "publish": "off"
  },
  "allow": [
    "^rm -rf \\./?(dist|build|\\.next)/?$",
    "^git clean -n"
  ],
  "protectedBranches": ["main", "release/*"]
}

Using the skill

Rather than editing JSON by hand you can tell Claude:

/anchorwatch:allow git-destructive=warn
/anchorwatch:allow allow rm -rf ./dist

Claude edits the file and shows you the diff. Note that Anchorwatch flags edits to .anchorwatch.json itself with a warning (rule self-config), which is intentional: the model shouldn't loosen its own guardrails without you noticing.

Kill switch

Set ANCHORWATCH_DISABLE=1 in the environment where Claude Code runs to bypass every rule for that session. Useful in throwaway containers; don't leave it on.

Recommendations