dcg

Block dangerous Git and filesystem commands in Claude Code workflows.

1|Updated Feb 3, 2026
One-click install
npx skills add https://github.com/trungtnm/claude-code-utils --skill dcg-trungtnm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dcg
Source: https://github.com/trungtnm/claude-code-utils/tree/main/plugins/skills/dcg
Command: npx skills add https://github.com/trungtnm/claude-code-utils --skill dcg-trungtnm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Block dangerous commands in Claude Code workflows to prevent destructive operations, safeguarding projects from accidental data loss and misconfigurations.

Core Features & Use Cases

  • Whitelist-first architecture ensures safe commands are allowed while dangerous patterns are blocked.
  • SIMD-accelerated filtering provides near-instant latency for real-time guardrails.
  • Modular packs cover core git and filesystem safety with configurable scope for agents and workflows.
  • Real-world scenario: prevent 'git reset --hard' or 'rm -rf /path' from executing in automated runs.

Quick Start

Install and enable the DCG hook in Claude Code, then test a known dangerous command to verify it is blocked.

Frequently Asked Questions about dcg

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I block dangerous git commands like git reset --hard in automated AI workflows?

To block dangerous git commands in automated AI workflows, you need a safety hook that intercepts execution. This skill implements a whitelist-first pattern to prevent destructive operations like git reset --hard from running.

Can I use a whitelist to prevent destructive filesystem commands in Claude Code?

Yes, you can prevent destructive filesystem commands in Claude Code using a whitelist-first architecture. This approach ensures safe commands are allowed by default while actively blocking dangerous patterns like rm -rf.

How does a safety guardrail intercept destructive commands before execution?

A safety guardrail intercepts destructive commands by applying a modular pack system configurable via environment variables and JSON-like configuration. It uses SIMD-accelerated filtering to provide near-instant latency for real-time command blocking.

Does Claude Code support custom hooks for blocking destructive operations?

Yes, Claude Code supports custom hooks for blocking destructive operations. You can install and enable a safety hook, then test a known dangerous command to verify the guardrails block it before execution.

What is the best way to configure safety guardrails for AI agent orchestration?

The best way to configure safety guardrails for AI agent orchestration is using a modular pack system with JSON-like configuration and environment variables. This allows you to define a whitelist-first scope for agents and workflows.

Are there limitations to default-allow behavior when blocking destructive commands?

Default-allow behavior relies on a whitelist-first pattern to block known destructive commands, meaning unlisted dangerous patterns might slip through if the modular packs are not comprehensively configured for all edge cases.