safety-guard
by affaan-msafety-guard helps prevent destructive operations when agents work autonomously or on production systems. It adds careful mode, write freeze mode, and guard mode to block risky commands, confine edits to one directory, and reduce mistakes during deploys, migrations, and sensitive repo work.
This skill scores 71/100, which means it is listable and likely useful for agents that need guardrails against destructive actions, but users should expect a somewhat narrow, implementation-light instruction set rather than a fully instrumented workflow. The repository gives enough evidence to decide on install, especially for autonomous or production-facing use, but it would benefit from more operational detail and supporting files.
- Clear trigger cases for production work, autonomous mode, and sensitive operations
- Concrete protection modes with examples of watched destructive commands and write restrictions
- Readable, direct command-style usage for freezing, guarding, and unlocking
- No support files, scripts, or references, so enforcement and edge-case behavior are hard to verify
- The skill appears focused on safety policy rather than a broader end-to-end workflow, so leverage may be limited outside destructive-operation prevention
Overview of safety-guard skill
What safety-guard does
The safety-guard skill adds a protection layer for destructive or high-risk agent actions. It is most useful when you want to stop dangerous commands, confine writes to a directory, or run an autonomous agent with fewer chances of damaging production, deploy targets, or active data.
Best-fit use cases
Install safety-guard if you manage live systems, run coding agents in full-auto mode, or regularly work on migrations, infra changes, or release tasks. The safety-guard skill is a fit when the real job is not just “be careful,” but “make unsafe actions harder to execute.”
Why it matters
The main value is workflow control: the skill blocks risky commands like forced pushes, hard resets, destructive deletes, and broad system cleanup, while also letting you freeze edits to one path. That makes safety-guard for Access Control especially useful when a model has broad repo access but should only modify a narrow surface area.
How to Use safety-guard skill
Install and locate the source
Use the safety-guard install command shown in the repo:
npx skills add affaan-m/everything-claude-code --skill safety-guard
Start with skills/safety-guard/SKILL.md. If you want the fastest read, review the mode definitions first, then scan any linked implementation notes in the same file.
Turn a rough goal into a usable prompt
The safety-guard usage pattern works best when you specify the task, risk level, and write boundary together. Good inputs name the target area and the guardrail you want:
- “Update the billing API, but only write inside
src/api/and block destructive commands.” - “Run in guarded mode while I review changes before any publish or deploy.”
- “Protect production migration work and ask before any command that can delete or reset state.”
Read the parts that change behavior
For a practical safety-guard guide, focus on the mode descriptions and the unlock flow. The repo’s useful details are the three protection modes, the commands it watches, and the exact freeze syntax. Those are the pieces that affect whether the skill is actually enforceable in your environment.
Workflow that gets better results
Use careful mode when you mainly want confirmation on dangerous commands. Use freeze mode when you need write confinement. Use combined guard mode when both risks apply. If the task is narrow, name the allowed directory explicitly; if it is operational, name the specific commands or actions that must trigger confirmation.
safety-guard skill FAQ
Is safety-guard only for production work?
No. It is strongest in production, but it also helps in staging, shared repos, and local autonomous runs where a mistaken delete, reset, or publish would still be costly.
How is this different from a normal prompt?
A normal prompt depends on the model remembering caution. The safety-guard skill turns caution into a repeatable control pattern: it watches for risky commands, blocks writes outside the allowed tree, and makes the boundary explicit.
Is safety-guard beginner-friendly?
Yes, if the goal is simple: protect a repo while an agent edits it. The main thing beginners need to understand is the difference between confirmation-based protection and directory-based write restriction.
When should I not use it?
Do not use safety-guard as a substitute for code review, backups, or environment permissions. It is a guardrail, not a recovery plan. If your task needs broad unrestricted refactoring, freeze mode may be too limiting.
How to Improve safety-guard skill
Give the skill a sharper boundary
The most useful improvement is a clearer scope statement. Instead of “be safe,” say what must be protected, what may be edited, and what should only be read. Stronger inputs produce fewer false blocks and less back-and-forth.
Name the risky operations you expect
If your workflow includes deploys, publishes, database changes, or cleanup commands, say so up front. The safety-guard skill is easier to tune when it knows whether to prioritize confirmation, write freezing, or both.
Watch for common failure modes
The main failure mode is over-broad freeze scope that blocks legitimate edits. The second is under-specified tasks that leave the agent unsure whether a command is allowed. If the first result is too restrictive, narrow the guarded path; if it is too loose, add explicit command and path constraints.
Iterate after the first run
After your first pass, adjust based on what the agent tried to do, not just on what it changed. If it attempted risky commands, expand the blocked patterns in your usage instructions. If it wandered outside the intended area, tighten the allowed directory.
