EC

ecc-safety-guard

Protects systems and files from destructive operations.

Install

mkdir -p .claude/skills/ecc-safety-guard && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/11150" && unzip -o skill.zip -d .claude/skills/ecc-safety-guard && rm skill.zip

Installs to .claude/skills/ecc-safety-guard

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Use this skill to prevent destructive operations when working on production systems or running agents autonomously.
115 chars✓ has a “when” trigger
Intermediate

Key capabilities

  • Intercept destructive CLI commands
  • Restrict file edits to specific directory trees
  • Log blocked actions to local files
  • Provide confirmation prompts for sensitive operations

How it works

The skill uses PreToolUse hooks to intercept Bash, Write, and Edit tool calls. It checks commands against a list of watched patterns or enforces directory-based file locking.

Inputs & outputs

You give it
CLI command or file edit operation
You get back
Execution block or confirmation prompt

When to use ecc-safety-guard

  • Protecting production environments
  • Restricting agent edit access
  • Preventing accidental data deletion

About this skill

Safety Guard — Prevent Destructive Operations

When to Use

  • When working on production systems
  • When agents are running autonomously (full-auto mode)
  • When you want to restrict edits to a specific directory
  • During sensitive operations (migrations, deploys, data changes)

How It Works

Three modes of protection:

Mode 1: Careful Mode

Intercepts destructive commands before execution and warns:

Watched patterns:
- rm -rf (especially /, ~, or project root)
- git push --force
- git reset --hard
- git checkout . (discard all changes)
- DROP TABLE / DROP DATABASE
- docker system prune
- kubectl delete
- chmod 777
- sudo rm
- npm publish (accidental publishes)
- Any command with --no-verify

When detected: shows what the command does, asks for confirmation, suggests safer alternative.

Mode 2: Freeze Mode

Locks file edits to a specific directory tree:

/safety-guard freeze src/components/

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.

Mode 3: Guard Mode (Careful + Freeze combined)

Both protections active. Maximum safety for autonomous agents.

/safety-guard guard --dir src/api/ --allow-read-all

Agents can read anything but only write to src/api/. Destructive commands are blocked everywhere.

Unlock

/safety-guard off

Implementation

Uses PreToolUse hooks to intercept Bash, Write, Edit, and MultiEdit tool calls. Checks the command/path against the active rules before allowing execution.

Integration

  • Enable by default for codex -a never sessions
  • Pair with observability risk scoring in ECC 2.0
  • Logs all blocked actions to ~/.claude/safety-guard.log

When not to use it

  • When full unrestricted access is required for system maintenance

Limitations

  • Requires manual enable to disable protections

How it compares

It provides proactive safety guardrails for autonomous agents by intercepting commands before they are executed, rather than relying on post-execution logging.

Compared to similar skills

ecc-safety-guard side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
ecc-safety-guard (this skill)02moNo flagsIntermediate
dcg127dReviewIntermediate
linux-production-shell-scripts76moReviewIntermediate
1password272moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

dcg

Dicklesworthstone

Destructive Command Guard - High-performance Rust hook for Claude Code that blocks dangerous commands before execution. SIMD-accelerated, modular pack system, whitelist-first architecture. Essential safety layer for agent workflows.

10

linux-production-shell-scripts

davila7

This skill should be used when the user asks to "create bash scripts", "automate Linux tasks", "monitor system resources", "backup files", "manage users", or "write production shell scripts". It provides ready-to-use shell script templates for system administration.

746

1password

openclaw

Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.

2799

senior-security

davila7

Comprehensive security engineering skill for application security, penetration testing, security architecture, and compliance auditing. Includes security assessment tools, threat modeling, crypto implementation, and security automation. Use when designing security architecture, conducting penetration tests, implementing cryptography, or performing security audits.

3191

fix-dependabot-alerts

microsoft

Fix Dependabot security alerts by updating vulnerable npm dependencies. Use when the user mentions "dependabot", "security alerts", "vulnerability", "CVE", or wants to update packages with security issues.

1872

secrets-management

wshobson

Implement secure secrets management for CI/CD pipelines using Vault, AWS Secrets Manager, or native platform solutions. Use when handling sensitive credentials, rotating secrets, or securing CI/CD environments.

585

Search skills

Search the agent skills registry