Description
Guard is an agent skill that turns on two safety layers with a single command. The first warns about destructive commands such as rm -rf, DROP TABLE and force-pushes. The second restricts file edits to a chosen directory, in the same way the freeze skill does. The page says it is meant for production systems and live debugging, where mistakes are hard to undo. Example uses are limiting edits to one service directory while debugging a live API, blocking an accidental DROP TABLE or rm -rf during a database migration, working in a shared repository where only one subfolder should change, and locking file writes to a feature branch directory before a production deploy. Instead of tracking which files were touched or double-checking each command, the skill enforces both constraints automatically for the session. Install it with npx skills add https://github.com/garrytan/gstack --skill guard. It comes from Garry Tan's gstack project on GitHub and is aimed at developers who let an AI agent run commands near live data.…
Highlights
- Warns on destructive commands like rm -rf and DROP TABLE
- Warns on force-pushes
- Restricts edits to one directory
- Turns both protections on with one command
- Built for production and live debugging
Ratings & Reviews
No ratings yet
Be the first to rate garrytan/guard.
People also visit

git-guardrails-claude-code
设置 Claude Code hooks,在危险 git commands(push、reset --hard、clean、branch -D
garrytan/guard FAQ
What does guard mode do?
It combines destructive command warnings with directory-scoped edit restrictions, so both protections start together.
Which commands does it warn about?
The page names rm -rf, DROP TABLE and force-pushes as examples of destructive commands.
How do I install it?
Run npx skills add https://github.com/garrytan/gstack --skill guard.
Who is it for?
Developers working on production systems or in live debugging sessions where mistakes are hard to reverse.
Is it open source?
It is published in the public gstack repository on GitHub.
What are the best garrytan/guard alternatives?
Popular alternatives to garrytan/guard include safety-guard, safety-hooks and garrytan/careful. See all garrytan/guard alternatives















