ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified developer tools Safety 5/5

safe-exec

Safe command execution for OpenClaw Agents with automatic danger pattern detection, risk assessment, user approval workflow, and audit logging. Use when agents need to execute shell commands that may be dangerous (rm -rf, dd, fork bombs, system directory modifications) or require human oversight. Provides multi-level risk assessment (CRITICAL/HIGH/MEDIUM/LOW), in-session notifications, pending request management, and non-interactive environment support for agent automation.

Why use this skill?

Enhance your OpenClaw agent security with SafeExec. Automatic danger pattern detection, risk assessment, and user approval for all shell commands.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/lucky-2968/safe-exec-0-3-2
Or

What This Skill Does

SafeExec provides an essential security layer for OpenClaw agents, functioning as a proactive shield against accidental or malicious system damage. By intercepting shell commands before they are executed, it performs a real-time risk assessment using a multi-level classification system (CRITICAL, HIGH, MEDIUM, LOW). Whether the agent attempts a catastrophic operation like deleting the root directory or modifying system configuration files, SafeExec ensures that nothing proceeds without explicit human intervention. It maintains a strict audit log and utilizes an in-session notification system that integrates directly into your terminal workflow, ensuring you are always aware of what the agent is planning to execute on your machine.

Installation

You can install SafeExec effortlessly through the OpenClaw assistant. Simply type 'Help me install SafeExec skill from ClawdHub' into your chat interface, and the assistant will handle the cloning and configuration. For advanced users, you can use the ClawdHub CLI: set your registry via export CLAWDHUB_REGISTRY=https://www.clawhub.ai and run clawhub install safe-exec. Alternatively, clone the repository directly from https://github.com/OTTTTTO/safe-exec.git into your ~/.openclaw/skills/ directory. Once installed, activate it by sending 'Enable SafeExec' to your agent.

Use Cases

SafeExec is ideal for developers who want to empower their AI agents to handle server tasks without the fear of unintended consequences. Use it when performing batch file operations, installing software via shell scripts, managing system processes, or automating daily server maintenance. It is particularly useful when testing agent scripts that interact with system directories, as it provides a 'sandbox-like' approval mechanism for dangerous command patterns.

Example Prompts

  1. 'Enable SafeExec and monitor all incoming shell commands for security violations.'
  2. 'List all pending command approvals so I can review what the agent tried to do.'
  3. 'Approve the command with ID 8829 because I trust the agent is just cleaning the /tmp directory.'

Tips & Limitations

To maximize the utility of SafeExec, always review the generated audit logs located in ~/.openclaw/safe-exec-audit.log. Be aware that while SafeExec effectively catches common patterns, it is not a complete replacement for robust system permissions and user-level access controls. Always run your agents with the least-privileged user necessary. The skill currently focuses on terminal-based shell command interception and may not capture commands executed through non-shell APIs or direct application integration.

Metadata

Stars1601
Views1
Updated2026-02-27
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-lucky-2968-safe-exec-0-3-2": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#security#shell-automation#command-interception#safe-execution#developer-tools
Safety Score: 5/5

Flags: code-execution, file-read, file-write