Communitygithub.com

safety-guard

이 스킬은 운영 시스템에서 작업하거나 에이전트를 자율적으로 실행할 때 파괴적인 작업을 방지하는 데 사용됩니다.

safety-guard란 무엇인가요?

Safety Guard는 AI 에이전트(Claude Code, Codex 등)가 운영 시스템에서 작업하거나 자율 모드로 실행될 때 발생할 수 있는 파괴적인 작업을 방지하기 위한 보호 계층입니다. Careful, Freeze, Guard의 세 가지 모드를 제공하며, Careful 모드는 'rm -rf', 'git push --force', 'DROP TABLE'과 같은 위험한 명령어를 가로채 경고하고 안전한 대안을 제안합니다. Freeze 모드는 특정 디렉토리 외부의 파일 편집을 차단하여 에이전트가 지정된 범위에만 집중하도록 합니다. Guard 모드는 두 기능을 결합하여 자율 에이전트에 최대 안전성을 제공합니다. PreToolUse 훅을 통해 Bash, Write, Edit, MultiEdit 도구 호출을 가로채며, 모든 차단 작업은 로그 파일에 기록됩니다.

지원 대상✓Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/affaan-m/ECC/tree/main/skills/safety-guard

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

Safety Guard — 파괴적 작업 방지

사용 시기

  • 운영 시스템에서 작업할 때
  • 에이전트가 자율적으로 실행될 때 (완전 자동 모드)
  • 특정 디렉토리로 편집을 제한하려는 경우
  • 민감한 작업(마이그레이션, 배포, 데이터 변경) 중

작동 방식

세 가지 보호 모드:

모드 1: 주의 모드 (Careful Mode)

실행 전에 파괴적인 명령을 가로채서 경고합니다:

감시 패턴:
- rm -rf (특히 /, ~, 또는 프로젝트 루트)
- git push --force
- git reset --hard
- git checkout . (모든 변경 사항 폐기)
- DROP TABLE / DROP DATABASE
- docker system prune
- kubectl delete
- chmod 777
- sudo rm
- npm publish (실수로 인한 게시)
- --no-verify 가 있는 모든 명령어

감지 시: 명령어가 수행하는 작업을 보여주고, 확인을 요청하며, 더 안전한 대안을 제안합니다.

모드 2: 동결 모드 (Freeze Mode)

특정 디렉토리 트리로 파일 편집을 잠급니다:

/safety-guard freeze src/components/

src/components/ 외부에서의 모든 쓰기/편집은 설명과 함께 차단됩니다. 에이전트가 관련 없는 코드를 건드리지 않고 한 영역에 집중해야 할 때 유용합니다.

모드 3: 보호 모드 (Guard Mode) (주의 + 동결 결합)

두 보호 기능이 모두 활성화됩니다. 자율 에이전트를 위한 최대 안전성.

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

에이전트는 모든 것을 읽을 수 있지만 src/api/에만 쓸 수 있습니다. 파괴적인 명령어는 모든 곳에서 차단됩니다.

잠금 해제

/safety-guard off

구현

PreToolUse 훅을 사용하여 Bash, Write, Edit 및 MultiEdit 도구 호출을 가로챕니다. 실행을 허용하기 전에 명령어/경로를 활성 규칙과 확인합니다.

통합

  • codex -a never 세션에 대해 기본적으로 활성화
  • ECC 2.0에서 관찰 가능성 위험 점수와 결합
  • 모든 차단 작업을 ~/.claude/safety-guard.log에 기록

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

accessibility

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA. Use when building or auditing UI that must meet WCAG 2.2 Level AA, or when reviewing a change for keyboard, contrast, or screen-reader support.

affaan-m/content-engine

Create platform-native content systems for X, LinkedIn, TikTok, YouTube, newsletters, and repurposed multi-platform campaigns. Use when the user wants social posts, threads, scripts, content calendars, or one source asset adapted cleanly across platforms.

affaan-m/ECC

Multi-platform content distribution across X, LinkedIn, Threads, and Bluesky. Adapts content per platform using content-engine patterns. Never posts identical content cross-platform. Use when the user wants to distribute content across social platforms.

affaan-m/fal-ai-media

Unified media generation via fal.ai MCP — image, video, and audio. Covers text-to-image (Nano Banana), text/image-to-video (Seedance, Kling, Veo 3), text-to-speech (CSM-1B), and video-to-audio (ThinkSound). Use when the user wants to generate images, videos, or audio with AI.

affaan-m/manim-video

日本語翻訳:このファイルは manim-video 用の日本語翻訳が必要です

affaan-m/remotion-video-creation

Remotion のベストプラクティス - React で動画を作成する。3D、アニメーション、音声、字幕、チャート、トランジションなどをカバーするドメイン固有の29のルール。

affaan-m/video-editing

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

agent-architecture-audit

Full-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack.

agent-eval

Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics. Use when choosing between coding agents, or when a change to an agent setup needs measured pass rate, cost, and time rather than an impression.

agent-harness-construction

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates. Use when defining or revising an agent

agentic-engineering

Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing. Use when planning or executing engineering work that agents will carry out end to end.

agentic-os

Build persistent multi-agent operating systems on Claude Code. Covers kernel architecture, specialist agents, slash commands, file-based memory, scheduled automation, and state management without external databases. Use when building a persistent multi-agent system on Claude Code with its own memory, commands, and scheduling.

agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

agent-payment-x402

Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Supports Base through agentwallet-sdk and X Layer through OKX Payments / OKX Agent Payments Protocol. Use when an agent must pay for something itself and needs per-task budgets, spending controls, and a non-custodial wallet.

agent-self-evaluation

Use after completing any non-trivial task. The agent self-rates its output on 5 axes — accuracy, completeness, clarity, actionability, conciseness — with concrete evidence per criterion. Produces a structured 1-5 scorecard with specific improvement suggestions.

agent-sort

Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.

ai-first-engineering

Engineering operating model for teams where AI agents generate a large share of implementation output. Use when setting team process, review gates, or ownership rules for a codebase largely written by agents.

ai-regression-testing

Regression testing strategies for AI-assisted development. Sandbox-mode API testing without database dependencies, automated bug-check workflows, and patterns to catch AI blind spots where the same model writes and reviews code. Use when adding regression coverage to AI-assisted code, or when the same model both wrote and reviewed a change.

android-clean-architecture

Clean Architecture patterns for Android and Kotlin Multiplatform projects — module structure, dependency rules, UseCases, Repositories, and data layer patterns. Use when structuring modules, layers, or data flow in an Android or KMP project.

angular-developer

Generates Angular code and provides architectural guidance. Trigger when creating projects, components, or services, or for best practices on reactivity (signals, linkedSignal, resource), forms, dependency injection, routing, SSR, accessibility (ARIA), animations, styling (component styles, Tailwind CSS), testing, or CLI tooling.

관련 스킬