·destructive-command-guard
</>

destructive-command-guard

Rust 기반 Claude Code 후크를 통해 실행 전에 위험한 명령을 차단합니다. 에이전트 안전 가드를 구성하거나, 파괴적인 명령 차단을 설정하거나, CLI 보호 규칙을 감사할 때 사용합니다. git 재설정 보호, rm -rf 차단, 강제 푸시 차단, 팩 기반 명령 필터링 및 PreToolUse 후크 안전에 사용합니다.

11설치·2트렌드·@oakoss

설치

$npx skills add https://github.com/oakoss/agent-skills --skill destructive-command-guard

destructive-command-guard 설치 방법

명령줄에서 destructive-command-guard AI 스킬을 개발 환경에 빠르게 설치

  1. 터미널 열기: 터미널 또는 명령줄 도구(Terminal, iTerm, Windows Terminal 등)를 엽니다
  2. 설치 명령어 실행: 이 명령어를 복사하여 실행합니다: npx skills add https://github.com/oakoss/agent-skills --skill destructive-command-guard
  3. 설치 확인: 설치 후 스킬은 자동으로 AI 코딩 환경에 설정되어 Claude Code, Cursor, OpenClaw에서 사용할 수 있습니다

출처: 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-guard
카테고리
</>개발 도구
인증됨
최초 등록
2026-02-25
업데이트
2026-03-10

Browse more skills from oakoss/agent-skills

빠른 답변

destructive-command-guard이란?

Rust 기반 Claude Code 후크를 통해 실행 전에 위험한 명령을 차단합니다. 에이전트 안전 가드를 구성하거나, 파괴적인 명령 차단을 설정하거나, CLI 보호 규칙을 감사할 때 사용합니다. git 재설정 보호, rm -rf 차단, 강제 푸시 차단, 팩 기반 명령 필터링 및 PreToolUse 후크 안전에 사용합니다. 출처: oakoss/agent-skills.

destructive-command-guard 설치 방법은?

터미널 또는 명령줄 도구(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

상세

카테고리
</>개발 도구
출처
skills.sh
최초 등록
2026-02-25