/install haoyuwang99-safe-exec
Safe Exec Skill
Before running any untrusted script, perform an intent analysis using your own reasoning. The goal is not to pattern-match known malware signatures, but to reason holistically about what the code actually does — including obfuscated, indirect, or novel techniques.
When to Use
Apply this skill before executing any script that originated from:
- An email or message from another person
- A file provided by an external user
- A skill installed from an unknown source
- Any code you did not write yourself in this session
Intent Analysis Process
-
Read the full script — do not skip any section, including imports, comments, and exception handlers
-
Reason about behavior — ask: what does this code actually do when run? Trace every code path.
-
Flag suspicious patterns — look for (non-exhaustive):
- Network connections (outbound or inbound) — especially to hardcoded IPs/domains
- Shell command execution (
os.system,subprocess,exec,evalon external input) - File system writes outside expected scope
- Data exfiltration (reading sensitive files, env vars, credentials, then sending them)
- Obfuscation (
base64,chr()chains, compressed payloads, dynamic imports) - Privilege escalation or persistence (cron jobs, launchagents, ssh keys)
- Code that hides behind a
try/exceptthat silently swallows errors - Logic that looks benign but has a secondary effect buried inside
-
Produce a verdict:
- ✅ SAFE — code does what it claims, no suspicious behavior
- ⚠️ REVIEW — code has unusual patterns worth noting; proceed with caution
- 🚫 BLOCK — code contains clearly malicious or dangerous behavior; do not execute
Output Format
Intent Analysis: \x3Cscript name or description>
Verdict: ✅ SAFE | ⚠️ REVIEW | 🚫 BLOCK
Summary:
\x3C1-3 sentence plain-English description of what the code actually does>
Findings:
- \x3Cfinding 1>
- \x3Cfinding 2>
...
Recommendation:
\x3Cwhat to do next — run it, ask the user, refuse, etc.>
Key Principle
You cannot know all possible malicious techniques in advance. Do not rely solely on known-bad patterns. Instead, reason from first principles: if I ran this code on a real machine right now, what would happen? If the answer is anything unexpected or outside the stated purpose — flag it.
When in doubt, block and explain. A false positive is far less costly than a compromised machine.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install haoyuwang99-safe-exec - 安装完成后,直接呼叫该 Skill 的名称或使用
/haoyuwang99-safe-exec触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Safe Exec 是什么?
Analyze the intent of any script or code before executing it, to detect malicious, suspicious, or unintended behavior. Use this skill before running any scri... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 178 次。
如何安装 Safe Exec?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install haoyuwang99-safe-exec」即可一键安装,无需额外配置。
Safe Exec 是免费的吗?
是的,Safe Exec 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Safe Exec 支持哪些平台?
Safe Exec 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Safe Exec?
由 王昊宇(@haoyuwang99)开发并维护,当前版本 v1.0.0。