agentguard
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.
What this skill does
# 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 risks - **`action <description>`** — Evaluate whether a runtime action is safe - **`patrol [run|setup|status]`** — Daily security patrol for OpenClaw environments - **`trust <lookup|attest|revoke|list> [args]`** — Manage skill trust levels - **`report`** — View recent security events from the audit log - **`config <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](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. 1. **Ask the user for explicit confirmation** before proceeding. Show the exact command that will be executed and wait for approval. 2. Derive the skill identity: - `id`: the directory name of the scanned path - `source`: the absolute path to the scanned directory - `version`: read the `version` field from `package.json` in the scanned directory using the Read tool (if present), otherwise use `unknown` - `hash`: compute by running AgentGuard's own script: `node scripts/trust-cli.ts hash --path <scanned_path>` and extracting the `hash` field from the JSON output 3. 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 ``` 4. 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](action-policies.md). ### Supported Action Types - `network_request` — HTTP/HTTPS requests - `exec_command` — Shell command execution - `read_file` / `write_file` — File system operations - `secret_access` — Environment variable access - `web3_tx` — Blockchain transactions - `web3_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/
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.