A line in CLAUDE.md is a request the model can forget. A PreToolUse hook runs before every command and can refuse it. This is what ThumbGate's hook answers when the agent tries psql "$DATABASE_URL" -c "DROP TABLE users;" (default install, recorded Dec 2, 2026, reasoning lines cut):
{"hookSpecificOutput": {"hookEventName": "PreToolUse", "permissionDecision": "deny", "permissionDecisionReason": "[GATE:db-drop-table-production] DROP TABLE on a non-test table is blocked. Use a migration with a rollback path or confirm this is against a test/staging database."}}
DROP TABLE on a table that is not named like a test, temp or staging table is Denied on a default install, the first time. A production migration your agent ran (for example node scripts/migrate.js --env prod) can be thumbed down once and is Denied the next time, with your reason.
Adds the hook to Claude Code. No account; the checks run on your machine.
SQL that does the same damage in other words (TRUNCATE, a DELETE with no WHERE) is only caught once you thumb it down. ThumbGate checks the command the agent sends, not what your ORM runs inside it.
Free keeps 3 learned rules active. Pro keeps all of them.