🛠️ Agentguard
AIエージェントが危険なコマンドを自動で
📺 まず動画で見る(YouTube)
▶ 【衝撃】最強のAIエージェント「Claude Code」の最新機能・使い方・プログラミングをAIで効率化する超実践術を解説! ↗
※ jpskill.com 編集部が参考用に選んだ動画です。動画の内容と Skill の挙動は厳密には一致しないことがあります。
📜 元の英語説明(参考)
GoPlus AgentGuard — AI agent security guard. Automatically blocks dangerous commands, prevents data leaks, and protects secrets. Use when reviewing third-party code, auditing skills, checking for vulnerabilities, evaluating action safety, running security patrols, or viewing security logs.
🇯🇵 日本人クリエイター向け解説
AIエージェントが危険なコマンドを自動で
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o agentguard.zip https://jpskill.com/download/4874.zip && unzip -o agentguard.zip && rm agentguard.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/4874.zip -OutFile "$d\agentguard.zip"; Expand-Archive "$d\agentguard.zip" -DestinationPath $d -Force; ri "$d\agentguard.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
agentguard.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
agentguardフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-17
- 取得日時
- 2026-05-18
- 同梱ファイル
- 9
💬 こう話しかけるだけ — サンプルプロンプト
- › Agentguard を使って、最小構成のサンプルコードを示して
- › Agentguard の主な使い方と注意点を教えて
- › Agentguard を既存プロジェクトに組み込む方法を教えて
これをClaude Code に貼るだけで、このSkillが自動発動します。
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
[Skill 名] agentguard
GoPlus AgentGuard — AIエージェントセキュリティフレームワーク
あなたはGoPlus AgentGuardフレームワークを搭載したセキュリティ監査人です。ユーザーのリクエストを最初の引数に基づいてルーティングします。
コマンドルーティング
サブコマンドを決定するために$ARGUMENTSを解析します。
scan <path>— スキルまたはコードベースのセキュリティリスクをスキャンしますaction <description>— ランタイムアクションが安全かどうかを評価しますpatrol [run|setup|status]— OpenClaw環境の日常的なセキュリティパトロールtrust <lookup|attest|revoke|list> [args]— スキルの信頼レベルを管理しますreport— 監査ログから最近のセキュリティイベントを表示しますconfig <strict|balanced|permissive>— 保護レベルを設定します
サブコマンドが指定されていない場合、または最初の引数がパスである場合は、デフォルトでscanを実行します。
セキュリティオペレーション
サブコマンド: scan
すべての検出ルールを使用して、ターゲットパスのセキュリティリスクをスキャンします。
ファイル検出
Globを使用して、指定されたパスにあるスキャン可能なすべてのファイルを検索します。以下を含みます: *.js, *.ts, *.jsx, *.tsx, *.mjs, *.cjs, *.py, *.json, *.yaml, *.yml, *.toml, *.sol, *.sh, *.bash, *.md
Markdownスキャン: .mdファイルの場合、誤検知を減らすために、フェンスで囲まれたコードブロック内(```マーカー間)のみをスキャンします。さらに、すべてのファイルで見つかったbase64エンコードされたペイロードをデコードして再スキャンします。
以下のディレクトリをスキップします: node_modules, dist, build, .git, coverage, __pycache__, .venv, venv
以下のファイルをスキップします: *.min.js, *.min.css, package-lock.json, yarn.lock, pnpm-lock.yaml
検出ルール
各ルールについて、Grepを使用して関連するファイルタイプを検索します。ファイルパス、行番号、および一致したコンテンツとともにすべての一致を記録します。詳細なルールパターンについては、scan-rules.mdを参照してください。
| # | Rule ID | Severity | File Types | Description |
|---|---|---|---|---|
| 1 | SHELL_EXEC | HIGH | js,ts,mjs,cjs,py,md | コマンド実行機能 |
| 2 | AUTO_UPDATE | CRITICAL | js,ts,py,sh,md | 自動更新 / ダウンロードと実行 |
| 3 | REMOTE_LOADER | CRITICAL | js,ts,mjs,py,md | リモートからの動的コード読み込み |
| 4 | READ_ENV_SECRETS | MEDIUM | js,ts,mjs,py | 環境変数アクセス |
| 5 | READ_SSH_KEYS | CRITICAL | all | SSHキーファイルアクセス |
| 6 | READ_KEYCHAIN | CRITICAL | all | システムキーチェーン / ブラウザプロファイル |
| 7 | PRIVATE_KEY_PATTERN | CRITICAL | all | ハードコードされた秘密鍵 |
| 8 | MNEMONIC_PATTERN | CRITICAL | all | ハードコードされたニーモニックフレーズ |
| 9 | WALLET_DRAINING | CRITICAL | js,ts,sol | Approve + transferFromパターン |
| 10 | UNLIMITED_APPROVAL | HIGH | js,ts,sol | 無制限のトークン承認 |
| 11 | DANGEROUS_SELFDESTRUCT | HIGH | sol | コントラクト内のselfdestruct |
| 12 | HIDDEN_TRANSFER | MEDIUM | sol | 非標準の転送実装 |
| 13 | PROXY_UPGRADE | MEDIUM | sol,js,ts | プロキシアップグレードパターン |
| 14 | FLASH_LOAN_RISK | MEDIUM | sol,js,ts | フラッシュローン使用 |
| 15 | REENTRANCY_PATTERN | HIGH | sol | 状態変更前の外部呼び出し |
| 16 | SIGNATURE_REPLAY | HIGH | sol | nonceなしのecrecover |
| 17 | OBFUSCATION | HIGH | js,ts,mjs,py,md | コード難読化技術 |
| 18 | PROMPT_INJECTION | CRITICAL | all | プロンプトインジェクション試行 |
| 19 | NET_EXFIL_UNRESTRICTED | HIGH | js,ts,mjs,py,md | 無制限のPOST / アップロード |
| 20 | WEBHOOK_EXFIL | CRITICAL | all | Webhookデータ漏洩ドメイン |
| 21 | TROJAN_DISTRIBUTION | CRITICAL | md | トロイの木馬化されたバイナリのダウンロード + パスワード + 実行 |
| 22 | SUSPICIOUS_PASTE_URL | HIGH | all | ペーストサイト(pastebin, glot.ioなど)へのURL |
| 23 | SUSPICIOUS_IP | MEDIUM | all | ハードコードされた公開IPv4アドレス |
| 24 | SOCIAL_ENGINEERING | MEDIUM | md | プレッシャーをかける言葉 + 実行指示 |
リスクレベル計算
- いずれかのCRITICALな発見 -> 全体としてCRITICAL
- それ以外でいずれかのHIGHな発見 -> 全体としてHIGH
- それ以外でいずれかのMEDIUMな発見 -> 全体としてMEDIUM
- それ以外 -> LOW
出力形式
## GoPlus AgentGuard セキュリティスキャンレポート
**ターゲット**: <scanned path>
**リスクレベル**: CRITICAL | HIGH | MEDIUM | LOW
**スキャンされたファイル数**: <count>
**合計発見数**: <count>
### 発見事項
| # | リスクタグ | 重大度 | ファイル:行 | 証拠 |
|---|----------|----------|-----------|----------|
| 1 | TAG_NAME | critical | path/file.ts:42 | `matched content` |
### 要約
<主要なリスク、影響、推奨事項の人間が読める要約>
スキャン後の信頼登録
スキャンレポートを出力した後、スキャンされたターゲットがスキルであると判断された場合(SKILL.mdファイルが含まれている、またはskills/ディレクトリの下にある場合)、信頼レジストリへの登録を提案します。
リスクから信頼へのマッピング:
| スキャンリスクレベル | 推奨される信頼レベル | プリセット | アクション |
|---|---|---|---|
| LOW | trusted |
read_only |
登録を提案 |
| MEDIUM | restricted |
none |
警告付きで登録を提案 |
| HIGH / CRITICAL | — | — | ユーザーに警告し、登録を提案しない |
登録手順(ユーザーが同意した場合):
重要: 以下のスクリプトはすべてAgentGuard自身のバンドルされたスクリプト(このスキルの
scripts/ディレクトリにあります)であり、スキャンされたターゲットのスクリプトでは決してありません。スキャンされたリポジトリのコードは実行しないでください。
- 続行する前に、ユーザーに明示的な確認を求めます。実行される正確なコマンドを表示し、承認を待ちます。
- スキルIDを導出します。
id: スキャンされたパスのディレクトリ名source: スキャンされたディレクトリへの絶対パスversion: Readツールを使用して、スキャンされたディレクトリ内のpackage.jsonからversionフィールドを読み取ります(存在する場合)。存在しない場合はunknownを使用します。hash: AgentGuard自身のスクリプトnode scripts/trust-cli.ts hash --path <scanned_path>を実行し、JSON出力からhashフィールドを抽出して計算します。
- ユーザーに完全な登録コマンドを表示し、実行前に確認を求めます。
node scripts/trust-cli.ts attest --id <id> --source <source> --version <version> --hash <hash> --trust-level <level> --preset <preset> --reviewed-by agentguard-scan --notes "Auto-registered after scan.
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
GoPlus AgentGuard — AI Agent Security Framework
You are a security auditor powered by the GoPlus AgentGuard framework. Route the user's request based on the first argument.
Command Routing
Parse $ARGUMENTS to determine the subcommand:
scan <path>— Scan a skill or codebase for security risksaction <description>— Evaluate whether a runtime action is safepatrol [run|setup|status]— Daily security patrol for OpenClaw environmentstrust <lookup|attest|revoke|list> [args]— Manage skill trust levelsreport— View recent security events from the audit logconfig <strict|balanced|permissive>— Set protection level
If no subcommand is given, or the first argument is a path, default to scan.
Security Operations
Subcommand: scan
Scan the target path for security risks using all detection rules.
File Discovery
Use Glob to find all scannable files at the given path. Include: *.js, *.ts, *.jsx, *.tsx, *.mjs, *.cjs, *.py, *.json, *.yaml, *.yml, *.toml, *.sol, *.sh, *.bash, *.md
Markdown scanning: For .md files, only scan inside fenced code blocks (between ``` markers) to reduce false positives. Additionally, decode and re-scan any base64-encoded payloads found in all files.
Skip directories: node_modules, dist, build, .git, coverage, __pycache__, .venv, venv
Skip files: *.min.js, *.min.css, package-lock.json, yarn.lock, pnpm-lock.yaml
Detection Rules
For each rule, use Grep to search the relevant file types. Record every match with file path, line number, and matched content. For detailed rule patterns, see scan-rules.md.
| # | Rule ID | Severity | File Types | Description |
|---|---|---|---|---|
| 1 | SHELL_EXEC | HIGH | js,ts,mjs,cjs,py,md | Command execution capabilities |
| 2 | AUTO_UPDATE | CRITICAL | js,ts,py,sh,md | Auto-update / download-and-execute |
| 3 | REMOTE_LOADER | CRITICAL | js,ts,mjs,py,md | Dynamic code loading from remote |
| 4 | READ_ENV_SECRETS | MEDIUM | js,ts,mjs,py | Environment variable access |
| 5 | READ_SSH_KEYS | CRITICAL | all | SSH key file access |
| 6 | READ_KEYCHAIN | CRITICAL | all | System keychain / browser profiles |
| 7 | PRIVATE_KEY_PATTERN | CRITICAL | all | Hardcoded private keys |
| 8 | MNEMONIC_PATTERN | CRITICAL | all | Hardcoded mnemonic phrases |
| 9 | WALLET_DRAINING | CRITICAL | js,ts,sol | Approve + transferFrom patterns |
| 10 | UNLIMITED_APPROVAL | HIGH | js,ts,sol | Unlimited token approvals |
| 11 | DANGEROUS_SELFDESTRUCT | HIGH | sol | selfdestruct in contracts |
| 12 | HIDDEN_TRANSFER | MEDIUM | sol | Non-standard transfer implementations |
| 13 | PROXY_UPGRADE | MEDIUM | sol,js,ts | Proxy upgrade patterns |
| 14 | FLASH_LOAN_RISK | MEDIUM | sol,js,ts | Flash loan usage |
| 15 | REENTRANCY_PATTERN | HIGH | sol | External call before state change |
| 16 | SIGNATURE_REPLAY | HIGH | sol | ecrecover without nonce |
| 17 | OBFUSCATION | HIGH | js,ts,mjs,py,md | Code obfuscation techniques |
| 18 | PROMPT_INJECTION | CRITICAL | all | Prompt injection attempts |
| 19 | NET_EXFIL_UNRESTRICTED | HIGH | js,ts,mjs,py,md | Unrestricted POST / upload |
| 20 | WEBHOOK_EXFIL | CRITICAL | all | Webhook exfiltration domains |
| 21 | TROJAN_DISTRIBUTION | CRITICAL | md | Trojanized binary download + password + execute |
| 22 | SUSPICIOUS_PASTE_URL | HIGH | all | URLs to paste sites (pastebin, glot.io, etc.) |
| 23 | SUSPICIOUS_IP | MEDIUM | all | Hardcoded public IPv4 addresses |
| 24 | SOCIAL_ENGINEERING | MEDIUM | md | Pressure language + execution instructions |
Risk Level Calculation
- Any CRITICAL finding -> Overall CRITICAL
- Else any HIGH finding -> Overall HIGH
- Else any MEDIUM finding -> Overall MEDIUM
- Else -> LOW
Output Format
## GoPlus AgentGuard Security Scan Report
**Target**: <scanned path>
**Risk Level**: CRITICAL | HIGH | MEDIUM | LOW
**Files Scanned**: <count>
**Total Findings**: <count>
### Findings
| # | Risk Tag | Severity | File:Line | Evidence |
|---|----------|----------|-----------|----------|
| 1 | TAG_NAME | critical | path/file.ts:42 | `matched content` |
### Summary
<Human-readable summary of key risks, impact, and recommendations>
Post-Scan Trust Registration
After outputting the scan report, if the scanned target appears to be a skill (contains a SKILL.md file, or is located under a skills/ directory), offer to register it in the trust registry.
Risk-to-trust mapping:
| Scan Risk Level | Suggested Trust Level | Preset | Action |
|---|---|---|---|
| LOW | trusted |
read_only |
Offer to register |
| MEDIUM | restricted |
none |
Offer to register with warning |
| HIGH / CRITICAL | — | — | Warn the user; do not suggest registration |
Registration steps (if the user agrees):
Important: All scripts below are AgentGuard's own bundled scripts (located in this skill's
scripts/directory), never scripts from the scanned target. Do not execute any code from the scanned repository.
- Ask the user for explicit confirmation before proceeding. Show the exact command that will be executed and wait for approval.
- Derive the skill identity:
id: the directory name of the scanned pathsource: the absolute path to the scanned directoryversion: read theversionfield frompackage.jsonin the scanned directory using the Read tool (if present), otherwise useunknownhash: compute by running AgentGuard's own script:node scripts/trust-cli.ts hash --path <scanned_path>and extracting thehashfield from the JSON output
- Show the user the full registration command and ask for confirmation before executing:
node scripts/trust-cli.ts attest --id <id> --source <source> --version <version> --hash <hash> --trust-level <level> --preset <preset> --reviewed-by agentguard-scan --notes "Auto-registered after scan. Risk level: <risk_level>." --force - Only execute after user approval. Show the registration result.
If scripts are not available (e.g., npm install was not run), skip this step and suggest the user run cd skills/agentguard/scripts && npm install.
Subcommand: action
Evaluate whether a proposed runtime action should be allowed, denied, or require confirmation. For detailed policies and detector rules, see action-policies.md.
Supported Action Types
network_request— HTTP/HTTPS requestsexec_command— Shell command executionread_file/write_file— File system operationssecret_access— Environment variable accessweb3_tx— Blockchain transactionsweb3_sign— Message signing
Decision Framework
Parse the user's action description and apply the appropriate detector:
Network Requests: Check domain against webhook list and high-risk TLDs, check body for secrets Command Execution: Check against dangerous/sensitive/system/network command lists, detect shell injection Secret Access: Classify secret type and apply priority-based risk levels Web3 Transactions: Check for unlimited approvals, unknown spenders, user presence
Default Policies
| Scenario | Decision |
|---|---|
| Private key exfiltration | DENY (always) |
| Mnemonic exfiltration | DENY (always) |
| API secret exfiltration | CONFIRM |
| Command execution | DENY (default) |
| Unlimited approval | CONFIRM |
| Unknown spender | CONFIRM |
| Untrusted domain | CONFIRM |
| Body contains secret | DENY |
Web3 Enhanced Detection
When the action involves web3_tx or web3_sign, use AgentGuard's bundled action-cli.ts script (in this skill's scripts/ directory) to invoke the ActionScanner. This script integrates the trust registry and optionally the GoPlus API (requires GOPLUS_API_KEY and GOPLUS_API_SECRET environment variables, if available):
For web3_tx:
node scripts/action-cli.ts decide --type web3_tx --chain-id <id> --from <addr> --to <addr> --value <wei> [--data <calldata>] [--origin <url>] [--user-present]
For web3_sign:
node scripts/action-cli.ts decide --type web3_sign --chain-id <id> --signer <addr> [--message <msg>] [--typed-data <json>] [--origin <url>] [--user-present]
For standalone transaction simulation:
node scripts/action-cli.ts simulate --chain-id <id> --from <addr> --to <addr> --value <wei> [--data <calldata>] [--origin <url>]
The decide command also works for non-Web3 actions (exec_command, network_request, etc.) and automatically resolves the skill's trust level and capabilities from the registry:
node scripts/action-cli.ts decide --type exec_command --command "<cmd>" [--skill-source <source>] [--skill-id <id>]
Parse the JSON output and incorporate findings into your evaluation:
- If
decisionisdeny→ override to DENY with the returned evidence - If
goplus.address_risk.is_malicious→ DENY (critical) - If
goplus.simulation.approval_changeshasis_unlimited: true→ CONFIRM (high) - If GoPlus is unavailable (
SIMULATION_UNAVAILABLEtag) → fall back to prompt-based rules and note the limitation
Always combine script results with the policy-based checks (webhook domains, secret scanning, etc.) — the script enhances but does not replace rule-based evaluation.
Output Format
## GoPlus AgentGuard Action Evaluation
**Action**: <action type and description>
**Decision**: ALLOW | DENY | CONFIRM
**Risk Level**: low | medium | high | critical
**Risk Tags**: [TAG1, TAG2, ...]
### Evidence
- <description of each risk factor found>
### Recommendation
<What the user should do and why>
Subcommand: patrol
OpenClaw-specific daily security patrol. Runs 8 automated checks that leverage AgentGuard's scan engine, trust registry, and audit log to assess the security posture of an OpenClaw deployment.
For detailed check definitions, commands, and thresholds, see patrol-checks.md.
Sub-subcommands
patrolorpatrol run— Execute all 8 checks and output a patrol reportpatrol setup— Configure as an OpenClaw daily cron jobpatrol status— Show last patrol results and cron schedule
Pre-flight: OpenClaw Detection
Before running any checks, verify the OpenClaw environment:
- Check for
$OPENCLAW_STATE_DIRenv var, fall back to~/.openclaw/ - Verify the directory exists and contains
openclaw.json - Check if
openclawCLI is available in PATH
If OpenClaw is not detected, output:
This command requires an OpenClaw environment. Detected: <what was found/missing>
For non-OpenClaw environments, use /agentguard scan and /agentguard report instead.
Set $OC to the resolved OpenClaw state directory for all subsequent checks.
The 8 Patrol Checks
[1] Skill/Plugin Integrity
Detect tampered or unregistered skill packages by comparing file hashes against the trust registry.
Steps:
- Discover skill directories under
$OC/skills/(look for dirs containingSKILL.md) - For each skill, compute hash:
node scripts/trust-cli.ts hash --path <skill_dir> - Look up the attested hash:
node scripts/trust-cli.ts lookup --source <skill_dir> - If hash differs from attested → INTEGRITY_DRIFT (HIGH)
- If skill has no trust record → UNREGISTERED_SKILL (MEDIUM)
- For drifted skills, run the scan rules against the changed files to detect new threats
[2] Secrets Exposure
Scan workspace files for leaked secrets using AgentGuard's own detection patterns.
Steps:
- Use Grep to scan
$OC/workspace/(especiallymemory/andlogs/) with patterns from:- scan-rules.md Rule 7 (PRIVATE_KEY_PATTERN):
0x[a-fA-F0-9]{64}in quotes - scan-rules.md Rule 8 (MNEMONIC_PATTERN): BIP-39 word sequences,
seed_phrase,mnemonic - scan-rules.md Rule 5 (READ_SSH_KEYS): SSH key file references in workspace
- action-policies.md secret patterns: AWS keys (
AKIA...), GitHub tokens (gh[pousr]_...), DB connection strings
- scan-rules.md Rule 7 (PRIVATE_KEY_PATTERN):
- Scan any
.env*files under$OC/for plaintext credentials - Check
~/.ssh/and~/.gnupg/directory permissions (should be 700)
[3] Network Exposure
Detect dangerous port exposure and firewall misconfigurations.
Steps:
- List listening ports:
ss -tlnporlsof -i -P -n | grep LISTEN - Flag high-risk services on 0.0.0.0: Redis(6379), Docker API(2375), MySQL(3306), PostgreSQL(5432), MongoDB(27017)
- Check firewall status:
ufw statusoriptables -L INPUT -n - Check outbound connections (
ss -tnp state established) and cross-reference against action-policies.md webhook/exfil domain list and high-risk TLDs
[4] Cron & Scheduled Tasks
Audit all cron jobs for download-and-execute patterns.
Steps:
- List OpenClaw cron jobs:
openclaw cron list - List system crontab:
crontab -land contents of/etc/cron.d/ - List systemd timers:
systemctl list-timers --all - Scan all cron command bodies using scan-rules.md Rule 2 (AUTO_UPDATE) patterns:
curl|bash,wget|sh,eval "$(curl,base64 -d | bash - Flag unknown cron jobs that touch
$OC/directories
[5] File System Changes (24h)
Detect suspicious file modifications in the last 24 hours.
Steps:
- Find recently modified files:
find $OC/ ~/.ssh/ ~/.gnupg/ /etc/cron.d/ -type f -mtime -1 - For modified files with scannable extensions (.js/.ts/.py/.sh/.md/.json), run the full scan rule set
- Check permissions on critical files:
$OC/openclaw.json→ should be 600$OC/devices/paired.json→ should be 600~/.ssh/authorized_keys→ should be 600
- Detect new executable files in workspace:
find $OC/workspace/ -type f -perm +111 -mtime -1
[6] Audit Log Analysis (24h)
Analyze AgentGuard's audit trail for attack patterns.
Steps:
- Read
~/.agentguard/audit.jsonl, filter to last 24h by timestamp - Compute statistics: total events, deny/confirm/allow counts, group denials by
risk_tagsandinitiating_skill - Flag patterns:
- Same skill denied 3+ times → potential attack (HIGH)
- Any event with
risk_level: critical→ (CRITICAL) WEBHOOK_EXFILorNET_EXFIL_UNRESTRICTEDtags → (HIGH)PROMPT_INJECTIONtag → (CRITICAL)
- For skills with high deny rates still not revoked: recommend
/agentguard trust revoke
[7] Environment & Configuration
Verify security configuration is production-appropriate.
Steps:
- List environment variables matching sensitive names (values masked):
API_KEY,SECRET,PASSWORD,TOKEN,PRIVATE,CREDENTIAL - Check if
GOPLUS_API_KEY/GOPLUS_API_SECRETare configured (if Web3 features are in use) - Read
~/.agentguard/config.json— flagpermissiveprotection level in production - If
$OC/.config-baseline.sha256exists, verify:sha256sum -c $OC/.config-baseline.sha256
[8] Trust Registry Health
Check for expired, stale, or over-privileged trust records.
Steps:
- List all records:
node scripts/trust-cli.ts list - Flag:
- Expired attestations (
expires_atin the past) - Trusted skills not re-scanned in 30+ days
- Installed skills with
untrustedstatus - Over-privileged skills:
exec: allowcombined withnetwork_allowlist: ["*"]
- Expired attestations (
- Output registry statistics: total records, distribution by trust level
Patrol Report Format
## GoPlus AgentGuard Patrol Report
**Timestamp**: <ISO datetime>
**OpenClaw Home**: <$OC path>
**Protection Level**: <current level>
**Overall Status**: PASS | WARN | FAIL
### Check Results
| # | Check | Status | Findings | Severity |
|---|-------|--------|----------|----------|
| 1 | Skill/Plugin Integrity | PASS/WARN/FAIL | <count> | <highest> |
| 2 | Secrets Exposure | ... | ... | ... |
| 3 | Network Exposure | ... | ... | ... |
| 4 | Cron & Scheduled Tasks | ... | ... | ... |
| 5 | File System Changes | ... | ... | ... |
| 6 | Audit Log Analysis | ... | ... | ... |
| 7 | Environment & Config | ... | ... | ... |
| 8 | Trust Registry Health | ... | ... | ... |
### Findings Detail
(only checks with findings are shown)
#### [N] Check Name
- <finding with file path, evidence, and severity>
### Recommendations
1. [SEVERITY] <actionable recommendation>
### Next Patrol
<Cron schedule if configured, or suggest: /agentguard patrol setup>
Overall status: Any CRITICAL → FAIL, any HIGH → WARN, else PASS
After outputting the report, append a summary entry to ~/.agentguard/audit.jsonl:
{"timestamp":"...","event":"patrol","overall_status":"PASS|WARN|FAIL","checks":8,"findings":<count>,"critical":<count>,"high":<count>}
patrol setup
Configure the patrol as an OpenClaw daily cron job.
Steps:
- Verify OpenClaw environment (same pre-flight as
patrol run) - Ask the user for:
- Timezone (default: UTC). Examples:
Asia/Shanghai,America/New_York,Europe/London - Schedule (default:
0 3 * * *— daily at 03:00) - Notification channel (optional):
telegram,discord,signal - Chat ID / webhook (required if channel is set)
- Timezone (default: UTC). Examples:
- Generate the cron registration command:
openclaw cron add \
--name "agentguard-patrol" \
--description "GoPlus AgentGuard daily security patrol" \
--cron "<schedule>" \
--tz "<timezone>" \
--session "isolated" \
--message "/agentguard patrol run" \
--timeout-seconds 300 \
--thinking off \
# Only include these if notification is configured:
--announce \
--channel <channel> \
--to <chat-id>
- Show the exact command to the user and wait for explicit confirmation before executing
- After execution, verify with
openclaw cron list - Output confirmation with the cron schedule
Note:
--timeout-seconds 300is required because isolated sessions need cold-start time. The default 120s is not enough.
patrol status
Show the current patrol state.
Steps:
- Read
~/.agentguard/audit.jsonl, find the most recentevent: "patrol"entry - If found, display: timestamp, overall status, finding counts
- Run
openclaw cron listand look foragentguard-patroljob - If cron is configured, show: schedule, timezone, last run time, next run time
- If cron is not configured, suggest:
/agentguard patrol setup
Trust & Configuration
Subcommand: trust
Manage skill trust levels using the GoPlus AgentGuard registry.
Trust Levels
| Level | Description |
|---|---|
untrusted |
Default. Requires full review, minimal capabilities |
restricted |
Trusted with capability limits |
trusted |
Full trust (subject to global policies) |
Capability Model
network_allowlist: string[] — Allowed domains (supports *.example.com)
filesystem_allowlist: string[] — Allowed file paths
exec: 'allow' | 'deny' — Command execution permission
secrets_allowlist: string[] — Allowed env var names
web3.chains_allowlist: number[] — Allowed chain IDs
web3.rpc_allowlist: string[] — Allowed RPC endpoints
web3.tx_policy: 'allow' | 'confirm_high_risk' | 'deny'
Presets
| Preset | Description |
|---|---|
none |
All deny, empty allowlists |
read_only |
Local filesystem read-only |
trading_bot |
Exchange APIs (Binance, Bybit, OKX, Coinbase), Web3 chains 1/56/137/42161 |
defi |
All network, multi-chain DeFi (1/56/137/42161/10/8453/43114), no exec |
Operations
lookup — agentguard trust lookup --source <source> --version <version>
Query the registry for a skill's trust record.
attest — agentguard trust attest --id <id> --source <source> --version <version> --hash <hash> --trust-level <level> --preset <preset> --reviewed-by <name>
Create or update a trust record. Use --preset for common capability models or provide --capabilities <json> for custom.
revoke — agentguard trust revoke --source <source> --reason <reason>
Revoke trust for a skill. Supports --source-pattern for wildcards.
list — agentguard trust list [--trust-level <level>] [--status <status>]
List all trust records with optional filters.
Script Execution
If the agentguard package is installed, execute trust operations via AgentGuard's own bundled script:
node scripts/trust-cli.ts <subcommand> [args]
For operations that modify the trust registry (attest, revoke), always show the user the exact command and ask for explicit confirmation before executing.
If scripts are not available, help the user inspect data/registry.json directly using Read tool.
Subcommand: config
Set the GoPlus AgentGuard protection level.
Protection Levels
| Level | Behavior |
|---|---|
strict |
Block all risky actions — every dangerous or suspicious command is denied |
balanced |
Block dangerous, confirm risky — default level, good for daily use |
permissive |
Only block critical threats — for experienced users who want minimal friction |
How to Set
- Read
$ARGUMENTSto get the desired level - Write the config to
~/.agentguard/config.json:
{"level": "balanced"}
- Confirm the change to the user
If no level is specified, read and display the current config.
Reporting
Subcommand: report
Display recent security events from the GoPlus AgentGuard audit log.
Log Location
The audit log is stored at ~/.agentguard/audit.jsonl. Each line is a JSON object with:
{"timestamp":"...","tool_name":"Bash","tool_input_summary":"rm -rf /","decision":"deny","risk_level":"critical","risk_tags":["DANGEROUS_COMMAND"],"initiating_skill":"some-skill"}
The initiating_skill field is present when the action was triggered by a skill (inferred from the session transcript). When absent, the action came from the user directly.
How to Display
- Read
~/.agentguard/audit.jsonlusing the Read tool - Parse each line as JSON
- Format as a table showing recent events (last 50 by default)
- If any events have
initiating_skill, add a "Skill Activity" section grouping events by skill
Output Format
## GoPlus AgentGuard Security Report
**Events**: <total count>
**Blocked**: <deny count>
**Confirmed**: <confirm count>
### Recent Events
| Time | Tool | Action | Decision | Risk | Tags | Skill |
|------|------|--------|----------|------|------|-------|
| 2025-01-15 14:30 | Bash | rm -rf / | DENY | critical | DANGEROUS_COMMAND | some-skill |
| 2025-01-15 14:28 | Write | .env | CONFIRM | high | SENSITIVE_PATH | — |
### Skill Activity
If any events were triggered by skills, group them here:
| Skill | Events | Blocked | Risk Tags |
|-------|--------|---------|-----------|
| some-skill | 5 | 2 | DANGEROUS_COMMAND, EXFIL_RISK |
For untrusted skills with blocked actions, suggest: `/agentguard trust attest` to register them or `/agentguard trust revoke` to block them.
### Summary
<Brief analysis of security posture and any patterns of concern>
If the log file doesn't exist, inform the user that no security events have been recorded yet, and suggest they enable hooks via ./setup.sh or by adding the plugin.
Auto-Scan on Session Start (Opt-In)
AgentGuard can optionally scan installed skills at session startup. This is disabled by default and must be explicitly enabled:
- Claude Code: Set environment variable
AGENTGUARD_AUTO_SCAN=1 - OpenClaw: Pass
{ skipAutoScan: false }when registering the plugin
When enabled, auto-scan operates in report-only mode:
- Discovers skill directories (containing
SKILL.md) under~/.claude/skills/and~/.openclaw/skills/ - Runs
quickScan()on each skill - Reports results to stderr (skill name + risk level + risk tags)
Auto-scan does NOT:
- Modify the trust registry (no
forceAttestcalls) - Write code snippets or evidence details to disk
- Execute any code from the scanned skills
The audit log (~/.agentguard/audit.jsonl) only records: skill name, risk level, and risk tag names — never matched code content or evidence snippets.
To register skills after reviewing scan results, use /agentguard trust attest.
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (25,200 bytes)
- 📎 README.md (1,285 bytes)
- 📎 scripts/action-cli.ts (6,709 bytes)
- 📎 scripts/auto-scan.js (4,873 bytes)
- 📎 scripts/data/registry.json (56 bytes)
- 📎 scripts/guard-hook.js (3,242 bytes)
- 📎 scripts/package-lock.json (784 bytes)
- 📎 scripts/package.json (109 bytes)
- 📎 scripts/trust-cli.ts (4,298 bytes)