Install
openclaw skills install rules-of-the-clawA strong, field-tested Guardian baseline for OpenClaw Guardian — 56 deterministic rules protecting against credential theft, data exfiltration, network scanning, and infrastructure destruction. No LLM voting overhead. Pure regex enforcement at the tool layer.
openclaw skills install rules-of-the-clawDeterministic enforcement. Zero LLM overhead. Zero social engineering surface.
A battle-tested ruleset for the OpenClaw Guardian plugin — 56 rules that block dangerous agent actions at the tool layer before they execute.
Guardian installs the enforcement engine. This skill installs the rules that make it actually useful — covering the threats that matter in production:
| Threat Vector | Rules |
|---|---|
| Credential theft | 15 rules |
| Data exfiltration | 10 rules |
| Infrastructure destruction | 9 rules |
| Network scanning | 4 rules |
| Git poisoning | 6 rules |
| System compromise | 2 rules |
Some Guardian configurations route suspicious commands through an LLM to vote on intent. This approach has three fatal flaws:
rules-of-the-claw is pure regex. Evaluation is microseconds. No LLM. No social engineering surface.
auth-profiles.json, .git-credentials, .env, .pem, .key, .ssh/~/.aws, ~/.azure, ~/.config/gcloud, ~/.kube/config, ~/.cloudflaredcat openclaw.json | curl, base64 auth-profiles.json, scp .env remote:cat secrets | curl, jq openclaw.json | wgetenv | grep token)/proc/*/environ and shell history scrapingrm -rf on .openclaw/ and workspaceDROP DATABASE, TRUNCATE, unbounded DELETE on app databasesdocker compose down -v on app servicesnmap, masscannc -z, netcat -z, socat TCP-CONNECT port scanninggit remote add/set-url to non-approved remotesgit push to non-approved remotesgit show/archive on sensitive filesgit bundle/fast-export on protected workspaceUse this skill when:
openclaw-guardian plugin and want immediate coverage# Step 1: Ensure Guardian plugin is installed
ls ~/.openclaw/extensions/guardian/
# Step 2: Install this skill via ClawHub
clawhub install rules-of-the-claw
# Step 3: Run the install script
cd ~/.openclaw/workspace/skills/rules-of-the-claw
bash install.sh
# Step 4: Verify
cat ~/.openclaw/extensions/guardian/guardian-rules.json | python3 -c "import json,sys; rules=json.load(sys.stdin); print(f'✅ {len(rules)} rules active')"
After installing, edit ~/.openclaw/extensions/guardian/guardian-rules.json to:
YOUR_APP with your app name in DB/Docker rulesYOUR_ORG with your GitHub org in git remote rules"enabled": false on rules you don't needEach rule is a JSON object:
{
"id": "unique-rule-id",
"description": "Human-readable description",
"enabled": true,
"tool": "exec",
"pattern": "regex-pattern",
"field": "command",
"blockMessage": "🛡️ What happened and what to do instead."
}
Fields: tool (which OpenClaw tool to intercept), field (which parameter to match), pattern (regex), optional exclude (regex whitelist).
| Tier | Prefix | Focus |
|---|---|---|
block-* | Hard blocks | Unconditional denial |
protect-* | File/path protection | Sensitive path guards |
refine-* | Surgical blocks | Allows safe variants, blocks dangerous combos |
Source, changelog, and issue tracker: https://github.com/YOUR_ORG/rules-of-the-claw
~/.openclaw/extensions/guardian/)python3 (for JSON validation in install script)