[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CN7N9E7TFYXNPW16EEXPCN":3,"skill-same:01M6CN7N9E7TFYXNPW16EEXPCN":72},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":37,"linkOnly":38,"markdownContent":39,"markdownBody":40,"frontMatter":41,"refName":45,"commitSha":46,"skillDirectory":47,"forksCount":13,"repositoryHtmlUrl":48,"repositoryHomepageUrl":6,"ownerHtmlUrl":49,"ownerBlogUrl":50,"ownerDescription":51,"updatedAt":52,"install":53,"resources":65},"01M6CN7N9E7TFYXNPW16EEXPCN","agentguard",null,"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, or viewing security logs.","rbkayz\u002Fgitskills","rbkayz","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F62215539?v=4","01M6CN6H960HX15JV99D7S0RY0","01M6CN6HD56T1N2H7WT1ANK9Z9",0,"MIT","https:\u002F\u002Fgithub.com\u002Frbkayz\u002Fgitskills\u002Fblob\u002Fmain\u002Fskills\u002Fregistry\u002Fopenclaw-agentguard\u002FSKILL.md",[],[5,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36],"guard","scan","trust","ai agent security","use","read","node","grep","Bash","agent security","secrets","Safety","data","logs","report","code","config","ai agent","vulnerabilities","2026-11-10 10:12:30",false,"---\nname: agentguard\ndescription: 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, or viewing security logs.\nuser-invocable: true\nallowed-tools: Read, Grep, Glob, Bash(node *)\nargument-hint: \"[scan|action|trust|report|config] [args...]\"\n---\n\n# GoPlus AgentGuard — AI Agent Security Framework\n\nYou are a security auditor powered by the GoPlus AgentGuard framework. Route the user's request based on the first argument.\n\n## Command Routing\n\nParse `$ARGUMENTS` to determine the subcommand:\n\n- **`scan \u003Cpath>`** — Scan a skill or codebase for security risks\n- **`action \u003Cdescription>`** — Evaluate whether a runtime action is safe\n- **`trust \u003Clookup|attest|revoke|list> [args]`** — Manage skill trust levels\n- **`report`** — View recent security events from the audit log\n- **`config \u003Cstrict|balanced|permissive>`** — Set protection level\n\nIf no subcommand is given, or the first argument is a path, default to **scan**.\n\n---\n\n## Subcommand: scan\n\nScan the target path for security risks using all detection rules.\n\n### File Discovery\n\nUse 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`\n\n**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.\n\nSkip directories: `node_modules`, `dist`, `build`, `.git`, `coverage`, `__pycache__`, `.venv`, `venv`\nSkip files: `*.min.js`, `*.min.css`, `package-lock.json`, `yarn.lock`, `pnpm-lock.yaml`\n\n### Detection Rules\n\nFor 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](scan-rules.md).\n\n| # | Rule ID | Severity | File Types | Description |\n|---|---------|----------|------------|-------------|\n| 1 | SHELL_EXEC | HIGH | js,ts,mjs,cjs,py,md | Command execution capabilities |\n| 2 | AUTO_UPDATE | CRITICAL | js,ts,py,sh,md | Auto-update \u002F download-and-execute |\n| 3 | REMOTE_LOADER | CRITICAL | js,ts,mjs,py,md | Dynamic code loading from remote |\n| 4 | READ_ENV_SECRETS | MEDIUM | js,ts,mjs,py | Environment variable access |\n| 5 | READ_SSH_KEYS | CRITICAL | all | SSH key file access |\n| 6 | READ_KEYCHAIN | CRITICAL | all | System keychain \u002F browser profiles |\n| 7 | PRIVATE_KEY_PATTERN | CRITICAL | all | Hardcoded private keys |\n| 8 | MNEMONIC_PATTERN | CRITICAL | all | Hardcoded mnemonic phrases |\n| 9 | WALLET_DRAINING | CRITICAL | js,ts,sol | Approve + transferFrom patterns |\n| 10 | UNLIMITED_APPROVAL | HIGH | js,ts,sol | Unlimited token approvals |\n| 11 | DANGEROUS_SELFDESTRUCT | HIGH | sol | selfdestruct in contracts |\n| 12 | HIDDEN_TRANSFER | MEDIUM | sol | Non-standard transfer implementations |\n| 13 | PROXY_UPGRADE | MEDIUM | sol,js,ts | Proxy upgrade patterns |\n| 14 | FLASH_LOAN_RISK | MEDIUM | sol,js,ts | Flash loan usage |\n| 15 | REENTRANCY_PATTERN | HIGH | sol | External call before state change |\n| 16 | SIGNATURE_REPLAY | HIGH | sol | ecrecover without nonce |\n| 17 | OBFUSCATION | HIGH | js,ts,mjs,py,md | Code obfuscation techniques |\n| 18 | PROMPT_INJECTION | CRITICAL | all | Prompt injection attempts |\n| 19 | NET_EXFIL_UNRESTRICTED | HIGH | js,ts,mjs,py,md | Unrestricted POST \u002F upload |\n| 20 | WEBHOOK_EXFIL | CRITICAL | all | Webhook exfiltration domains |\n| 21 | TROJAN_DISTRIBUTION | CRITICAL | md | Trojanized binary download + password + execute |\n| 22 | SUSPICIOUS_PASTE_URL | HIGH | all | URLs to paste sites (pastebin, glot.io, etc.) |\n| 23 | SUSPICIOUS_IP | MEDIUM | all | Hardcoded public IPv4 addresses |\n| 24 | SOCIAL_ENGINEERING | MEDIUM | md | Pressure language + execution instructions |\n\n### Risk Level Calculation\n\n- Any **CRITICAL** finding -> Overall **CRITICAL**\n- Else any **HIGH** finding -> Overall **HIGH**\n- Else any **MEDIUM** finding -> Overall **MEDIUM**\n- Else -> **LOW**\n\n### Output Format\n\n```\n## GoPlus AgentGuard Security Scan Report\n\n**Target**: \u003Cscanned path>\n**Risk Level**: CRITICAL | HIGH | MEDIUM | LOW\n**Files Scanned**: \u003Ccount>\n**Total Findings**: \u003Ccount>\n\n### Findings\n\n| # | Risk Tag | Severity | File:Line | Evidence |\n|---|----------|----------|-----------|----------|\n| 1 | TAG_NAME | critical | path\u002Ffile.ts:42 | `matched content` |\n\n### Summary\n\u003CHuman-readable summary of key risks, impact, and recommendations>\n```\n\n### Post-Scan Trust Registration\n\nAfter outputting the scan report, if the scanned target appears to be a skill (contains a `SKILL.md` file, or is located under a `skills\u002F` directory), offer to register it in the trust registry.\n\n**Risk-to-trust mapping**:\n\n| Scan Risk Level | Suggested Trust Level | Preset | Action |\n|---|---|---|---|\n| LOW | `trusted` | `read_only` | Offer to register |\n| MEDIUM | `restricted` | `none` | Offer to register with warning |\n| HIGH \u002F CRITICAL | — | — | Warn the user; do not suggest registration |\n\n**Registration steps** (if the user agrees):\n\n1. Derive the skill identity:\n   - `id`: the directory name of the scanned path\n   - `source`: the absolute path to the scanned directory\n   - `version`: read the `version` field from `package.json` in the scanned directory (if present), otherwise use `unknown`\n   - `hash`: compute by running `node scripts\u002Ftrust-cli.ts hash --path \u003Cscanned_path>` and extracting the `hash` field from the JSON output\n2. Register via: `node scripts\u002Ftrust-cli.ts attest --id \u003Cid> --source \u003Csource> --version \u003Cversion> --hash \u003Chash> --trust-level \u003Clevel> --preset \u003Cpreset> --reviewed-by agentguard-scan --notes \"Auto-registered after scan. Risk level: \u003Crisk_level>.\" --force`\n3. Show the registration result to the user.\n\nIf scripts are not available (e.g., `npm install` was not run), skip this step and suggest the user run `cd skills\u002Fagentguard\u002Fscripts && npm install`.\n\n---\n\n## Subcommand: action\n\nEvaluate whether a proposed runtime action should be allowed, denied, or require confirmation. For detailed policies and detector rules, see [action-policies.md](action-policies.md).\n\n### Supported Action Types\n\n- `network_request` — HTTP\u002FHTTPS requests\n- `exec_command` — Shell command execution\n- `read_file` \u002F `write_file` — File system operations\n- `secret_access` — Environment variable access\n- `web3_tx` — Blockchain transactions\n- `web3_sign` — Message signing\n\n### Decision Framework\n\nParse the user's action description and apply the appropriate detector:\n\n**Network Requests**: Check domain against webhook list and high-risk TLDs, check body for secrets\n**Command Execution**: Check against dangerous\u002Fsensitive\u002Fsystem\u002Fnetwork command lists, detect shell injection\n**Secret Access**: Classify secret type and apply priority-based risk levels\n**Web3 Transactions**: Check for unlimited approvals, unknown spenders, user presence\n\n### Default Policies\n\n| Scenario | Decision |\n|----------|----------|\n| Private key exfiltration | **DENY** (always) |\n| Mnemonic exfiltration | **DENY** (always) |\n| API secret exfiltration | CONFIRM |\n| Command execution | **DENY** (default) |\n| Unlimited approval | CONFIRM |\n| Unknown spender | CONFIRM |\n| Untrusted domain | CONFIRM |\n| Body contains secret | **DENY** |\n\n### Web3 Enhanced Detection\n\nWhen the action involves **web3_tx** or **web3_sign**, use the action-cli script to invoke the ActionScanner (which integrates the trust registry and GoPlus API):\n\nFor web3_tx:\n```\nnode scripts\u002Faction-cli.ts decide --type web3_tx --chain-id \u003Cid> --from \u003Caddr> --to \u003Caddr> --value \u003Cwei> [--data \u003Ccalldata>] [--origin \u003Curl>] [--user-present]\n```\n\nFor web3_sign:\n```\nnode scripts\u002Faction-cli.ts decide --type web3_sign --chain-id \u003Cid> --signer \u003Caddr> [--message \u003Cmsg>] [--typed-data \u003Cjson>] [--origin \u003Curl>] [--user-present]\n```\n\nFor standalone transaction simulation:\n```\nnode scripts\u002Faction-cli.ts simulate --chain-id \u003Cid> --from \u003Caddr> --to \u003Caddr> --value \u003Cwei> [--data \u003Ccalldata>] [--origin \u003Curl>]\n```\n\nThe `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:\n\n```\nnode scripts\u002Faction-cli.ts decide --type exec_command --command \"\u003Ccmd>\" [--skill-source \u003Csource>] [--skill-id \u003Cid>]\n```\n\nParse the JSON output and incorporate findings into your evaluation:\n- If `decision` is `deny` → override to **DENY** with the returned evidence\n- If `goplus.address_risk.is_malicious` → **DENY** (critical)\n- If `goplus.simulation.approval_changes` has `is_unlimited: true` → **CONFIRM** (high)\n- If GoPlus is unavailable (`SIMULATION_UNAVAILABLE` tag) → fall back to prompt-based rules and note the limitation\n\nAlways combine script results with the policy-based checks (webhook domains, secret scanning, etc.) — the script enhances but does not replace rule-based evaluation.\n\n### Output Format\n\n```\n## GoPlus AgentGuard Action Evaluation\n\n**Action**: \u003Caction type and description>\n**Decision**: ALLOW | DENY | CONFIRM\n**Risk Level**: low | medium | high | critical\n**Risk Tags**: [TAG1, TAG2, ...]\n\n### Evidence\n- \u003Cdescription of each risk factor found>\n\n### Recommendation\n\u003CWhat the user should do and why>\n```\n\n---\n\n## Subcommand: trust\n\nManage skill trust levels using the GoPlus AgentGuard registry.\n\n### Trust Levels\n\n| Level | Description |\n|-------|-------------|\n| `untrusted` | Default. Requires full review, minimal capabilities |\n| `restricted` | Trusted with capability limits |\n| `trusted` | Full trust (subject to global policies) |\n\n### Capability Model\n\n```\nnetwork_allowlist: string[]     — Allowed domains (supports *.example.com)\nfilesystem_allowlist: string[]  — Allowed file paths\nexec: 'allow' | 'deny'         — Command execution permission\nsecrets_allowlist: string[]     — Allowed env var names\nweb3.chains_allowlist: number[] — Allowed chain IDs\nweb3.rpc_allowlist: string[]    — Allowed RPC endpoints\nweb3.tx_policy: 'allow' | 'confirm_high_risk' | 'deny'\n```\n\n### Presets\n\n| Preset | Description |\n|--------|-------------|\n| `none` | All deny, empty allowlists |\n| `read_only` | Local filesystem read-only |\n| `trading_bot` | Exchange APIs (Binance, Bybit, OKX, Coinbase), Web3 chains 1\u002F56\u002F137\u002F42161 |\n| `defi` | All network, multi-chain DeFi (1\u002F56\u002F137\u002F42161\u002F10\u002F8453\u002F43114), no exec |\n\n### Operations\n\n**lookup** — `agentguard trust lookup --source \u003Csource> --version \u003Cversion>`\nQuery the registry for a skill's trust record.\n\n**attest** — `agentguard trust attest --id \u003Cid> --source \u003Csource> --version \u003Cversion> --hash \u003Chash> --trust-level \u003Clevel> --preset \u003Cpreset> --reviewed-by \u003Cname>`\nCreate or update a trust record. Use `--preset` for common capability models or provide `--capabilities \u003Cjson>` for custom.\n\n**revoke** — `agentguard trust revoke --source \u003Csource> --reason \u003Creason>`\nRevoke trust for a skill. Supports `--source-pattern` for wildcards.\n\n**list** — `agentguard trust list [--trust-level \u003Clevel>] [--status \u003Cstatus>]`\nList all trust records with optional filters.\n\n### Script Execution\n\nIf the agentguard package is installed, execute trust operations via:\n```\nnode scripts\u002Ftrust-cli.ts \u003Csubcommand> [args]\n```\n\nIf scripts are not available, help the user inspect `data\u002Fregistry.json` directly using Read tool.\n\n---\n\n## Subcommand: report\n\nDisplay recent security events from the GoPlus AgentGuard audit log.\n\n### Log Location\n\nThe audit log is stored at `~\u002F.agentguard\u002Faudit.jsonl`. Each line is a JSON object with:\n\n```json\n{\"timestamp\":\"...\",\"tool_name\":\"Bash\",\"tool_input_summary\":\"rm -rf \u002F\",\"decision\":\"deny\",\"risk_level\":\"critical\",\"risk_tags\":[\"DANGEROUS_COMMAND\"],\"initiating_skill\":\"some-skill\"}\n```\n\nThe `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.\n\n### How to Display\n\n1. Read `~\u002F.agentguard\u002Faudit.jsonl` using the Read tool\n2. Parse each line as JSON\n3. Format as a table showing recent events (last 50 by default)\n4. If any events have `initiating_skill`, add a \"Skill Activity\" section grouping events by skill\n\n### Output Format\n\n```\n## GoPlus AgentGuard Security Report\n\n**Events**: \u003Ctotal count>\n**Blocked**: \u003Cdeny count>\n**Confirmed**: \u003Cconfirm count>\n\n### Recent Events\n\n| Time | Tool | Action | Decision | Risk | Tags | Skill |\n|------|------|--------|----------|------|------|-------|\n| 2025-01-15 14:30 | Bash | rm -rf \u002F | DENY | critical | DANGEROUS_COMMAND | some-skill |\n| 2025-01-15 14:28 | Write | .env | CONFIRM | high | SENSITIVE_PATH | — |\n\n### Skill Activity\n\nIf any events were triggered by skills, group them here:\n\n| Skill | Events | Blocked | Risk Tags |\n|-------|--------|---------|-----------|\n| some-skill | 5 | 2 | DANGEROUS_COMMAND, EXFIL_RISK |\n\nFor untrusted skills with blocked actions, suggest: `\u002Fagentguard trust attest` to register them or `\u002Fagentguard trust revoke` to block them.\n\n### Summary\n\u003CBrief analysis of security posture and any patterns of concern>\n```\n\nIf the log file doesn't exist, inform the user that no security events have been recorded yet, and suggest they enable hooks via `.\u002Fsetup.sh` or by adding the plugin.\n\n---\n\n## Subcommand: config\n\nSet the GoPlus AgentGuard protection level.\n\n### Protection Levels\n\n| Level | Behavior |\n|-------|----------|\n| `strict` | Block all risky actions — every dangerous or suspicious command is denied |\n| `balanced` | Block dangerous, confirm risky — default level, good for daily use |\n| `permissive` | Only block critical threats — for experienced users who want minimal friction |\n\n### How to Set\n\n1. Read `$ARGUMENTS` to get the desired level\n2. Write the config to `~\u002F.agentguard\u002Fconfig.json`:\n\n```json\n{\"level\": \"balanced\"}\n```\n\n3. Confirm the change to the user\n\nIf no level is specified, read and display the current config.\n\n---\n\n## Auto-Scan on Session Start\n\nWhen GoPlus AgentGuard is installed as a plugin, it automatically scans all skills in `~\u002F.claude\u002Fskills\u002F` at session startup:\n\n1. Discovers all skill directories (containing `SKILL.md`)\n2. Calculates artifact hash — skips skills already registered with the same hash\n3. Runs `quickScan()` on new or updated skills\n4. Auto-registers in the trust registry based on scan results:\n\n| Scan Result | Trust Level | Capabilities |\n|-------------|-------------|--------------|\n| `low` risk | `trusted` | `read_only` (filesystem read access) |\n| `medium` risk | `restricted` | `read_only` |\n| `high` \u002F `critical` risk | `untrusted` | `none` (all capabilities denied) |\n\nThis runs asynchronously and does not block session startup. Results are logged to `~\u002F.agentguard\u002Faudit.jsonl`.\n\nUsers can override auto-assigned trust levels with `\u002Fagentguard trust attest`.\n","# GoPlus AgentGuard — AI Agent Security Framework\n\nYou are a security auditor powered by the GoPlus AgentGuard framework. Route the user's request based on the first argument.\n\n## Command Routing\n\nParse `$ARGUMENTS` to determine the subcommand:\n\n- **`scan \u003Cpath>`** — Scan a skill or codebase for security risks\n- **`action \u003Cdescription>`** — Evaluate whether a runtime action is safe\n- **`trust \u003Clookup|attest|revoke|list> [args]`** — Manage skill trust levels\n- **`report`** — View recent security events from the audit log\n- **`config \u003Cstrict|balanced|permissive>`** — Set protection level\n\nIf no subcommand is given, or the first argument is a path, default to **scan**.\n\n---\n\n## Subcommand: scan\n\nScan the target path for security risks using all detection rules.\n\n### File Discovery\n\nUse 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`\n\n**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.\n\nSkip directories: `node_modules`, `dist`, `build`, `.git`, `coverage`, `__pycache__`, `.venv`, `venv`\nSkip files: `*.min.js`, `*.min.css`, `package-lock.json`, `yarn.lock`, `pnpm-lock.yaml`\n\n### Detection Rules\n\nFor 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](scan-rules.md).\n\n| # | Rule ID | Severity | File Types | Description |\n|---|---------|----------|------------|-------------|\n| 1 | SHELL_EXEC | HIGH | js,ts,mjs,cjs,py,md | Command execution capabilities |\n| 2 | AUTO_UPDATE | CRITICAL | js,ts,py,sh,md | Auto-update \u002F download-and-execute |\n| 3 | REMOTE_LOADER | CRITICAL | js,ts,mjs,py,md | Dynamic code loading from remote |\n| 4 | READ_ENV_SECRETS | MEDIUM | js,ts,mjs,py | Environment variable access |\n| 5 | READ_SSH_KEYS | CRITICAL | all | SSH key file access |\n| 6 | READ_KEYCHAIN | CRITICAL | all | System keychain \u002F browser profiles |\n| 7 | PRIVATE_KEY_PATTERN | CRITICAL | all | Hardcoded private keys |\n| 8 | MNEMONIC_PATTERN | CRITICAL | all | Hardcoded mnemonic phrases |\n| 9 | WALLET_DRAINING | CRITICAL | js,ts,sol | Approve + transferFrom patterns |\n| 10 | UNLIMITED_APPROVAL | HIGH | js,ts,sol | Unlimited token approvals |\n| 11 | DANGEROUS_SELFDESTRUCT | HIGH | sol | selfdestruct in contracts |\n| 12 | HIDDEN_TRANSFER | MEDIUM | sol | Non-standard transfer implementations |\n| 13 | PROXY_UPGRADE | MEDIUM | sol,js,ts | Proxy upgrade patterns |\n| 14 | FLASH_LOAN_RISK | MEDIUM | sol,js,ts | Flash loan usage |\n| 15 | REENTRANCY_PATTERN | HIGH | sol | External call before state change |\n| 16 | SIGNATURE_REPLAY | HIGH | sol | ecrecover without nonce |\n| 17 | OBFUSCATION | HIGH | js,ts,mjs,py,md | Code obfuscation techniques |\n| 18 | PROMPT_INJECTION | CRITICAL | all | Prompt injection attempts |\n| 19 | NET_EXFIL_UNRESTRICTED | HIGH | js,ts,mjs,py,md | Unrestricted POST \u002F upload |\n| 20 | WEBHOOK_EXFIL | CRITICAL | all | Webhook exfiltration domains |\n| 21 | TROJAN_DISTRIBUTION | CRITICAL | md | Trojanized binary download + password + execute |\n| 22 | SUSPICIOUS_PASTE_URL | HIGH | all | URLs to paste sites (pastebin, glot.io, etc.) |\n| 23 | SUSPICIOUS_IP | MEDIUM | all | Hardcoded public IPv4 addresses |\n| 24 | SOCIAL_ENGINEERING | MEDIUM | md | Pressure language + execution instructions |\n\n### Risk Level Calculation\n\n- Any **CRITICAL** finding -> Overall **CRITICAL**\n- Else any **HIGH** finding -> Overall **HIGH**\n- Else any **MEDIUM** finding -> Overall **MEDIUM**\n- Else -> **LOW**\n\n### Output Format\n\n```\n## GoPlus AgentGuard Security Scan Report\n\n**Target**: \u003Cscanned path>\n**Risk Level**: CRITICAL | HIGH | MEDIUM | LOW\n**Files Scanned**: \u003Ccount>\n**Total Findings**: \u003Ccount>\n\n### Findings\n\n| # | Risk Tag | Severity | File:Line | Evidence |\n|---|----------|----------|-----------|----------|\n| 1 | TAG_NAME | critical | path\u002Ffile.ts:42 | `matched content` |\n\n### Summary\n\u003CHuman-readable summary of key risks, impact, and recommendations>\n```\n\n### Post-Scan Trust Registration\n\nAfter outputting the scan report, if the scanned target appears to be a skill (contains a `SKILL.md` file, or is located under a `skills\u002F` directory), offer to register it in the trust registry.\n\n**Risk-to-trust mapping**:\n\n| Scan Risk Level | Suggested Trust Level | Preset | Action |\n|---|---|---|---|\n| LOW | `trusted` | `read_only` | Offer to register |\n| MEDIUM | `restricted` | `none` | Offer to register with warning |\n| HIGH \u002F CRITICAL | — | — | Warn the user; do not suggest registration |\n\n**Registration steps** (if the user agrees):\n\n1. Derive the skill identity:\n   - `id`: the directory name of the scanned path\n   - `source`: the absolute path to the scanned directory\n   - `version`: read the `version` field from `package.json` in the scanned directory (if present), otherwise use `unknown`\n   - `hash`: compute by running `node scripts\u002Ftrust-cli.ts hash --path \u003Cscanned_path>` and extracting the `hash` field from the JSON output\n2. Register via: `node scripts\u002Ftrust-cli.ts attest --id \u003Cid> --source \u003Csource> --version \u003Cversion> --hash \u003Chash> --trust-level \u003Clevel> --preset \u003Cpreset> --reviewed-by agentguard-scan --notes \"Auto-registered after scan. Risk level: \u003Crisk_level>.\" --force`\n3. Show the registration result to the user.\n\nIf scripts are not available (e.g., `npm install` was not run), skip this step and suggest the user run `cd skills\u002Fagentguard\u002Fscripts && npm install`.\n\n---\n\n## Subcommand: action\n\nEvaluate whether a proposed runtime action should be allowed, denied, or require confirmation. For detailed policies and detector rules, see [action-policies.md](action-policies.md).\n\n### Supported Action Types\n\n- `network_request` — HTTP\u002FHTTPS requests\n- `exec_command` — Shell command execution\n- `read_file` \u002F `write_file` — File system operations\n- `secret_access` — Environment variable access\n- `web3_tx` — Blockchain transactions\n- `web3_sign` — Message signing\n\n### Decision Framework\n\nParse the user's action description and apply the appropriate detector:\n\n**Network Requests**: Check domain against webhook list and high-risk TLDs, check body for secrets\n**Command Execution**: Check against dangerous\u002Fsensitive\u002Fsystem\u002Fnetwork command lists, detect shell injection\n**Secret Access**: Classify secret type and apply priority-based risk levels\n**Web3 Transactions**: Check for unlimited approvals, unknown spenders, user presence\n\n### Default Policies\n\n| Scenario | Decision |\n|----------|----------|\n| Private key exfiltration | **DENY** (always) |\n| Mnemonic exfiltration | **DENY** (always) |\n| API secret exfiltration | CONFIRM |\n| Command execution | **DENY** (default) |\n| Unlimited approval | CONFIRM |\n| Unknown spender | CONFIRM |\n| Untrusted domain | CONFIRM |\n| Body contains secret | **DENY** |\n\n### Web3 Enhanced Detection\n\nWhen the action involves **web3_tx** or **web3_sign**, use the action-cli script to invoke the ActionScanner (which integrates the trust registry and GoPlus API):\n\nFor web3_tx:\n```\nnode scripts\u002Faction-cli.ts decide --type web3_tx --chain-id \u003Cid> --from \u003Caddr> --to \u003Caddr> --value \u003Cwei> [--data \u003Ccalldata>] [--origin \u003Curl>] [--user-present]\n```\n\nFor web3_sign:\n```\nnode scripts\u002Faction-cli.ts decide --type web3_sign --chain-id \u003Cid> --signer \u003Caddr> [--message \u003Cmsg>] [--typed-data \u003Cjson>] [--origin \u003Curl>] [--user-present]\n```\n\nFor standalone transaction simulation:\n```\nnode scripts\u002Faction-cli.ts simulate --chain-id \u003Cid> --from \u003Caddr> --to \u003Caddr> --value \u003Cwei> [--data \u003Ccalldata>] [--origin \u003Curl>]\n```\n\nThe `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:\n\n```\nnode scripts\u002Faction-cli.ts decide --type exec_command --command \"\u003Ccmd>\" [--skill-source \u003Csource>] [--skill-id \u003Cid>]\n```\n\nParse the JSON output and incorporate findings into your evaluation:\n- If `decision` is `deny` → override to **DENY** with the returned evidence\n- If `goplus.address_risk.is_malicious` → **DENY** (critical)\n- If `goplus.simulation.approval_changes` has `is_unlimited: true` → **CONFIRM** (high)\n- If GoPlus is unavailable (`SIMULATION_UNAVAILABLE` tag) → fall back to prompt-based rules and note the limitation\n\nAlways combine script results with the policy-based checks (webhook domains, secret scanning, etc.) — the script enhances but does not replace rule-based evaluation.\n\n### Output Format\n\n```\n## GoPlus AgentGuard Action Evaluation\n\n**Action**: \u003Caction type and description>\n**Decision**: ALLOW | DENY | CONFIRM\n**Risk Level**: low | medium | high | critical\n**Risk Tags**: [TAG1, TAG2, ...]\n\n### Evidence\n- \u003Cdescription of each risk factor found>\n\n### Recommendation\n\u003CWhat the user should do and why>\n```\n\n---\n\n## Subcommand: trust\n\nManage skill trust levels using the GoPlus AgentGuard registry.\n\n### Trust Levels\n\n| Level | Description |\n|-------|-------------|\n| `untrusted` | Default. Requires full review, minimal capabilities |\n| `restricted` | Trusted with capability limits |\n| `trusted` | Full trust (subject to global policies) |\n\n### Capability Model\n\n```\nnetwork_allowlist: string[]     — Allowed domains (supports *.example.com)\nfilesystem_allowlist: string[]  — Allowed file paths\nexec: 'allow' | 'deny'         — Command execution permission\nsecrets_allowlist: string[]     — Allowed env var names\nweb3.chains_allowlist: number[] — Allowed chain IDs\nweb3.rpc_allowlist: string[]    — Allowed RPC endpoints\nweb3.tx_policy: 'allow' | 'confirm_high_risk' | 'deny'\n```\n\n### Presets\n\n| Preset | Description |\n|--------|-------------|\n| `none` | All deny, empty allowlists |\n| `read_only` | Local filesystem read-only |\n| `trading_bot` | Exchange APIs (Binance, Bybit, OKX, Coinbase), Web3 chains 1\u002F56\u002F137\u002F42161 |\n| `defi` | All network, multi-chain DeFi (1\u002F56\u002F137\u002F42161\u002F10\u002F8453\u002F43114), no exec |\n\n### Operations\n\n**lookup** — `agentguard trust lookup --source \u003Csource> --version \u003Cversion>`\nQuery the registry for a skill's trust record.\n\n**attest** — `agentguard trust attest --id \u003Cid> --source \u003Csource> --version \u003Cversion> --hash \u003Chash> --trust-level \u003Clevel> --preset \u003Cpreset> --reviewed-by \u003Cname>`\nCreate or update a trust record. Use `--preset` for common capability models or provide `--capabilities \u003Cjson>` for custom.\n\n**revoke** — `agentguard trust revoke --source \u003Csource> --reason \u003Creason>`\nRevoke trust for a skill. Supports `--source-pattern` for wildcards.\n\n**list** — `agentguard trust list [--trust-level \u003Clevel>] [--status \u003Cstatus>]`\nList all trust records with optional filters.\n\n### Script Execution\n\nIf the agentguard package is installed, execute trust operations via:\n```\nnode scripts\u002Ftrust-cli.ts \u003Csubcommand> [args]\n```\n\nIf scripts are not available, help the user inspect `data\u002Fregistry.json` directly using Read tool.\n\n---\n\n## Subcommand: report\n\nDisplay recent security events from the GoPlus AgentGuard audit log.\n\n### Log Location\n\nThe audit log is stored at `~\u002F.agentguard\u002Faudit.jsonl`. Each line is a JSON object with:\n\n```json\n{\"timestamp\":\"...\",\"tool_name\":\"Bash\",\"tool_input_summary\":\"rm -rf \u002F\",\"decision\":\"deny\",\"risk_level\":\"critical\",\"risk_tags\":[\"DANGEROUS_COMMAND\"],\"initiating_skill\":\"some-skill\"}\n```\n\nThe `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.\n\n### How to Display\n\n1. Read `~\u002F.agentguard\u002Faudit.jsonl` using the Read tool\n2. Parse each line as JSON\n3. Format as a table showing recent events (last 50 by default)\n4. If any events have `initiating_skill`, add a \"Skill Activity\" section grouping events by skill\n\n### Output Format\n\n```\n## GoPlus AgentGuard Security Report\n\n**Events**: \u003Ctotal count>\n**Blocked**: \u003Cdeny count>\n**Confirmed**: \u003Cconfirm count>\n\n### Recent Events\n\n| Time | Tool | Action | Decision | Risk | Tags | Skill |\n|------|------|--------|----------|------|------|-------|\n| 2025-01-15 14:30 | Bash | rm -rf \u002F | DENY | critical | DANGEROUS_COMMAND | some-skill |\n| 2025-01-15 14:28 | Write | .env | CONFIRM | high | SENSITIVE_PATH | — |\n\n### Skill Activity\n\nIf any events were triggered by skills, group them here:\n\n| Skill | Events | Blocked | Risk Tags |\n|-------|--------|---------|-----------|\n| some-skill | 5 | 2 | DANGEROUS_COMMAND, EXFIL_RISK |\n\nFor untrusted skills with blocked actions, suggest: `\u002Fagentguard trust attest` to register them or `\u002Fagentguard trust revoke` to block them.\n\n### Summary\n\u003CBrief analysis of security posture and any patterns of concern>\n```\n\nIf the log file doesn't exist, inform the user that no security events have been recorded yet, and suggest they enable hooks via `.\u002Fsetup.sh` or by adding the plugin.\n\n---\n\n## Subcommand: config\n\nSet the GoPlus AgentGuard protection level.\n\n### Protection Levels\n\n| Level | Behavior |\n|-------|----------|\n| `strict` | Block all risky actions — every dangerous or suspicious command is denied |\n| `balanced` | Block dangerous, confirm risky — default level, good for daily use |\n| `permissive` | Only block critical threats — for experienced users who want minimal friction |\n\n### How to Set\n\n1. Read `$ARGUMENTS` to get the desired level\n2. Write the config to `~\u002F.agentguard\u002Fconfig.json`:\n\n```json\n{\"level\": \"balanced\"}\n```\n\n3. Confirm the change to the user\n\nIf no level is specified, read and display the current config.\n\n---\n\n## Auto-Scan on Session Start\n\nWhen GoPlus AgentGuard is installed as a plugin, it automatically scans all skills in `~\u002F.claude\u002Fskills\u002F` at session startup:\n\n1. Discovers all skill directories (containing `SKILL.md`)\n2. Calculates artifact hash — skips skills already registered with the same hash\n3. Runs `quickScan()` on new or updated skills\n4. Auto-registers in the trust registry based on scan results:\n\n| Scan Result | Trust Level | Capabilities |\n|-------------|-------------|--------------|\n| `low` risk | `trusted` | `read_only` (filesystem read access) |\n| `medium` risk | `restricted` | `read_only` |\n| `high` \u002F `critical` risk | `untrusted` | `none` (all capabilities denied) |\n\nThis runs asynchronously and does not block session startup. Results are logged to `~\u002F.agentguard\u002Faudit.jsonl`.\n\nUsers can override auto-assigned trust levels with `\u002Fagentguard trust attest`.\n",{"name":5,"description":7,"allowed-tools":42,"argument-hint":43,"user-invocable":44},"Read, Grep, Glob, Bash(node *)","[scan|action|trust|report|config] [args...]",true,"main","1c9c436312d746c2685e88d66345b8f6c55466f8","skills\u002Fregistry\u002Fopenclaw-agentguard","https:\u002F\u002Fgithub.com\u002Frbkayz\u002Fgitskills","https:\u002F\u002Fgithub.com\u002Frbkayz","https:\u002F\u002Fperiskope.app","CTO Periskope","2026-02-16 17:16:45",{"source":8,"skillName":5,"commands":54,"prompt":64,"zipAvailable":44},[55,58,61],{"tool":56,"command":57},"npx","npx skills add rbkayz\u002Fgitskills --skill agentguard",{"tool":59,"command":60},"bunx","bunx skills add rbkayz\u002Fgitskills --skill agentguard",{"tool":62,"command":63},"pnpm","pnpm dlx skills add rbkayz\u002Fgitskills --skill agentguard","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Frbkayz\u002Fgitskills\u002Fblob\u002Fmain\u002Fskills\u002Fregistry\u002Fopenclaw-agentguard\u002FSKILL.md",[66],{"path":67,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":70,"sourceHtmlUrl":71},"skill.yaml","REFERENCE","参考文档",1198,"https:\u002F\u002Fgithub.com\u002Frbkayz\u002Fgitskills\u002Fblob\u002Fmain\u002Fskills\u002Fregistry\u002Fopenclaw-agentguard\u002Fskill.yaml",[73,91,108,118,126,134],{"skillNo":74,"name":75,"nameZh":76,"description":6,"descriptionZh":77,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":90,"publishedAt":37},"01M6CN8XY7KKCHKZA2YDEYV61A","templates","模板管理","","https:\u002F\u002Fgithub.com\u002Frbkayz\u002Fgitskills\u002Fblob\u002Fmain\u002Fskills\u002Ftemplates\u002FSKILL.md",[80,85],{"categoryNo":81,"categoryName":82,"taxonomyType":83,"taxonomyTypeDesc":84},"01M8BQ6TK1MPB82068236GSXDE","文档处理","SCENARIO","使用场景",{"categoryNo":86,"categoryName":87,"taxonomyType":88,"taxonomyTypeDesc":89},"01M8BS5011KJDVSRXG1DC4P666","普通用户","PROFESSION","适用职业",[75],{"skillNo":92,"name":93,"nameZh":94,"description":6,"descriptionZh":77,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":103,"publishedAt":37},"01M6CN8TXAAMMN0KJKD1G7NJ06","wshobson-security-hardening","系统安全加固","https:\u002F\u002Fgithub.com\u002Frbkayz\u002Fgitskills\u002Fblob\u002Fmain\u002Fskills\u002Fregistry\u002Fwshobson-security-hardening\u002FSKILL.md",[97,100],{"categoryNo":98,"categoryName":99,"taxonomyType":88,"taxonomyTypeDesc":89},"01M8BR4MYFKGCC4WCWVJ50KJ2C","安全工程师",{"categoryNo":101,"categoryName":102,"taxonomyType":83,"taxonomyTypeDesc":84},"01M8C89JJEXGGRGHS6XVXDA46K","终端安全加固",[104,105,106,107],"security","hardening","security hardening","wshobson security hardening",{"skillNo":109,"name":110,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":37},"01M6CN8QVDEMVBERF2FAAPVJHX","wshobson-performance-optimization","https:\u002F\u002Fgithub.com\u002Frbkayz\u002Fgitskills\u002Fblob\u002Fmain\u002Fskills\u002Fregistry\u002Fwshobson-performance-optimization\u002FSKILL.md",[],[114,115,116,117],"performance","Optimization","performance optimization","wshobson performance optimization",{"skillNo":119,"name":120,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":37},"01M6CN8N3Q0AJE0HAK0JZC6XX0","wshobson-incident-response","https:\u002F\u002Fgithub.com\u002Frbkayz\u002Fgitskills\u002Fblob\u002Fmain\u002Fskills\u002Fregistry\u002Fwshobson-incident-response\u002FSKILL.md",[],[124,125],"incident response","wshobson incident response",{"skillNo":127,"name":128,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":129,"categories":130,"keywords":131,"publishedAt":37},"01M6CN8J99DWNZMK7YX40BSRYV","wshobson-full-review","https:\u002F\u002Fgithub.com\u002Frbkayz\u002Fgitskills\u002Fblob\u002Fmain\u002Fskills\u002Fregistry\u002Fwshobson-full-review\u002FSKILL.md",[],[132,133],"review","wshobson full review",{"skillNo":135,"name":136,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":137,"categories":138,"keywords":139,"publishedAt":37},"01M6CN8GCVBRTTFBMWS54NMHKS","wshobson-claude-commands","https:\u002F\u002Fgithub.com\u002Frbkayz\u002Fgitskills\u002Fblob\u002Fmain\u002Fskills\u002Fregistry\u002Fwshobson-claude-commands\u002FSKILL.md",[],[140],"wshobson claude commands"]