ClawGuard for Openclaw

ClawGuard is an LLM-powered security guardrail that evaluates and intercepts risky tool executions to protect your agent environment.

lidan-capsule
v0.1.5
Feb 4, 2026
0
3.4k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install clawguard

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install clawguard using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is ClawGuard?

ClawGuard is a sophisticated security plugin designed specifically for the ecosystem of Openclaw Skills. It operates as an LLM-as-a-Judge, providing a critical layer of defense by analyzing tool calls before they are executed. By leveraging the intelligence of large language models, it can understand the intent behind a command and determine if the operation poses a threat to the system.

This plugin is indispensable for developers building autonomous agents with Openclaw Skills who require robust safety protocols. Whether you are running agents in production or experimenting with complex workflows, ClawGuard ensures that risky operations—such as unauthorized file access or destructive system commands—are identified and optionally blocked before any damage occurs.

ClawGuard Use Cases

  • Preventing autonomous agents from executing potentially harmful or destructive shell commands.
  • Implementing a zero-trust architecture for tool execution within Openclaw Skills.
  • Auditing tool usage and intent for compliance and security monitoring in enterprise environments.
  • Setting up a safe sandbox environment where high-risk tool calls are logged for review without being executed.

How ClawGuard Works

  1. The plugin intercepts the workflow of Openclaw Skills by registering a before_tool_call hook.
  2. When a tool call is initiated, the plugin captures the tool's JSON payload and the surrounding session context.
  3. This data is transmitted to an LLM provider to perform a security evaluation based on the provided context.
  4. The LLM judge assigns a risk level ranging from none to critical.
  5. Based on your specific configuration, ClawGuard will either allow the tool to run, log the risk, or terminate the call to prevent execution.

ClawGuard Setup

To get started with ClawGuard for Openclaw Skills, ensure your gateway is configured correctly:

# Enable the chat completions endpoint required for the judge
openclaw config set gateway.http.endpoints.chatCompletions.enabled true

# Install the plugin via the CLI
openclaw plugins install @capsulesecurity/clawguard

# Restart your gateway. If using Docker, use the force-recreate flag:
docker compose up -d --force-recreate openclaw-gateway

ClawGuard Data Schema & Taxonomy

ClawGuard allows for granular control over security settings for Openclaw Skills through its configuration schema:

Option Type Default Description
securityCheckEnabled Boolean true Activates the LLM-as-a-Judge evaluation logic.
blockOnRisk Boolean true Automatically blocks tool calls rated as high or critical risk.
logToolCalls Boolean true Logs the full JSON of every tool call to the gateway logs for auditing.
maxContextWords Integer 2000 The word limit for the session context sent to the LLM judge.
timeoutMs Integer 15000 The maximum time allowed for a security evaluation before timing out.

ClawGuard Advanced Features

  • Log-only mode: Disable blockOnRisk to monitor agent behavior and fine-tune security prompts without interrupting workflows.
  • Model Agnostic: Use any model configured within your Openclaw Skills environment as the security judge.
  • Real-time Metrics: Integrated metrics collection to monitor the frequency and severity of blocked tool calls.
  • Contextual Awareness: Evaluates tool calls based on the specific conversation history to detect prompt injection or social engineering attempts.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*