destructive-command-guard이란?
Rust 기반 Claude Code 후크를 통해 실행 전에 위험한 명령을 차단합니다. 에이전트 안전 가드를 구성하거나, 파괴적인 명령 차단을 설정하거나, CLI 보호 규칙을 감사할 때 사용합니다. git 재설정 보호, rm -rf 차단, 강제 푸시 차단, 팩 기반 명령 필터링 및 PreToolUse 후크 안전에 사용합니다. 출처: oakoss/agent-skills.
Rust 기반 Claude Code 후크를 통해 실행 전에 위험한 명령을 차단합니다. 에이전트 안전 가드를 구성하거나, 파괴적인 명령 차단을 설정하거나, CLI 보호 규칙을 감사할 때 사용합니다. git 재설정 보호, rm -rf 차단, 강제 푸시 차단, 팩 기반 명령 필터링 및 PreToolUse 후크 안전에 사용합니다.
명령줄에서 destructive-command-guard AI 스킬을 개발 환경에 빠르게 설치
출처: oakoss/agent-skills.
A high-performance Claude Code hook that intercepts and blocks destructive commands before they execute. Written in Rust with SIMD-accelerated filtering via the memchr crate and Aho-Corasick multi-pattern matching for sub-millisecond latency. Assumes agents are well-intentioned but fallible.
DCG uses a whitelist-first architecture: safe patterns are checked before destructive patterns, and unrecognized commands are allowed by default (fail-safe). This ensures legitimate workflows are never broken while known dangerous patterns are always blocked. DCG runs as a PreToolUse hook in Claude Code, receiving JSON on stdin for each Bash tool invocation and returning exit code 0 (allow) or 2 (block). It only i...
The processing pipeline has four stages: JSON parsing, command normalization (strips absolute paths like /usr/bin/git), SIMD quick-reject filter (skips regex for commands without git or rm), and pattern matching. The memchr crate provides hardware-accelerated substring search (SSE2/AVX2 on x8664, NEON on ARM), while Aho-Corasick handles multi-pattern matching in O(n) time regardless of pattern count.
AI/검색 인용용 안정적인 필드와 명령어.
npx skills add https://github.com/oakoss/agent-skills --skill destructive-command-guardRust 기반 Claude Code 후크를 통해 실행 전에 위험한 명령을 차단합니다. 에이전트 안전 가드를 구성하거나, 파괴적인 명령 차단을 설정하거나, CLI 보호 규칙을 감사할 때 사용합니다. git 재설정 보호, rm -rf 차단, 강제 푸시 차단, 팩 기반 명령 필터링 및 PreToolUse 후크 안전에 사용합니다. 출처: oakoss/agent-skills.
터미널 또는 명령줄 도구(Terminal, iTerm, Windows Terminal 등)를 엽니다 이 명령어를 복사하여 실행합니다: npx skills add https://github.com/oakoss/agent-skills --skill destructive-command-guard 설치 후 스킬은 자동으로 AI 코딩 환경에 설정되어 Claude Code, Cursor, OpenClaw에서 사용할 수 있습니다
https://github.com/oakoss/agent-skills