/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.
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install haoyuwang99-safe-exec - After installation, invoke the skill by name or use
/haoyuwang99-safe-exec - Provide required inputs per the skill's parameter spec and get structured output
What is 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... It is an AI Agent Skill for Claude Code / OpenClaw, with 178 downloads so far.
How do I install Safe Exec?
Run "/install haoyuwang99-safe-exec" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Safe Exec free?
Yes, Safe Exec is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Safe Exec support?
Safe Exec is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Safe Exec?
It is built and maintained by 王昊宇 (@haoyuwang99); the current version is v1.0.0.