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
Guard
Safety guardrails — blocks destructive commands (rm -rf, DROP TABLE, force-push) and optionally restricts edit
Freeze
Freeze files matching a pattern — blocks Edit/Write to matched files via a session-scoped PreToolUse hook. Use
Symbolic Transformer
A next-token predictor using hierarchical label pattern matching instead of float weights, trained by a Claude
Cc Agents Kit
Claude Code plugin marketplace. guard-hooks: five defensive hooks that block dangerous shell commands and secr
Claude Code Plus
Enhancements for Claude Code CLI: smart piped command auto-approval, shell config fix, and 850+ pre-configured
Pharn Dev Regress
Detect regressions OUTSIDE the just-built feature: re-run the existing deterministic suite (npm run check's ga
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,