Harden this project
Install the two deterministic guards that block irreversible damage. These run as hooks, not skills, because they must fire on every action regardless of what is loaded. A prompt is a request; a hook is a control.
Steps
Run the installer to copy the hook scripts into
.claude/hooks/:bash ${CLAUDE_SKILL_DIR}/scripts/install.shMerge the printed snippet into
.claude/settings.jsonunder"hooks". If ahooksblock already exists, merge the arrays — do not overwrite.Tell the user what got wired, and remind them to tune the blocklists:
destructive-command-guard.sh— review the SQL and prod-host patterns for their stack.tenant-scope-guard.sh— setTENANT_COLif their tenant column isn't one oftenant_id|org_id|account_id|workspace_id.
What each guard does
- destructive-command-guard (PreToolUse/Bash): refuses
DROP/TRUNCATE,DELETE/UPDATEwithoutWHERE, commands aimed at a production host, force-push to protected branches,rm -rfon absolute paths,curl | sh, andsudo. - tenant-scope-guard (PostToolUse/Edit): warns when a freshly edited data-access
line has no visible tenant filter — the missed
WHERE tenant_idthat becomes a leak.
Over-blocking is worse than under-blocking: if a guard is too aggressive the agent learns to route around it. Keep the lists short and high-signal.