lidan-capsule

ClawGuard

AI Agentv0.1.5
By lidan-capsuleUpdated 2026-05-17clawguard@clawhub_lidan-capsule/clawguard
Agent FrameworksTool Use

According to AlphaMoat, as of 2026-09, ClawGuard has 3,558 downloads and 0 stars — ranked #3,077 of 5,078 AI skills overall, and #624 of 969 in AI Agent.

Installs
113
Downloads
3.6K
Stars
-
Overall Rank
#3,077
Top 61% overall · Top 65% in AI Agent
PlatformInstallsDownloadsStarsComments
ClawHub ↗1133.4K--
SkillHub ↗1103.6K-—

Platforms count differently and update at different times.

What this skill does

ClawGuard evaluates calls before execution, can log call context, and can block high-risk operations when the corresponding setting is enabled. Evaluation context is sent to the configured LLM. The third-party plugin may have broad visibility into tool-call content; review its package version and carefully configure logging, metrics, and the model provider when prompts or arguments may contain secrets. Do not print gateway tokens to shared logs or terminals.

Profile published 2026-10-29

What you can do with it

  • Review tool-call guardrail settings before deploying to an OpenClaw gateway
  • Inspect risk evaluation, logging, and blocking options
  • Troubleshoot plugin initialization or authentication configuration

When to use it

  • When adding pre-execution risk evaluation and optional blocking to tool calls
  • When reviewing how plugin settings affect call content and credentials

Example prompts

Generated from the skill’s documentation as examples; not results of actual runs.

Explain ClawGuard data flow, logging, and blocking settings only; do not install the plugin or change gateway configuration.
Review whether this configuration could log secrets or tokens and suggest a credential-safe verification method.

Monthly Trend

Downloads3.6K
2.1K2.9K3.7K2026-03 · Downloads 2.2K2026-05 · Downloads 2.8K2026-06 · Downloads 2.9K2026-07 · Downloads 3.2K2026-08 · Downloads 3.3K2026-09 · Downloads 3.6K26-0326-09
Stars-
0112026-03 · Stars -2026-05 · Stars -2026-06 · Stars -2026-07 · Stars -2026-08 · Stars -2026-09 · Stars -26-0326-09

The counting method changed in 2026-09: skills with the same name are now counted separately by author, and the full catalog is covered. Dashed lines show months before the change; they are not compared with later months, and no growth is computed across the change.

MonthDownloadsMoMStars
2026-093.6K—-
2026-083.3K+4.0%-
2026-073.2K+9.3%-
2026-062.9K+4.6%-
2026-052.8K—-
2026-032.2K—-

SKILL.md (original)

The author’s original file, shown as plain text without edits or review by AlphaMoat. Links are not clickable; check commands before running them. Fetched 2026-10-23.

3.9 KB · ClawHub v0.1.5
---
name: clawguard
description: Install and configure the ClawGuard security plugin - an LLM-as-a-Judge guardrail that detects and blocks risky tool calls
metadata: {"openclaw":{"emoji":"🛡️","homepage":"https://github.com/capsulesecurity/clawguard"}}
---

# ClawGuard Plugin Installation Guide

ClawGuard is a security plugin that uses an LLM-as-a-Judge to evaluate tool calls before execution, detecting and optionally blocking risky operations.
Show all (128 lines)
## Prerequisites

Before installing ClawGuard, ensure the gateway's chat completions endpoint is enabled:

```bash
openclaw config set gateway.http.endpoints.chatCompletions.enabled true
```

## Installation

Install the plugin from npm:

```bash
openclaw plugins install @capsulesecurity/clawguard
```

After installation, restart the gateway to load the plugin.

## Docker Installation

If running OpenClaw in Docker:

```bash
# Install the plugin
docker compose run --rm openclaw-cli plugins install @capsulesecurity/clawguard

# Restart gateway with force-recreate to reload env vars
docker compose up -d --force-recreate openclaw-gateway
```

**Important:** Always use `--force-recreate` when restarting. Plain `docker compose restart` does NOT reload environment variables.

## Verify Installation

Check the gateway logs for the initialization message:

```
[clawguard] Initialized (logging: true, security: true, block: true, metrics: enabled)
```

## Configuration

Configure ClawGuard via `openclaw config set plugins.clawguard.<option> <value>`:

| Option | Default | Description |
|--------|---------|-------------|
| enabled | true | Enable/disable the plugin |
| logToolCalls | true | Log tool call JSON to gateway logs |
| securityCheckEnabled | true | Run LLM security evaluation |
| blockOnRisk | true | Block high/critical risk tool calls |
| maxContextWords | 2000 | Session context word limit for evaluation |
| timeoutMs | 15000 | Security check timeout in milliseconds |
| gatewayHost | 127.0.0.1 | Gateway host for LLM calls |
| gatewayPort | 18789 | Gateway port for LLM calls |
| metricsEnabled | true | Enable anonymous usage metrics |

### Example Configuration

```bash
# Disable blocking (log-only mode)
openclaw config set plugins.clawguard.blockOnRisk false

# Increase timeout for slower models
openclaw config set plugins.clawguard.timeoutMs 30000

# Disable metrics collection
openclaw config set plugins.clawguard.metricsEnabled false
```

## Gateway Authentication

ClawGuard calls the gateway's `/v1/chat/completions` endpoint internally. If you see 401 Unauthorized errors:

1. Check the gateway token in your environment matches the config:
   ```bash
   # Check env var
   printenv OPENCLAW_GATEWAY_TOKEN

   # Check config token
   cat ~/.openclaw/openclaw.json | grep -A2 '"token"'
   ```

2. If tokens don't match, update your environment and restart the gateway.

For Docker, ensure `.env` contains the correct `OPENCLAW_GATEWAY_TOKEN` and use `--force-recreate` when restarting.

## Troubleshooting

### 405 Method Not Allowed
The chat completions endpoint is not enabled. Run:
```bash
openclaw config set gateway.http.endpoints.chatCompletions.enabled true
```

### 401 Unauthorized
Token mismatch between environment and config. See Gateway Authentication section above.

### Plugin Not Loading
1. Check `openclaw plugins list` shows clawguard
2. Restart the gateway
3. Check gateway logs for errors

## How It Works

ClawGuard registers a `before_tool_call` hook that:

1. Logs tool call details (if `logToolCalls` is enabled)
2. Sends tool context to an LLM for security evaluation
3. Returns a risk assessment (none/low/medium/high/critical)
4. Blocks execution if risk is high/critical (if `blockOnRisk` is enabled)

The security evaluation uses your configured LLM provider, so it works with any model you have set up in OpenClaw.

## Links

- GitHub: https://github.com/capsulesecurity/clawguard
- npm: https://www.npmjs.com/package/@capsulesecurity/clawguard

Popular in AI Agent

Data month: 2026-09 · Downloads, stars and installs are aggregated monthly from public skill registries (ClawHub, SkillHub). See methodology.