Danger Guard Plugin — Development skill for Claude Code
Deterministic pre-exec interception of destructive shell commands for OpenClaw agents.
How to install Danger Guard Plugin
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open Thomaszhou22/danger-guard-plugin and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Danger Guard Plugin does
Deterministic pre-exec interception of destructive shell commands for OpenClaw agents. Gateway-level pattern matching, not prompt-level.
Alternatives in Development
- Careful — Activate destructive command warnings for the session 2.8k ★
- Exec Summary — Compress a document or update into a crisp executive summary 1.3k ★
- /codex-exec - Execute Codex CLI Commands — Easy wrapper for running Codex CLI commands from Claude Code with proper syntax 618 ★
README
Danger Guard Plugin
Deterministic pre-exec interception of destructive shell commands for OpenClaw agents. The block decision is made by code in the Gateway — not by the model — so it cannot be forgotten, distracted, or prompt-injected away.
[](LICENSE) [](https://openclaw.ai) [](https://clawhub.ai) [](https://www.typescriptlang.org)
[English](./README.md) | [中文](./README_CN.md)
Why a plugin, when the skill exists?
The [Danger Guard skill](https://github.com/Thomaszhou22/danger-guard-skill) teaches the agent to intercept dangerous commands. Its weakness — verified in real use — is that a skill is instructions the model must remember to follow. One day the context is long, the command is incomplete, and the skill never fires. The failure that inspired Skill Compass was exactly this: `rm -rf` went through, and the fix was editing the skill description. That fixes a prompt, not the architecture.
This plugin moves the check into the Gateway with the `before_tool_call` hook:
Agent decides to run a command
↓
Gateway pre-exec hook (code, not prompts)
↓
├── no match → execute, agent never notices
├── Level 2 match → approval required (warning)
└── Level 1 match → blocked pending owner approval (critical)
/approve from the human, or deny
Pattern matching happens outside the model. The agent cannot bypass it, forget it, or be tricked around it.
Install
openclaw plugins install clawhub:danger-guard-plugin
Or from source:
git clone https://github.com/Thomaszhou22/danger-guard-plugin.git
cd danger-guard-plugin
npm install && npm run build
openclaw plugins install --link . --force
openclaw plugins enable danger-gu
Related Skills
ClaudeG
Claude Code skill: guard rails against weakened tests, unverified 'fixed' claims, placeholders, destructive co
Axguard Inject
Injection and RCE sinks — eval, exec, pickle, shell, child_process. Usage: /axguard-inject [path]
Guard
Safety guardrails — blocks destructive commands (rm -rf, DROP TABLE, force-push) and optionally restricts edit
Destructive Guard
Claude Code plugin: detect destructive/deletion bash commands → y/n confirmation (works in bypassPermissions)
Prompt Injection Guard
Detect prompt injection, hardcoded secrets, destructive commands and exfiltration patterns in any text or file
Guard Destructive Ops
A skill for claude,dsh(or other agents),aiming to solve the problem that agnets can use wrong powershell to de
Related Agents
Openclaw Debugger
Use when an OpenClaw instance has a problem the health sentinel couldn't fix — gateway failures, config drift,
Rayo Heartbeat Watcher
Check OpenClaw gateway health and alert if Rayo is dead or idle too long. Monitors ~/.openclaw/logs/gateway.lo
Gateway Notes
Purpose: the confirmed gateway/guardrail mechanisms for the workshop, input guard, output sidecar, MCP authz,