Agent skill · security · aiskillstore

dcg

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.

Why this skill is useful

Adds a high-performance Rust hook that provides a safety layer by blocking dangerous commands before execution, fundamentally enhancing agent safety.

What it needs

Requires rust installed locally. About 8k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.

What this skill does

DCG — Destructive Command Guard A high-performance Claude Code hook that intercepts and blocks destructive commands before they execute. Written in Rust with SIMD-accelerated filtering for sub-millisecond latency. Why This Exists AI coding agents are powerful but fallible. They can accidentally run destructive commands: "Let me clean up the build artifacts" → rm -rf ./src (typo) "I'll reset to the last commit" → git reset --hard (destroys uncommitted changes) "Let me fix the merge conflict" → git checkout -- . (discards all modifications) "I'll clean up untracked files" → git clean -fd (permanently deletes untracked files) DCG intercepts dangerous commands before execution and blocks them with a clear explanation, giving you a chance to stash your changes first. Critical Design Principles 1. Whitelist-First Architecture Safe patterns are checked before destructive patterns. This ensures explicitly safe commands are never accidentally blocked: 2. Fail-Safe Defaults (Default-Allow) Unrecognized commands are allowed by default. This ensures: The hook never breaks legitimate workflows Only known dangerous patterns are blocked New git commands work until explicitly categorized 3. Zero False Negatives Philosophy The pattern set prioritizes never allowing dangerous commands over avoiding false positives. A few extra prompts for manual confirmation are acceptable; lost work is not. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills aiskillstore/dcg

View the source on GitHub

Browse the @skills marketplace