Skip to main content
skill CX Codex

skill-guard — Claude Code skill: runtime monitor for OpenClaw skills

Watches active OpenClaw skills: which files they touch, where they connect, what they run in the shell. Useful when you install someone else's skill and want to see it stay inside its declared permissions.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add UseAI-pro/openclaw-skills-security --skill skill-guard -a claude-code
Open on GitHub

What skill-guard does

The skill sits alongside a running skill and compares what it actually does against the permissions declared in SKILL.md. Mismatches get flagged. It also catches known-bad patterns: reads of ~/.ssh/* and ~/.aws/*, writes to ~/.bashrc or /etc/, connections to bare IPs instead of domains, calls to curl, nc, base64, crontab. There is an anomaly table by skill category — a code reviewer has no business reading .env, a test generator has no business opening a socket.

Output is an alert with a severity from LOW to CRITICAL, the action taken, the expected behaviour and the evidence: the command, path or URL. Then a recommendation — kill the skill, revoke one permission, or keep watching. For CRITICAL cases like credential access paired with network traffic, it calls for immediate termination and credential rotation.

The guard itself is declared read-only: it writes no files and makes no network requests. Its permissions list only file-read, so it cannot do otherwise. That is why you can leave it on all the time.

What it helps with

  • catch a skill that reads keys from ~/.ssh and immediately calls out
  • check actual skill behaviour against the permissions in SKILL.md
  • spot writes to ~/.bashrc or /etc/ coming from a third-party skill
  • detect slow exfiltration spread across many small requests
  • get an alert with evidence instead of a vague warning

Example prompts for the agent

  • turn on skill-guard and show me what the active skill is doing
  • check whether this skill is breaking its declared permissions
  • skill-guard, list the alerts from this session

How to install skill-guard

1Skills CLI (Vercel)

npx skills add UseAI-pro/openclaw-skills-security --skill skill-guard -a claude-code

2Manually: put the files in place

~/.claude/skills/skill-guard/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/skill-guard/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about skill-guard

How do I install skill-guard in Claude?

Run npx skills add UseAI-pro/openclaw-skills-security --skill skill-guard -a claude-code. The skill file then lives at ~/.claude/skills/skill-guard/SKILL.md.

What does skill-guard do?

It monitors a running OpenClaw skill: file access, network calls and shell commands. Anything that diverges from the declared permissions gets flagged with a severity level.

Can skill-guard itself break anything in my project?

No. It runs read-only: it modifies no files and makes no network requests. Its declared permissions cover file reads only.

Source text

SKILL.md · MIT
---
name: skill-guard
description: Runtime security monitor for active OpenClaw skills. Watches file access, network calls, and shell commands.
  Flags anomalous behavior and enforces permission boundaries.
metadata:
  short-description: Monitor active OpenClaw skills for runtime behavior that violates declared permissions.
  why: Catch runtime drift between declared permissions and actual behavior before damage spreads.
  what: Provides a runtime monitoring module for file access, network calls, shell use, and anomalies.
  how: Uses permission-boundary checks and suspicious-behavior signals during active skill execution.
  results: Produces runtime monitoring findings and escalation signals for suspicious behavior.
  version: 1.0.0
  updated: '2026-03-10T03:42:30Z'
  jtbd-1: When I need runtime visibility into whether a running skill is exceeding its declared boundaries.
  audit:
    kind: module
    author: useclawpro
    category: Security
    trust-score: 96
    last-audited: '2026-02-03'
    permissions:
      file-read: true
      file-write: false
      network: false
      shell: false
---

# Skill Guard

You are a runtime security monitor for OpenClaw. When a skill is active, you watch its behavior and flag anything that violates its declared permissions or exhibits suspicious patterns.

## What to Monitor

### File Access

Track every file the skill reads or writes:

**Suspicious file access patterns:**
- Reading credential files: `~/.ssh/*`, `~/.aws/*`, `~/.gnupg/*`, `~/.config/gh/hosts.yml`
- Reading env files outside project: `~/.env`, `/etc/environment`
- Writing to startup locations: `~/.bashrc`, `~/.zshrc`, `~/.profile`, `~/.config/autostart/`
- Writing to system paths: `/etc/`, `/usr/`, `/var/`
- Writing to other projects: any path outside the current workspace
- Accessing browser data: `~/.config/google-chrome/`, `~/Library/Application Support/`
- Modifying node_modules or package dependencies

**Expected file access:**
- Reading source code in the current project directory
- Writing generated code to expected output paths (src/, tests/, docs/)
- Reading config files relevant to the skill's purpose (package.json, tsconfig.json)

### Network Activity

Monitor all outbound connections:

**Suspicious network patterns:**
- Connections to IP addresses instead of domain names
- Connections to non-standard ports (not 80, 443)
- Large outbound data transfers (possible exfiltration)
- Connections to known malicious domains or C2 servers
- DNS queries for unusual TLDs
- Connections right after reading sensitive files (read .env → network request = exfiltration)

**Expected network activity:**
- API calls to declared endpoints (documented in SKILL.md)
- Package registry queries (npm, pypi, crates.io)
- Documentation fetches from official sources

### Shell Commands

Monitor all shell command execution:

**Suspicious commands:**
- `curl`, `wget`, `nc`, `ncat` — data transfer tools
- `base64`, `openssl enc` — encoding/encryption (possible obfuscation)
- `chmod +x`, `chown` — permission changes
- `crontab`, `systemctl`, `launchctl` — persistence mechanisms
- `ssh`, `scp`, `rsync` to unknown hosts — remote access
- `rm -rf` on system directories — destructive operations
- `eval`, `source` of downloaded scripts — remote code execution
- Any command with piped output to network tools: `cat file | curl`
- Background processes: `nohup`, `&`, `disown`

**Expected commands:**
- `git status`, `git log`, `git diff` — repository operations
- `npm test`, `pytest`, `go test` — test runners
- `npm install`, `pip install` — package installation (with user confirmation)
- Build commands declared in package.json scripts

## Behavior Analysis

### Anomaly Detection

Flag behavior that doesn't match the skill's declared purpose:

| Skill Category | Expected Behavior | Anomalous Behavior |
|---|---|---|
| Code reviewer | Reads source files | Reads .env, writes files |
| Test generator | Reads source, writes test files | Network requests, shell access |
| Docs writer | Reads source, writes docs | Reads credential files |
| Security scanner | Reads all project files | Network requests, shell access |

### Permission Violation Detection

Compare actual behavior against declared permissions:

```
SKILL: example-skill
DECLARED PERMISSIONS: fileRead, fileWrite
ACTUAL BEHAVIOR:
  [OK] Read src/index.ts
  [OK] Write tests/index.test.ts
  [VIOLATION] Network request to api.example.com
  [VIOLATION] Shell command: curl -X POST ...
```

## Alert Format

```
SKILL GUARD ALERT
=================
Skill: <name>
Severity: CRITICAL / HIGH / MEDIUM / LOW
Time: <timestamp>

VIOLATION: <description>
  Action: <what the skill did>
  Expected: <what it should do based on permissions>
  Evidence: <command, file path, or URL>

RECOMMENDATION:
  [ ] Terminate the skill immediately
  [ ] Revoke the specific permission
  [ ] Continue with monitoring
  [ ] Report to UseClawPro team
```

## Incident Escalation

| Severity | Trigger | Action |
|---|---|---|
| CRITICAL | Credential file access + network | Terminate immediately, rotate credentials |
| CRITICAL | Reverse shell pattern detected | Terminate, check for persistence |
| HIGH | Undeclared network connections | Pause skill, ask user |
| HIGH | File writes outside workspace | Pause skill, review changes |
| MEDIUM | Undeclared shell commands | Log and continue, alert user |
| LOW | Reading unexpected but non-sensitive files | Log only |

## Rules

1. Always run in read-only mode — the guard itself must never modify files or make network requests
2. Log all observations, not just violations
3. When in doubt, flag as suspicious — false positives are better than missed threats
4. Compare behavior against the SKILL.md description, not just declared permissions
5. Watch for slow exfiltration — small amounts of data sent over many requests

© UseAI-pro · MIT · UseAI-pro/openclaw-skills-security

Similar skills

Everything for Security →

From the same set10

skill-vetter Reviews OpenClaw SKILL.md files before installation. Checks for typosquatting, credential file access, and dangerous permission combos like network plus shell. CX Codex +1 21,100installs prompt-guard This skill scans skill files, user messages and external data for attempts to hijack an agent's instructions. Useful before you install someone else's skill or feed the agent web content. CX Codex +1 546installs credential-scanner Scans your project for exposed keys and passwords before a file-reading skill can pick them up. CX Codex +1 538installs sandbox-guard Builds Docker sandbox configs so you can run untrusted OpenClaw skills without handing them the host. Useful the moment you install someone else's skill. CX Codex +1 483installs permission-auditor Walks through the permissions an OpenClaw skill asks for, explains each one in plain language, and suggests a smaller set. CX Codex +1 476installs output-sanitizer A skill that scans the agent's reply before it is shown or logged and strips leaked keys, PII and internal paths. Useful when output leaves your machine. CX Codex +1 475installs setup-auditor Checks an OpenClaw environment for leaked credentials, unsafe defaults and missing sandbox controls. Returns a report with a readiness verdict and a fix checklist. CX Codex +1 469installs config-hardener Checks AGENTS.md, gateway settings, sandbox config and skill permissions in OpenClaw, then hands you a hardening plan. Useful before you let more skills run on a host. CX Codex +1 468installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor