SafeExec for Openclaw

Protect your system with an automated command interception and human-in-the-loop approval workflow for AI agent shell operations.

lucky-2968
v1.0.0
Feb 4, 2026
4
3.4k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install safe-exec-0-3-2

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install safe-exec-0-3-2 using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is SafeExec?

SafeExec is a critical security skill designed for Openclaw Skills to prevent accidental or malicious system damage during autonomous agent operations. It acts as a transparent interceptor for shell commands, scanning every instruction for dangerous patterns like recursive deletions, system formatting, or unauthorized configuration changes.

By integrating this safety layer, developers can confidently allow AI agents to interact with their environment while maintaining strict control through a multi-level risk assessment system. Whether you are running agents in interactive or non-interactive modes, SafeExec ensures that high-risk operations are caught and held until a human provides explicit authorization.

SafeExec Use Cases

  • Preventing accidental data loss during agent-led file system cleanup or organization tasks.
  • Auditing all shell operations performed by AI agents in production or shared development environments.
  • Implementing a security boundary for automated DevOps workflows where system-destructive commands might be generated.
  • Monitoring and approving system-wide configuration changes initiated by Openclaw Skills in a local environment.

How SafeExec Works

  1. The AI agent attempts to execute a shell command within the OpenClaw environment.
  2. SafeExec intercepts the command before execution and analyzes it against a database of risk patterns.
  3. The system assigns a risk level (CRITICAL, HIGH, MEDIUM, or LOW) based on the potential impact of the command.
  4. If a command exceeds the safety threshold, SafeExec pauses execution and creates a pending request file.
  5. An in-session notification is displayed to the user, providing the command details and a unique Request ID.
  6. The user reviews the request and uses the CLI to either approve or reject the specific operation.
  7. SafeExec executes the approved command or logs the rejection, recording every detail in a central audit log.

SafeExec Setup

The fastest way to install SafeExec is to ask your agent: Help me install SafeExec skill from ClawdHub.

For manual installation via CLI:

# Install via ClawdHub
export CLAWDHUB_REGISTRY=https://www.clawhub.ai
clawdhub install safe-exec

# Enable the security layer
Enable SafeExec

SafeExec Data Schema & Taxonomy

SafeExec maintains a structured data hierarchy to ensure transparency and traceability for Openclaw Skills:

File/Directory Purpose Format
~/.openclaw/safe-exec-rules.json Risk detection patterns and severity settings JSON
~/.openclaw/safe-exec-audit.log Detailed history of all command attempts and outcomes Text/Log
~/.openclaw/safe-exec/pending/ Queue for commands awaiting manual user approval Files
SAFE_EXEC_AUTO_CONFIRM Environment variable for automated low-risk bypass Variable

SafeExec Advanced Features

  • Multi-level risk categorization allows for granular control over which commands require human intervention.
  • Comprehensive audit logging provides full traceability for compliance and debugging within Openclaw Skills.
  • Non-interactive mode support ensures that automated background agents can still participate in the safety workflow.
  • Environment variable customization for global disabling or auto-approval of low-risk read operations.
  • Platform-independent notifications that work across terminal sessions, webchats, and integrated messaging platforms like Telegram or Discord.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*