dcg
Installation
SKILL.md
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.