# Send ClawGuard to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "clawguard",
    "name": "ClawGuard",
    "source": "tencent",
    "type": "skill",
    "category": "安全合规",
    "sourceUrl": "https://clawhub.ai/lidan-capsule/clawguard",
    "canonicalUrl": "https://clawhub.ai/lidan-capsule/clawguard",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/clawguard",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=clawguard",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "clawguard",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-29T03:09:47.969Z",
      "expiresAt": "2026-05-06T03:09:47.969Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=clawguard",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=clawguard",
        "contentDisposition": "attachment; filename=\"clawguard-0.1.5.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "clawguard"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/clawguard"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/clawguard",
    "downloadUrl": "https://openagent3.xyz/downloads/clawguard",
    "agentUrl": "https://openagent3.xyz/skills/clawguard/agent",
    "manifestUrl": "https://openagent3.xyz/skills/clawguard/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/clawguard/agent.md"
  }
}
```
## Documentation

### 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.

### Prerequisites

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

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

### Installation

Install the plugin from npm:

openclaw plugins install @capsulesecurity/clawguard

After installation, restart the gateway to load the plugin.

### Docker Installation

If running OpenClaw in Docker:

# 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>:

OptionDefaultDescriptionenabledtrueEnable/disable the pluginlogToolCallstrueLog tool call JSON to gateway logssecurityCheckEnabledtrueRun LLM security evaluationblockOnRisktrueBlock high/critical risk tool callsmaxContextWords2000Session context word limit for evaluationtimeoutMs15000Security check timeout in millisecondsgatewayHost127.0.0.1Gateway host for LLM callsgatewayPort18789Gateway port for LLM callsmetricsEnabledtrueEnable anonymous usage metrics

### Example Configuration

# 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:

Check the gateway token in your environment matches the config:
# Check env var
printenv OPENCLAW_GATEWAY_TOKEN

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



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.

### 405 Method Not Allowed

The chat completions endpoint is not enabled. Run:

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

Check openclaw plugins list shows clawguard
Restart the gateway
Check gateway logs for errors

### How It Works

ClawGuard registers a before_tool_call hook that:

Logs tool call details (if logToolCalls is enabled)
Sends tool context to an LLM for security evaluation
Returns a risk assessment (none/low/medium/high/critical)
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
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: lidan-capsule
- Version: 0.1.5
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-04-29T03:09:47.969Z
- Expires at: 2026-05-06T03:09:47.969Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/clawguard)
- [Send to Agent page](https://openagent3.xyz/skills/clawguard/agent)
- [JSON manifest](https://openagent3.xyz/skills/clawguard/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/clawguard/agent.md)
- [Download page](https://openagent3.xyz/downloads/clawguard)