safe-exec

Detect and mitigate dangerous shell commands with BashAST-based risk scoring.

4|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/ybbms777/openclaw-claude-code-integration --skill safe-exec-ybbms777
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: safe-exec
Source: https://github.com/ybbms777/openclaw-claude-code-integration/tree/main/skills/safe-command-execution
Command: npx skills add https://github.com/ybbms777/openclaw-claude-code-integration --skill safe-exec-ybbms777

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

SafeExec prevents dangerous shell commands from executing in OpenClaw agents by automatically detecting threats, prompting for approval, and logging all actions for auditability.

Core Features & Use Cases

  • Automatic danger pattern detection and risk assessment for shell commands
  • In-session notifications and user approval workflow
  • Local audit logging and agent-friendly, non-interactive mode for automation
  • Use Case: When an agent might run a risky command, SafeExec analyzes it and requires approval before execution while keeping an audit trail.

Quick Start

Enable SafeExec to begin intercepting and auditing risky shell commands.

Frequently Asked Questions about safe-exec

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent shell commands from executing dangerous operations in automated agent workflows?

You prevent dangerous shell commands by enabling SafeExec to intercept and analyze risky executions. It applies BashAST-based analysis and multi-level risk scoring to detect threats before they run, prompting for user approval on flagged operations.

What is BashAST-based risk analysis for shell commands?

BashAST-based risk analysis is a method of parsing shell commands to detect dangerous patterns before execution. SafeExec uses this technique to evaluate command structures and assign multi-level risk scores for threat mitigation.

Can I run non-interactive shell command auditing for automation pipelines?

Yes, you can run non-interactive shell command auditing using SafeExec's agent-friendly mode. This allows automated workflows to process risk checks and log audit trails without requiring manual in-session approval prompts.

Does this command risk checker work with interactive agent sessions?

Yes, the command risk checker works with interactive agent sessions by providing in-session notifications. It prompts users directly for approval when dangerous command patterns are detected during active operations.

How do I keep a local audit log of shell commands executed by agents?

You keep a local audit log of shell commands by enabling SafeExec. It automatically records all analyzed commands, risk scores, and approval actions, ensuring full auditability for both automated and interactive sessions.

What are the limitations of using automated risk scoring for shell command safety?

Automated risk scoring for shell command safety relies on BashAST pattern detection, which may not catch novel obfuscated threats. SafeExec mitigates this by combining multi-level scoring with in-session approval workflows to verify ambiguous commands.