{
  "schemaVersion": "1.0",
  "item": {
    "slug": "dcg-guard",
    "name": "DCG Guard",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/StarenseN/dcg-guard",
    "canonicalUrl": "https://clawhub.ai/StarenseN/dcg-guard",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/dcg-guard",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=dcg-guard",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "AGENT_INSTRUCTIONS.md",
      "SKILL.md",
      "index-windows-hybrid.ts",
      "index.ts",
      "install.sh",
      "openclaw.plugin.json"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/dcg-guard"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/dcg-guard",
    "agentPageUrl": "https://openagent3.xyz/skills/dcg-guard/agent",
    "manifestUrl": "https://openagent3.xyz/skills/dcg-guard/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/dcg-guard/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "DCG Guard",
        "body": "An OpenClaw plugin that hard-blocks dangerous shell commands before they execute. Works on any OpenClaw installation (Windows, macOS, Linux, local, VPS, anywhere). No binary dependencies required."
      },
      {
        "title": "What It Does",
        "body": "Intercepts every exec/bash tool call via OpenClaw's before_tool_call plugin event. Pipes the command through DCG (Dangerous Command Guard). Safe commands pass silently with zero overhead. Dangerous commands are blocked before execution.\n\nBlocked (Unix): rm -rf ~, git push --force, git reset --hard, git clean -fd, git branch -D\nBlocked (Windows): Remove-Item -Recurse -Force, rd /s /q, del /s, Format-Volume, reg delete HKLM\nAllowed: ls, cat, echo, git status, npm install, dir, Get-ChildItem"
      },
      {
        "title": "Install",
        "body": "# After clawhub install dcg-guard:\nbash install.sh\n\nOr manually:\n\n# 1. Install DCG binary\ncurl -sSL https://raw.githubusercontent.com/Dicklesworthstone/destructive_command_guard/master/install.sh | bash\n\n# 2. Link plugin into OpenClaw\nopenclaw plugins install -l /path/to/dcg-guard\nopenclaw gateway restart"
      },
      {
        "title": "How It Works",
        "body": "Agent calls exec with a command\nPlugin intercepts via before_tool_call (runs before execution)\nCommand is checked against built-in rules (cross-platform, <1ms, no subprocess)\nIf no built-in match and DCG binary is installed, command is piped to DCG (~27ms)\nSafe: silent passthrough, agent never knows the plugin exists\nDangerous: { block: true } returned to OpenClaw, command never executes\n\nv1.1.0: Built-in rules work without the DCG binary. DCG binary is optional (adds extra unix rules). Windows fully supported out of the box."
      },
      {
        "title": "Security",
        "body": "No shell interpolation. Commands are passed to DCG via stdin using execFileSync (not execSync). No injection risk.\nFail-open. If DCG binary is missing or crashes, commands pass through. The plugin never deadlocks your agent.\nZero dependencies. Only requires the DCG binary (single Go binary, no runtime deps)."
      },
      {
        "title": "Configuration",
        "body": "Optional, in openclaw.json under plugins.entries.dcg-guard.config:\n\n{\n  \"enabled\": true,\n  \"dcgBin\": \"/custom/path/to/dcg\"\n}\n\nDefault DCG path: ~/.local/bin/dcg\n\nOverride with env var: DCG_BIN=/path/to/dcg"
      },
      {
        "title": "Agent Instructions (optional)",
        "body": "Add to your workspace AGENTS.md:\n\nWhen a command is blocked by DCG Guard, do NOT retry it.\nAsk the user for explicit permission before attempting any alternative.\nThe block exists because the command is destructive or irreversible."
      }
    ],
    "body": "DCG Guard\n\nAn OpenClaw plugin that hard-blocks dangerous shell commands before they execute. Works on any OpenClaw installation (Windows, macOS, Linux, local, VPS, anywhere). No binary dependencies required.\n\nWhat It Does\n\nIntercepts every exec/bash tool call via OpenClaw's before_tool_call plugin event. Pipes the command through DCG (Dangerous Command Guard). Safe commands pass silently with zero overhead. Dangerous commands are blocked before execution.\n\nBlocked (Unix): rm -rf ~, git push --force, git reset --hard, git clean -fd, git branch -D Blocked (Windows): Remove-Item -Recurse -Force, rd /s /q, del /s, Format-Volume, reg delete HKLM Allowed: ls, cat, echo, git status, npm install, dir, Get-ChildItem\n\nInstall\n# After clawhub install dcg-guard:\nbash install.sh\n\n\nOr manually:\n\n# 1. Install DCG binary\ncurl -sSL https://raw.githubusercontent.com/Dicklesworthstone/destructive_command_guard/master/install.sh | bash\n\n# 2. Link plugin into OpenClaw\nopenclaw plugins install -l /path/to/dcg-guard\nopenclaw gateway restart\n\nHow It Works\nAgent calls exec with a command\nPlugin intercepts via before_tool_call (runs before execution)\nCommand is checked against built-in rules (cross-platform, <1ms, no subprocess)\nIf no built-in match and DCG binary is installed, command is piped to DCG (~27ms)\nSafe: silent passthrough, agent never knows the plugin exists\nDangerous: { block: true } returned to OpenClaw, command never executes\n\nv1.1.0: Built-in rules work without the DCG binary. DCG binary is optional (adds extra unix rules). Windows fully supported out of the box.\n\nSecurity\nNo shell interpolation. Commands are passed to DCG via stdin using execFileSync (not execSync). No injection risk.\nFail-open. If DCG binary is missing or crashes, commands pass through. The plugin never deadlocks your agent.\nZero dependencies. Only requires the DCG binary (single Go binary, no runtime deps).\nConfiguration\n\nOptional, in openclaw.json under plugins.entries.dcg-guard.config:\n\n{\n  \"enabled\": true,\n  \"dcgBin\": \"/custom/path/to/dcg\"\n}\n\n\nDefault DCG path: ~/.local/bin/dcg\n\nOverride with env var: DCG_BIN=/path/to/dcg\n\nAgent Instructions (optional)\n\nAdd to your workspace AGENTS.md:\n\nWhen a command is blocked by DCG Guard, do NOT retry it.\nAsk the user for explicit permission before attempting any alternative.\nThe block exists because the command is destructive or irreversible."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/StarenseN/dcg-guard",
    "publisherUrl": "https://clawhub.ai/StarenseN/dcg-guard",
    "owner": "StarenseN",
    "version": "1.1.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/dcg-guard",
    "downloadUrl": "https://openagent3.xyz/downloads/dcg-guard",
    "agentUrl": "https://openagent3.xyz/skills/dcg-guard/agent",
    "manifestUrl": "https://openagent3.xyz/skills/dcg-guard/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/dcg-guard/agent.md"
  }
}