Skill Security Check
Runs structured security checks against skills (especially from registries) and produces a report similar to VirusTotal-style analysis: purpose vs capability, registry vs SKILL.md consistency, remote code execution (RCE), malicious code (obfuscation, backdoors, exfiltration, mining, secret reads), install mechanism, credentials, and persistence/privilege.
User goals
- - Achieve a Benign safety rating on the skill I made — Authors use the check (and the author checklist in reference.md) to fix issues until their skill reports Benign before publishing.
- Ensure all downloaded skills are Benign — Before using or trusting any skill obtained from a registry (e.g. ClawHub), a URL, or a shared folder, run this security check. Only treat the skill as safe to use if the verdict is Benign; if Suspicious or any RCE/malicious findings, do not install or follow "what to consider" (verify source, audit in sandbox, or do not install).
Agent rule for "ensure all downloaded skills are benign": Whenever the user installs or adds a skill (e.g. clawhub install, download, or copy into skills dir), run the skill security check on that skill. If the verdict is not Benign, show the report and do not recommend using the skill until the user has verified the source or the report is resolved. For existing skills in the user's skills directory, the user can ask to "check all my downloaded skills" or "ensure all my skills are benign" — run the check on each and list which are Benign vs Suspicious.
Pain points this skill addresses
- - "Is this skill safe to install?" — Users and agents often see skills on ClawHub or elsewhere with no clear way to judge risk. This skill gives a structured, repeatable checklist and a single verdict (Benign / Suspicious) plus what to consider before installing.
- "The skill wants my OAuth / API keys" — Credentials are a common attack surface. The check verifies that credential requirements are declared and proportionate, and recommends test accounts and least privilege so users don’t blindly grant access.
- "Registry and SKILL.md don’t match" — When the registry listing omits binaries, install steps, or credentials that SKILL.md requires, installs can fail or users get surprised. The skill flags these mismatches so publishers can fix them or users can decide with full context.
- "Could it run malicious code or steal my data?" — Explicit RCE and malicious-code checks (curl|sh, eval, obfuscation, exfiltration, secret reads) address the fear that a skill might execute untrusted code or send secrets off-box. Findings here drive a "do not install" or "audit first" recommendation.
- "I need one process, not ad-hoc judgment" — A single, documented flow (purpose → registry consistency → scope → RCE → malicious → install → credentials → persistence) ensures consistent evaluations and report format every time.
When to use
- - User is about to install a skill from ClawHub or another registry and wants a security pass.
- User asks to "check this skill for safety", "security review this skill", or "is this skill safe to install?"
- User goal: ensure all downloaded skills are benign — Run the check on every newly added skill and (on request) on all skills in the user's skills dir; only treat Benign as safe to use.
- Skill requests OAuth, API keys, or
client_secret.json and you need to flag risks. - Comparing registry listing metadata to the skill's SKILL.md for mismatches.
Check categories (run in order)
1. Purpose & capability
- - Align: Does the SKILL.md description match the actions/commands it instructs? (e.g. "Google Workspace CLI" ↔ Gmail/Calendar/Drive commands.)
- Flag: If the stated purpose and the actual instructions clearly diverge, note it and treat as suspicious.
2. Registry vs SKILL.md consistency
- - Required binaries: Does the registry listing declare the same
requires.bins / requires.anyBins as SKILL.md (or metadata.openclaw.requires.bins)? If registry shows none but SKILL.md requires a binary (e.g. gog), that’s an inconsistency to call out. - Install spec: Does the registry show an install spec (e.g. Homebrew formula, download URL)? If SKILL.md references a Homebrew tap or install steps but the registry has no install metadata, note the mismatch — it’s unclear whether the platform will install the binary or expect it preinstalled.
- Credentials: Does the registry declare
primaryEnv, apiKey, or env vars for credentials? If SKILL.md asks for OAuth client_secret.json or env vars but the registry lists none, note the omission so the user can confirm before granting access.
3. Instruction scope
- - On-topic: Instructions should stay within the skill’s stated purpose (e.g. workspace CLI ↔ OAuth setup and CLI commands only).
- Red flags: Instructions that tell the agent to read unrelated system files, contact unexpected endpoints, or exfiltrate data — mark as suspicious and warn.
4. Remote code execution (RCE)
- - Unsafe execution patterns: Does the skill tell the agent to run code that comes from the network, user input, or another skill without validation? (e.g.
curl … | sh, wget … -O - | bash, eval "$(…)", running a script URL directly.) - Piped installs: Any instruction to pipe remote content into shell/interpreter (curl/wget to bash/python/node) is high risk — treat as suspicious unless the URL is a well-known, integrity-checked official source.
- Dynamic code: Instructions to fetch and execute scripts, or to construct and run commands from untrusted or unvalidated strings (e.g. interpolating user/API data into shell commands without sanitization).
- Privileged execution: Running as root, with sudo, or modifying system paths so that later commands run in a privileged context — escalates impact of any RCE.
5. Malicious code
- - Obfuscation: Heavily obfuscated scripts or base64/encoded blobs that are decoded and executed — flag for review; legitimate installers rarely rely on this.
- Backdoors / persistence: Instructions or scripts that add user accounts, SSH keys, cron jobs, or LaunchAgents not clearly tied to the skill's stated purpose.
- Data exfiltration: Sending credentials, keys, or local files to remote servers (other than declared APIs the user expects, e.g. OAuth callback). Any undisclosed or secondary endpoint is suspicious.
- Cryptomining / abuse: Instructions that run long-running CPU-heavy processes, miners, or resource abuse; or that use the host for proxy/relay without clear disclosure.
- Sensitive reads: Telling the agent to read
~/.ssh, ~/.aws, .env, or other secrets and pass them to a remote service or script — treat as malicious unless explicitly required and disclosed for a known, trusted integration.
6. Install mechanism
- - Declared install: Is the install method (e.g.
brew install …, third-party tap, download) clearly stated and consistent between registry and SKILL.md? - Third-party taps/scripts: Installing from a third-party Homebrew tap or running install scripts is moderately risky if the source isn’t trusted. Recommend: verify upstream repo/releases and prefer manual install + test before trusting automated install.
7. Credentials
- - Proportionate: Requesting OAuth or API keys for a Google/API-focused skill is expected; note whether scope is least-privilege (e.g. test account, limited scopes).
- Declared: If the skill needs credentials, they should appear in registry metadata (e.g.
primaryEnv, skills.entries.<name>.apiKey) so the platform and user know what’s required. - Recommendation: Prefer a dedicated/test account and least privilege; do not grant primary account access if uncomfortable.
8. Persistence & privilege
- - always:true: Skills that load on every run have higher impact; note if present.
- System-wide changes: Does the skill install LaunchAgents, cron jobs, or modify system config? If yes, state clearly in the report.
- User-invocable / autonomous: Note if the skill is user-invocable or allowed to run autonomously; not a standalone red flag but part of the overall risk picture.
Output format (report to user)
Produce a short report with:
- 1. Verdict: Benign / Suspicious (low / medium / high confidence). One line.
- Purpose & capability: ✓ Aligned or ⚠ mismatch (one sentence).
- Registry vs SKILL.md: ✓ Consistent or ⚠ list specific mismatches (binaries, install, credentials).
- Instruction scope: ✓ On-topic or ⚠ red flags (e.g. unexpected file access, endpoints).
- Remote code execution (RCE): ✓ No unsafe patterns or ⚠/🔴 list (e.g. curl|sh, eval of remote input, unvalidated command construction). Any RCE pattern raises confidence of "Suspicious".
- Malicious code: ✓ No signs or ⚠/🔴 list (obfuscation, backdoors, exfiltration, mining, secret reads to remote). Any finding here strongly favors "Suspicious" and may warrant "do not install".
- Install mechanism: ✓ Clear and consistent or ⚠ third-party/undeclared (and recommendation).
- Credentials: ✓ Declared and proportionate or ⚠ undeclared / broad scope (and recommendation).
- Persistence & privilege: ✓ No concerning persistence or ⚠ list (always:true, system changes).
- What to consider before installing: 3–5 bullet points (verify source, install manually if unsure, use test account, clarify registry vs SKILL.md with publisher if needed, do not grant primary account access if uncomfortable; if RCE/malicious findings, recommend do not install or audit scripts first).
What to consider before installing (template)
When the report is suspicious or has inconsistencies, include guidance like:
- - Verify the upstream project/homepage and any tap or install source; inspect repo and releases.
- Prefer installing any required binary yourself and testing it independently before trusting an automated installer.
- Only provide OAuth/API credentials from an account you control; prefer a dedicated/test account with least privilege.
- If registry and SKILL.md disagree on install/requirements, ask the publisher to align them.
- If uncomfortable, do not grant access to primary accounts; consider running the CLI or tool locally instead.
- If RCE or malicious code signs were found, recommend do not install or audit scripts in a sandbox first.
Usage examples
User asks for a safety check:
- - "Run a security check on the gog-cli skill from ClawHub." → Load the skill’s SKILL.md (and registry listing if available), run all check categories in order, output the 10-point report and "What to consider before installing."
- "Is this skill safe to install?" / "Security review this skill." → Same: run the check and return the report.
Before recommending install:
- - User says "Install the X skill" and the skill is from a registry or requests credentials → Run this security check first; if verdict is Suspicious or there are RCE/malicious findings, show the report and recommend verifying source or not installing before proceeding.
Self-check or local skill:
- - "Run the skill security check on gateway-guard" → Evaluate the workspace skill (no registry); report N/A for registry vs SKILL.md, still run RCE, malicious code, install, credentials, persistence. Output the same report format.
Concrete prompt to trigger the check (for users):
- - "Check this skill for safety"
- "Security review [skill name]"
- "Is [skill] safe to install?"
- "Run skill security check on [skill name or path]"
For authors: Achieving a Benign rating
If you publish a skill and want it to receive a Benign verdict when evaluated by this check:
- - Purpose & capability: Keep your SKILL.md description and instructions aligned; no hidden or off-topic actions.
- Registry vs SKILL.md: If the skill is on a registry, declare the same requirements in both places: required binaries, install spec (if any), and credentials (primaryEnv / apiKey / env).
- No RCE: Do not instruct the agent to run
curl|sh, wget|bash, eval of remote/user input, or unvalidated command construction; avoid root/sudo for remote or dynamic code. - No malicious patterns: No obfuscation, backdoors, undisclosed exfiltration, mining, or reading secrets and sending to remote. Document any persistence (LaunchAgent, cron) and privilege clearly.
- Install & credentials: Document install steps and required credentials; recommend test accounts and least privilege where relevant.
- Run the check yourself: Before publishing, run "Run skill security check on [your skill]" and fix any ⚠ or 🔴 findings.
Full author checklist and details: reference.md.
Additional resources
技能安全检查
对技能(尤其是来自注册中心的技能)执行结构化安全检查,并生成类似VirusTotal风格的分析报告:目的与能力对比、注册中心与SKILL.md一致性、远程代码执行(RCE)、恶意代码(混淆、后门、数据窃取、挖矿、密钥读取)、安装机制、凭据以及持久化/权限。
用户目标
- - 让我制作的技能获得良性安全评级 — 作者使用本检查(以及reference.md中的作者清单)修复问题,直到其技能在发布前报告为良性。
- 确保所有下载的技能都是良性的 — 在使用或信任从注册中心(如ClawHub)、URL或共享文件夹获取的任何技能之前,运行此安全检查。仅当判定结果为良性时才将该技能视为安全可用;如果为可疑或存在任何RCE/恶意发现,请勿安装或遵循需要考虑的事项(验证来源、在沙箱中审计或不要安装)。
确保所有下载的技能都是良性的的代理规则: 每当用户安装或添加技能(例如clawhub install、下载或复制到技能目录)时,对该技能运行技能安全检查。如果判定结果不是良性,则显示报告,并且在用户验证来源或报告问题解决之前,不建议使用该技能。对于用户技能目录中的现有技能,用户可以要求检查我所有下载的技能或确保我所有技能都是良性的 — 对每个技能运行检查,并列出哪些是良性的与可疑的。
本技能解决的痛点
- - 这个技能安装安全吗? — 用户和代理经常在ClawHub或其他地方看到技能,但没有明确的方法来判断风险。本技能提供了一个结构化的、可重复的检查清单和一个单一的判定结果(良性/可疑),以及安装前需要考虑的事项。
- 这个技能想要我的OAuth/API密钥 — 凭据是常见的攻击面。检查会验证凭据要求是否已声明且合理,并推荐测试账户和最小权限,以便用户不会盲目授予访问权限。
- 注册中心和SKILL.md不匹配 — 当注册中心列表省略了SKILL.md要求的二进制文件、安装步骤或凭据时,安装可能会失败或用户会感到意外。本技能会标记这些不匹配,以便发布者修复或用户在充分了解情况后做出决定。
- 它可能运行恶意代码或窃取我的数据吗? — 明确的RCE和恶意代码检查(curl|sh、eval、混淆、数据窃取、密钥读取)解决了技能可能执行不受信任的代码或将机密发送到外部的担忧。这些发现会驱动不要安装或先审计的建议。
- 我需要一个流程,而不是临时判断 — 一个单一的、有文档记录的流程(目的→注册中心一致性→范围→RCE→恶意→安装→凭据→持久化)确保每次评估和报告格式一致。
何时使用
- - 用户即将从ClawHub或其他注册中心安装技能,并希望获得安全通行证。
- 用户要求检查此技能的安全性、对此技能进行安全审查或此技能安装安全吗?
- 用户目标:确保所有下载的技能都是良性的 — 对每个新添加的技能运行检查,并根据要求对用户技能目录中的所有技能运行检查;仅将良性视为安全可用。
- 技能请求OAuth、API密钥或client_secret.json,您需要标记风险。
- 比较注册中心列表元数据与技能的SKILL.md是否存在不匹配。
检查类别(按顺序运行)
1. 目的与能力
- - 一致性: SKILL.md的描述是否与其指示的操作/命令匹配?(例如Google Workspace CLI ↔ Gmail/Calendar/Drive命令。)
- 标记: 如果所述目的与实际指示明显不符,请注明并将其视为可疑。
2. 注册中心与SKILL.md一致性
- - 必需的二进制文件: 注册中心列表是否声明了与SKILL.md(或metadata.openclaw.requires.bins)相同的requires.bins/requires.anyBins?如果注册中心显示无,但SKILL.md需要二进制文件(例如gog),则这是需要指出的不一致。
- 安装规范: 注册中心是否显示安装规范(例如Homebrew配方、下载URL)?如果SKILL.md引用了Homebrew tap或安装步骤,但注册中心没有安装元数据,则注明不匹配 — 不清楚平台是会安装二进制文件还是期望它已预装。
- 凭据: 注册中心是否声明了primaryEnv、apiKey或用于凭据的环境变量?如果SKILL.md要求OAuth client_secret.json或环境变量,但注册中心未列出任何内容,则注明遗漏,以便用户在授予访问权限前确认。
3. 指令范围
- - 主题相关: 指令应保持在技能所述目的范围内(例如工作空间CLI ↔ 仅OAuth设置和CLI命令)。
- 危险信号: 指示代理读取不相关的系统文件、联系意外的端点或窃取数据的指令 — 标记为可疑并发出警告。
4. 远程代码执行(RCE)
- - 不安全的执行模式: 技能是否指示代理运行来自网络、用户输入或其他技能且未经验证的代码?(例如curl … | sh、wget … -O - | bash、eval $(…)、直接运行脚本URL。)
- 管道安装: 任何将远程内容通过管道传输到shell/解释器(curl/wget到bash/python/node)的指令都是高风险 — 除非URL是知名的、经过完整性检查的官方来源,否则视为可疑。
- 动态代码: 获取并执行脚本的指令,或从不受信任或未经验证的字符串构建并运行命令的指令(例如将用户/API数据插入shell命令而不进行清理)。
- 特权执行: 以root身份、使用sudo运行,或修改系统路径以便后续命令在特权上下文中运行 — 会放大任何RCE的影响。
5. 恶意代码
- - 混淆: 高度混淆的脚本或base64/编码的二进制大对象,被解码并执行 — 标记以供审查;合法的安装程序很少依赖于此。
- 后门/持久化: 添加用户账户、SSH密钥、cron作业或LaunchAgents的指令或脚本,且与技能的所述目的没有明确关联。
- 数据窃取: 将凭据、密钥或本地文件发送到远程服务器(用户期望的已声明API除外,例如OAuth回调)。任何未披露或次要的端点都是可疑的。
- 加密货币挖矿/滥用: 运行长时间CPU密集型进程、挖矿程序或资源滥用的指令;或使用主机作为代理/中继而未明确披露。
- 敏感读取: 指示代理读取~/.ssh、~/.aws、.env或其他机密,并将其传递给远程服务或脚本 — 除非是已知、受信任的集成明确要求并披露,否则视为恶意。
6. 安装机制
- - 已声明的安装: 安装方法(例如brew install …、第三方tap、下载)是否在注册中心和SKILL.md之间明确说明且一致?
- 第三方tap/脚本: 从第三方Homebrew tap安装或运行安装脚本,如果来源不受信任,则具有中等风险。建议:验证上游仓库/发布版本,并在信任自动安装之前优先手动安装+测试。
7. 凭据
- - 合理性: 对于以Google/API为中心的技能,请求OAuth或API密钥是预期的;注意范围是否是最小权限(例如测试账户、有限范围)。
- 已声明: 如果技能需要凭据,它们应出现在注册中心元数据中(例如primaryEnv、skills.entries..apiKey),以便平台和用户知道需要什么。
- 建议: 优先使用专用/测试账户和最小权限;如果感到不适,不要授予主账户访问权限。
8. 持久化与权限
- - always:true: 每次运行都加载的技能具有更高影响;如果存在则注明。
- 系统范围更改: 技能是否安装LaunchAgents、cron作业或修改系统配置?如果是,在报告中明确说明。
- 用户可调用/自主: 注意技能是用户可调用的还是允许自主运行;这不是一个独立的危险信号,而是整体风险图景的一部分。
输出格式(给用户的报告)
生成一份简短报告,包含:
- 1. 判定结果: 良性/可疑(低/中/高置信度)。一行。
- 目的与能力: ✓ 一致 或 ⚠ 不匹配(一句话)。
- 注册中心与SKILL.md: ✓ 一致 或 ⚠ 列出具体不匹配(二进制文件、安装、凭据)。
- 指令范围: ✓ 主题相关 或 ⚠ 危险信号(例如意外的文件访问、端点)。
- 远程代码执行(RCE): ✓ 无不安全模式 或 ⚠/🔴 列出