본문으로 건너뛰기
cccskills
무료GitHub에 공개

dcg

Handle blocked destructive commands. Use when dcg blocks rm -rf, git reset --hard, DROP DATABASE, kubectl delete, or when configuring agent safety guardrails.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구Kubernetes
설치 방법 보기

포함된 파일(9)

  • SKILL.md6.2 KB
  • references/COMMANDS.md8.6 KB
  • references/CONFIG.md5.0 KB
  • references/PACKS.md8.3 KB
  • references/PHILOSOPHY.md2.9 KB
  • references/SCENARIOS.md2.2 KB
  • references/TROUBLESHOOTING.md5.7 KB
  • scripts/validate-dcg.sh2.1 KB
  • SELF-TEST.md2.8 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

<!-- TOC: Core Insight | THE EXACT WORKFLOW | Quick Reference | Safe Alternatives | What Gets Blocked | Anti-Patterns | Configuration | References -->

DCG: When You Get Blocked

Core Insight: Blocks are checkpoints, not errors. A safe alternative almost always exists. Find it before mentioning override.

Quick Navigation

I need to...Go to
Handle a block right nowTHE EXACT WORKFLOW
Find a safe alternativeSafe Alternatives
See all CLI commandsCOMMANDS.md
Enable more rule packsPACKS.md
Configure per-projectCONFIG.md
Debug hook issuesTROUBLESHOOTING.md

THE EXACT WORKFLOW

When blocked, follow this sequence every time:

1. Run `dcg explain "cmd"` → Understand why (see trace)
2. Check Safe Alternatives table → Use if exists (DON'T mention override)
3. No alternative? → Explain risk clearly, let human decide
4. Human approves? → THEY run: dcg allow-once CODE

Never: Ask for override first. Never retry silently. Never circumvent.

Example block output:

BLOCKED: git reset --hard HEAD
Rule: core.git:reset-hard
Reason: Discards uncommitted changes permanently
Allow-once code: ab12
Safer alternative: git stash

Good response:

"I wanted to discard changes but git reset --hard was blocked. Let me use git stash instead—recoverable if needed." [proceeds with stash]

Safe Alternatives

BlockedUse InsteadWhy
git reset --hardgit stashRecoverable
git checkout -- filegit stash push filePreserves changes
git push --forcegit push --force-with-leaseChecks remote unchanged
git clean -fdgit clean -fdn (preview)Shows what would delete
git stash dropgit stash list firstVerify which stash
rm -rf /pathrm -ri /path or verify pathInteractive/confirm
kubectl delete namespacekubectl delete -l app=XSelective deletion
DROP DATABASEBackup firstHuman approves
docker system prune -adocker system df firstSee what's used

Quick Reference

dcg doctor              # Health check — hook registered?
dcg explain "cmd"       # WHY is it blocked? (with trace)
dcg test "cmd"          # Would this be blocked? (dry-run)
dcg allow-once CODE     # Human approves (THEY run this)
dcg packs               # List available rule packs
dcg scan --staged       # Pre-commit: scan for issues

What Gets Blocked

CategoryPatternsSafe Variants
Git destructivereset --hard, checkout --stash, restore --staged
Git historypush --force, branch -D--force-with-lease, -d
Git stashstash drop, stash clearstash list first
Filesystemrm -rf (dangerous paths)/tmp/* allowed
DatabaseDROP, TRUNCATE, DELETE w/o WHEREAdd WHERE clause
K8sdelete namespace, delete --all-l label selector

Context-aware: rm -rf ./build allowed, rm -rf / blocked.

dcg explain example (7-step pipeline):

$ dcg explain "git reset --hard HEAD"
BLOCKED by core.git:reset-hard

Evaluation trace:
  1. Config allow overrides: no match
  2. Config block overrides: no match
  3. Heredoc detection: not applicable
  4. Quick reject: triggered (contains "reset")
  5. Context sanitization: no changes
  6. Normalization: git reset --hard HEAD
  7. Pack evaluation:
     - Safe patterns: no match
     - Destructive: MATCH "reset --hard"

Suggestion: Use `git stash` to preserve changes

Anti-Patterns

❌ "Command blocked. Run dcg allow-once ab12"  → Find alternative first!
❌ *Retrying silently or circumventing*         → Always acknowledge blocks
❌ Treating blocks as errors                    → They're checkpoints
❌ Asking user to allow-once without explaining → They need context

Configuration

# .dcg.toml — enable rule packs per-project
[packs]
enabled = ["database.postgresql", "kubernetes.kubectl", "cloud.aws"]

[overrides]
allow_patterns = ["rm -rf ./node_modules"]  # Project-specific safe

Environment variables:

  • DCG_PACKS="containers.docker,kubernetes" — Enable packs
  • DCG_DISABLE="kubernetes.helm" — Disable specific packs
  • DCG_BYPASS=1 — Escape hatch (human-only)

Key Facts

  • 49+ rule packs available (database, containers, k8s, cloud, etc.)
  • Sub-millisecond latency — won't slow your workflow
  • Fail-open on timeout — if DCG hangs, command runs (with warning)
  • Heredoc scanning — inline scripts (bash -c, python -c) are analyzed
  • Allow-once codes — 4 hex chars, 24h expiry, bound to exact command+directory

The Incident That Started It All

On December 17, 2025, an AI agent ran git checkout -- on files containing hours of uncommitted work. The files were recovered via git fsck --lost-found, but it proved: instructions don't prevent execution—mechanical enforcement does.


Validation

# Quick health check
dcg doctor | head -20

# Test if a command would be blocked
dcg test "git reset --hard HEAD"

# Should show: WOULD BE BLOCKED

Scripts

ScriptUsage
./scripts/validate-dcg.shFull installation validation

References

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

The philosophy and practical benefits of agent fungibility in multi-agent software development. Why homogeneous, interchangeable agents outperform specialized role-based systems at scale.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Dicklesworthstone/agent_flywheel_clawdbot_skills_and_integrations732026년 9월 6일 업데이트

MCP Agent Mail for multi-agent coordination. Use when agents need file locks, messaging, inboxes, or conflict prevention. Handles macro_start_session, file_reservation_paths, send_message, threading, pre-commit guards.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Dicklesworthstone/agent_flywheel_clawdbot_skills_and_integrations732026년 9월 6일 업데이트

Jeffrey Emanuel's multi-agent implementation workflow using NTM, Agent Mail, Beads, and BV. The execution phase that follows planning and bead creation. Includes exact prompts used.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Dicklesworthstone/agent_flywheel_clawdbot_skills_and_integrations732026년 9월 6일 업데이트

Convert markdown plans into beads with dependencies using br CLI. Use when creating task graphs, polishing beads before implementation, or bridging planning to agent swarm execution.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Dicklesworthstone/agent_flywheel_clawdbot_skills_and_integrations732026년 9월 6일 업데이트

bv

무료

Beads Viewer - Graph-aware triage engine for Beads projects. Computes PageRank, betweenness, critical path, and cycles. Use --robot-* flags for AI agents.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Dicklesworthstone/agent_flywheel_clawdbot_skills_and_integrations732026년 9월 6일 업데이트

caam

무료

Manage AI coding CLI accounts with sub-100ms switching. Use when hitting rate limits on Claude Max, GPT Pro, or Gemini Ultra subscriptions and need instant account swapping without browser OAuth.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Dicklesworthstone/agent_flywheel_clawdbot_skills_and_integrations732026년 9월 6일 업데이트

Dicklesworthstone의 스킬 모두 보기

이 스킬의 문제 신고