Deterministic 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 VectorRulesCredential theft15 rulesData exfiltration10 rulesInfrastructure destruction9 rulesNetwork scanning4 rulesGit poisoning6 rulesSystem compromise2 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 coveragebash
# 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:
json
{
"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).
TierPrefixFocusblock-*Hard blocksUnconditional denialprotect-*File/path protectionSensitive path guardsrefine-*Surgical blocksAllows 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)