SYSTEM DOCUMENTATION & REQUIREMENTS
💡 This Skill requires serde, serde_json, schemars, serde_yaml, toml, toml_edit, chrono, fancy-regex, regex, memchr, aho-corasick, smallvec, colored, dirs, glob, clap, clap_complete, once_cell, base64, async-trait, rust-mcp-sdk, tokio, rayon, ast-grep-core, ast-grep-language, tracing, tracing-subscriber, sha2, hmac, fs2, fsqlite, fsqlite-types, fsqlite-error, ctrlc, flate2, self_update, semver, ratatui, indicatif, console, inquire, rand, rich_rust, vergen-gix, assert_cmd, insta, predicates, tempfile, proptest, criterion, libc, regex-automata, which, walkdir, and includes scripts (resource) and references (resource) components.
What problem does it solve?
AI coding agents like Claude, Codex, Gemini, and Copilot can sometimes execute destructive commands, leading to accidental data loss. This Skill blocks such commands before they execute.
Core Features & Use Cases
- Command Interception: Blocks destructive commands like
git reset --hard and rm -rf ./src before they run.
- Security Packs: Provides over 50 security packs for databases, Kubernetes, Docker, AWS/GCP/Azure, Terraform, and more.
- Sub-Millisecond Latency: Delivers near-invisible performance using SIMD-accelerated filtering.
- Context Detection: Differentiates between harmless and dangerous commands like
grep "rm -rf" and rm -rf /.
- Rich Terminal Output: Provides clear explanations and suggestions on stderr.
- Machine-Readable Output: Delivers structured JSON output on stdout for integration with other systems.
- Scan Mode: Enables pre-commit hooks and CI integration for catching dangerous commands during code review.
- Fail-Open Design: Never blocks workflows due to timeouts or parse errors.
- Explain Mode: Uses
dcg explain "command" to show why a command is blocked or allowed.
Quick Start
Use the dcg skill to block the command 'git reset --hard HEAD~5'.