When should you use it?
- A coding agent works in your repo
- Your framework has commands that wipe data
- You want checks before code leaves your machine
Not for: Repos with no database or deploy; Teams that already enforce this in CI only
What do you need, and what do you get?
You need
- Your stack and framework list
- Commands you never want run
- Repo access
You get
- Hook config that blocks risky commands
- Pre-push checks
- Review commands for changes
How does it work, step by step?
- Interview the stackList your framework, database tool and deploy setup.
- List the dangerous commandsName the commands that reset or wipe data in your stack.
- Block themAdd hooks that stop those commands and explain why to the agent.
- Check before pushAdd pre-push checks for localhost URLs, migrations and env variables.
- Test the guardsAsk the agent to run a blocked command in a test repo and confirm it is stopped.
The prompt
Our own prompt, inspired by u/AdEast5873 on r/claude and written to work in Claude Code. Values in lime are placeholders.
Fill in the blanks (optional; the copied prompt uses your values)
My stack: {stack}. List the commands in this stack that can wipe, reset or overwrite data or deploy to production.
Write hook rules that block each one with a short message explaining what to do instead. Then write pre-push checks for localhost URLs, migration consistency and env variables, and tell me how to test each guard safely.Inspired by u/AdEast5873 on r/claude: I built Agentic Workflow entirely with Claude Code — an open-source system that generates project-specific dev workflows from a single interview. The prompt above is written by playbooks.bot in our own words; nothing from the original is quoted.
What can go wrong?
- Hooks only help if the agent runs through them; check how your tool loads them.
- Over-blocking slows real work; review rejections weekly.
- Keep backups; a guard is not a restore plan.
Our take
Generic safety rules for coding agents tend to block obvious commands like deleting folders, while the operations that actually ruin a day are framework-specific: a schema push that drops data, an artisan wipe, a database flush. u/AdEast5873's project starts from that observation and asks about your stack before writing any guards. The idea works even without the template. Spend an hour listing the destructive commands for the tools you use, including database resets, cache purges and deploy scripts, and block them in your agent's hooks so they require a person. The pre-push checks address the dull failures that break deploys: a localhost address left in config, a migration out of step with the models, or a new environment variable missing from production. Then test the guards deliberately, by asking the agent to run a blocked command and confirming it stops, because a hook you have never seen fire might not be wired correctly. Revisit the list whenever you add a framework or a new deploy target.
Where the time goes back: One afternoon of guards prevents the one command that would cost a weekend of recovery.
FAQ
Do I need the template?
What else does it include?
Source and credit
Inspired by u/AdEast5873 on r/claude. We describe the idea in our own words, link to the original, and wrote the prompt ourselves; nothing is quoted.
- Inspired by
- I built Agentic Workflow entirely with Claude Code — an open-source system that generates project-specific dev workflows from a single interview
- Creator
- u/AdEast5873 on r/claude
- Published on
- Original date
- Mar 25, 2026
- License
- Not openly licensed (the poster keeps all rights), so we quote nothing and link to the original
- Originally for
- Claude Code
- AI dry run
- Oct 23, 2026: passed. Dry-run tested by our AI test agent on sample input. PASS: Gates held on desk check; no live sends, bookings or purchases.
AI dry run on sample data; not run with live connected accounts. The playbooks.bot test agent filled the prompt with synthetic inputs, produced the output and checked it against the page's stated outputs and guardrails. - Verified
- Oct 23, 2026: source link resolves to the original, the credited creator published it, our excerpt or prompt matches it, and the license allows our use.
Are you the creator? Claim or correct this page.