npx skills add ...
npx skills add affaan-m/ecc --skill safety-guard
Use this skill to prevent destructive operations when working on production systems or running agents autonomously.
npx skills add affaan-m/ecc --skill safety-guard
Three modes of protection:
Intercepts destructive commands before execution and warns:
When detected: shows what the command does, asks for confirmation, suggests safer alternative.
Locks file edits to a specific directory tree:
Any Write/Edit outside src/components/ is blocked with an explanation. Useful when you want an agent to focus on one area without touching unrelated code.
Both protections active. Maximum safety for autonomous agents.
Agents can read anything but only write to src/api/. Destructive commands are blocked everywhere.
Uses PreToolUse hooks to intercept Bash, Write, Edit, and MultiEdit tool calls. Checks the command/path against the active rules before allowing execution.
codex -a never sessions~/.claude/safety-guard.log