skill-guard — скилл для Claude Code: мониторинг безопасности скиллов
Следит за активными скиллами OpenClaw: какие файлы читают, куда ходят по сети, что запускают в шелле. Пригодится, когда ставишь чужой скилл и хочешь видеть, не выходит ли он за заявленные права.
npx skills add UseAI-pro/openclaw-skills-security --skill skill-guard -a claude-codeЧто делает skill-guard
Скилл работает как наблюдатель во время выполнения другого скилла. Он сверяет реальные действия с правами, объявленными в SKILL.md, и помечает расхождения. Отдельно ловит подозрительные шаблоны: чтение ~/.ssh/* и ~/.aws/*, запись в ~/.bashrc или /etc/, коннекты по IP вместо доменов, вызовы curl, nc, base64, crontab. Есть таблица аномалий по категориям скиллов — код-ревьюер не должен читать .env, генератор тестов не должен лезть в сеть.
На выходе — алерт с уровнем серьёзности от LOW до CRITICAL, действием скилла, ожидаемым поведением и доказательством: командой, путём или URL. Дальше рекомендация: убить скилл, отозвать конкретное право или продолжить наблюдение. Для CRITICAL вроде доступа к кредам вместе с сетью — немедленная остановка и ротация ключей.
Сам guard объявлен read-only: файлы не пишет, в сеть не ходит. В правах у него только file-read, так что на запись или сетевые запросы он не способен по определению. Это и есть причина, по которой его можно держать включённым постоянно.
Какие задачи решает
- поймать скилл, который читает ключи из
~/.sshи тут же стучится в сеть - сверить фактические действия скилла с правами из
SKILL.md - заметить запись в
~/.bashrcили/etc/из чужого скилла - отследить медленный слив данных мелкими порциями через много запросов
- получить алерт с доказательством, а не общее «что-то пошло не так»
Примеры запросов агенту
- включи skill-guard и покажи, что делает активный скилл
- проверь, не нарушает ли этот скилл свои объявленные права
- skill-guard, покажи алерты за текущую сессию
Как установить skill-guard
1Через Skills CLI (Vercel)
npx skills add UseAI-pro/openclaw-skills-security --skill skill-guard -a claude-code2Вручную: положить файлы
~/.claude/skills/skill-guard/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/skill-guard/
1Через Skills CLI (Vercel)
npx skills add UseAI-pro/openclaw-skills-security --skill skill-guard -a codex2Вручную: положить файлы
.agents/skills/skill-guard/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add UseAI-pro/openclaw-skills-security --skill skill-guard -a cursor2Вручную: положить файлы
.cursor/skills/skill-guard/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install UseAI-pro/openclaw-skills-security skill-guard2Вручную: положить файлы
.github/skills/skill-guard/SKILL.md1Через Skills CLI (Vercel)
npx skills add UseAI-pro/openclaw-skills-security --skill skill-guard -a gemini-cli2Командой платформы
gemini skills install https://github.com/UseAI-pro/openclaw-skills-security --path skills/skill-guardВручную: положить файлы
.devin/skills/skill-guard/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add UseAI-pro/openclaw-skills-security --skill skill-guard -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о skill-guard
Как установить skill-guard в Claude?
Выполни npx skills add UseAI-pro/openclaw-skills-security --skill skill-guard -a claude-code. После этого файл скилла лежит в ~/.claude/skills/skill-guard/SKILL.md.
Что делает skill-guard?
Следит за поведением активного скилла OpenClaw: доступ к файлам, сетевые вызовы, команды в шелле. Помечает то, что расходится с заявленными правами, и выдаёт алерт с уровнем серьёзности.
Может ли сам skill-guard что-то сломать в проекте?
Нет, он работает в read-only режиме: файлы не меняет и сетевых запросов не делает. В объявленных правах у него только чтение файлов.
Исходный текст
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