← 返回 Skills 市场
haoyuwang99

Safe Exec

作者 王昊宇 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
178
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install haoyuwang99-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...
使用说明 (SKILL.md)

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

  1. Read the full script — do not skip any section, including imports, comments, and exception handlers

  2. Reason about behavior — ask: what does this code actually do when run? Trace every code path.

  3. Flag suspicious patterns — look for (non-exhaustive):

    • Network connections (outbound or inbound) — especially to hardcoded IPs/domains
    • Shell command execution (os.system, subprocess, exec, eval on 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/except that silently swallows errors
    • Logic that looks benign but has a secondary effect buried inside
  4. 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.

安全使用建议
This skill is coherent and lightweight: it only provides a human-readable analysis checklist and has no code to run or secrets to provide. However, it relies entirely on the agent's reasoning and may produce false negatives or false positives. Before relying on its verdict for high-risk scripts: (1) avoid allowing automatic execution of code based solely on this skill's output; (2) run untrusted code only in an isolated sandbox or VM; and (3) consider having a human reviewer inspect any code the skill marks SAFE when the code deals with sensitive systems or data.
功能分析
Type: OpenClaw Skill Name: haoyuwang99-safe-exec Version: 1.0.0 The 'safe-exec' skill is a defensive utility designed to guide the AI agent in performing security reviews of untrusted scripts before execution. The instructions in SKILL.md provide a structured framework for intent analysis, specifically flagging high-risk behaviors like data exfiltration, obfuscation, and unauthorized network access. There are no malicious commands, suspicious dependencies, or prompt injection attempts within the provided files.
能力评估
Purpose & Capability
Name, description, and runtime instructions all align: the skill is purely an analysis checklist and does not request unrelated credentials, tools, or access.
Instruction Scope
SKILL.md instructs the agent to read and reason about scripts, look for network, file, and execution patterns, and produce a verdict. It does not instruct the agent to execute code, fetch external resources, or read host secrets. The guidance is appropriately scoped to analysis.
Install Mechanism
No install spec or code files are present; nothing is written to disk or downloaded. This is the lowest-risk model (instruction-only).
Credentials
No environment variables, credentials, or config paths are requested. The checks listed in the instructions (e.g., 'look for references to env vars') are analysis-focused and do not require the skill to access host secrets.
Persistence & Privilege
always is false and the skill is user-invocable. Autonomous invocation is allowed (platform default) but the skill does not request elevated or persistent privileges or modify other skills.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install haoyuwang99-safe-exec
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /haoyuwang99-safe-exec 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: LLM-based intent analysis for untrusted scripts before execution
元数据
Slug haoyuwang99-safe-exec
版本 1.0.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

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。

💬 留言讨论