clawguard
Install and configure the ClawGuard security plugin - an LLM-as-a-Judge guardrail that detects and blocks risky tool calls
Why use this skill?
Install ClawGuard to protect your OpenClaw agents. This LLM-as-a-Judge plugin detects and blocks risky tool calls, ensuring secure, compliant, and reliable automation workflows.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/lidan-capsule/clawguardWhat This Skill Does
ClawGuard is an essential security middleware for the OpenClaw platform, functioning as an LLM-as-a-Judge guardrail. It intercepts tool calls generated by your agents before they are executed. By acting as an intelligent firewall, ClawGuard evaluates the intent and safety of every requested operation against defined risk policies. It detects potentially malicious, unauthorized, or dangerous tool invocations, providing the ability to either log these threats or outright block them to prevent system compromise or data exfiltration.
Installation
To install ClawGuard, ensure your gateway's chat completion endpoint is enabled by running openclaw config set gateway.http.endpoints.chatCompletions.enabled true. Next, execute the installation command: openclaw plugins install @capsulesecurity/clawguard. For Docker environments, use the CLI inside your compose run command: docker compose run --rm openclaw-cli plugins install @capsulesecurity/clawguard, followed by docker compose up -d --force-recreate openclaw-gateway to ensure all configurations are applied correctly.
Use Cases
ClawGuard is designed for production environments where agents interact with sensitive systems. Use it to: 1) Prevent an agent from executing unauthorized shell commands on a production server. 2) Stop an agent from accessing internal databases or APIs it does not have explicit permission to query. 3) Mitigate "prompt injection" attacks where an external user attempts to trick the agent into performing destructive actions. 4) Ensure audit compliance by logging every tool call for later review while maintaining a secure "block-on-risk" policy.
Example Prompts
- "OpenClaw, verify if the current agent configuration is blocking high-risk tool calls using the ClawGuard status check."
- "Please audit the recent logs to identify any tool calls that were blocked by ClawGuard in the last hour."
- "OpenClaw, update my security settings to increase the ClawGuard timeout to 30000ms to accommodate slower, more thorough security evaluations."
Tips & Limitations
Always remember that ClawGuard adds a latency layer to your tool execution because it requires an additional LLM inference step to "judge" the action. If you notice agents becoming sluggish, optimize your maxContextWords setting. Ensure your OPENCLAW_GATEWAY_TOKEN is synced between your environment variables and config files to avoid 401 errors. Note that ClawGuard requires an active and authenticated gateway connection; it cannot perform evaluations if the gateway is unreachable. Finally, always prefer --force-recreate when restarting Docker containers to ensure environment-based security tokens are refreshed, as standard restarts will not propagate changes.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-lidan-capsule-clawguard": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: external-api