A 60-Line PreToolUse Hook That Stops an Agent's rm -rf Before It Runs
How to block rm -rf and git push --force before they execute, using an Antigravity CLI PreToolUse hook. Includes what a one-line grep missed across 16 test commands.
A report of a cache cleanup that wiped a drive: why I now route every delete through a checkpoint
After reading about a cache cleanup request that ended with a developer's drive contents gone, I reopened my own cleanup script. Here is a small Python checkpoint that narrows how far a delete can reach, plus where I draw the line on what to hand to an agent without approval.
Start Your Antigravity Deny List From Your Own Shell History
Before you let an agent drive your terminal, decide the first commands for the Deny list by counting your own shell history. A short script, a three-box sorting table, and a throwaway-repo test to confirm the rules actually bite.
The work-root guard I run before letting an agent near several repositories
When several repositories share one machine, an agent's working root is remarkably easy to mix up. Here is a small guard that compares resolved paths, tested against seven inputs.