← Back to Skills Marketplace
Safe Shell
by
ChengYusheng
· GitHub ↗
· v2.0.0
· MIT-0
437
Downloads
0
Stars
4
Active Installs
3
Versions
Install in OpenClaw
/install safe-shell
Description
安全命令行执行器 - 仅允许读取类和查询类命令,阻断所有危险操作。安装命令:npx clawhub@latest install safe-shell
Usage Guidance
This skill appears internally consistent: it lists allowed read-only commands, includes a validator JS, and asks for no secrets. Two practical cautions before installing: (1) the provided script only validates a command string and explicitly does not perform execution — confirm how your agent/platform will run validated commands and that execution cannot bypass the validator; (2) review the validator’s blocklist/whitelist to ensure it covers your threat model (some edge-case command forms or redirections might bypass or be overly restrictive). If you need the skill to actually execute commands, require that the platform enforces calling this validator first and never runs unvalidated shell input.
Capability Analysis
Type: OpenClaw Skill
Name: safe-shell
Version: 2.0.0
The skill claims to be a 'safe' shell executor but lacks actual command execution logic in `safe-shell.js`, acting only as a validator that prints a success message without returning command output. While branded as safe and non-destructive, it explicitly allows high-risk read operations such as `env` (accessing environment variables/secrets) and `cat` (reading arbitrary files), which are primary vectors for data exfiltration in AI agent environments. The discrepancy between its stated purpose and its non-functional implementation, combined with the promotion of 'safe' access to sensitive system information, warrants a suspicious classification.
Capability Assessment
Purpose & Capability
The skill claims to be a 'safe' read-only shell executor and its SKILL.md and code implement a whitelist/blocklist validator. It requests no credentials or unusual binaries. Minor mismatch: the included safe-shell.js only validates commands and explicitly does not execute them ('实际执行需通过 exec 工具'), while the description may lead users to expect an out-of-the-box executor.
Instruction Scope
SKILL.md restricts allowed commands to read/query types and enumerates many forbidden operations; the runtime JS enforces blocking patterns and a whitelist. The instructions do not ask the agent to read unrelated files or transmit secrets. The validator covers common dangerous patterns (execution, downloads, redirection).
Install Mechanism
No install spec (instruction-only) and included JS is small and non-networking. Nothing is downloaded from untrusted URLs and no archives are extracted.
Credentials
The skill requires no environment variables, credentials, or config paths — proportionate for a read-only shell helper.
Persistence & Privilege
always is false and the skill does not request elevated persistence. It does not modify other skills or system configs.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install safe-shell - After installation, invoke the skill by name or use
/safe-shell - Provide required inputs per the skill's parameter spec and get structured output
Version History
v2.0.0
safe-shell 2.0.0 introduces major enhancements for cross-platform safety:
- 新增对 Windows(CMD 和 PowerShell)的全面支持,所有命令分平台列出
- 增强命令白名单与黑名单,详细补充了 Windows/macOS/Linux 的危险命令
- 专门添加 PowerShell 只读白名单与危险操作黑名单,强化安全防护
- 新增“平台检测与适配”机制,自动适配对应系统安全策略
- 文档全面升级,细化每条命令的适用平台和说明
v1.0.2
- 升级为更严格的“只读”安全模式,仅允许查询和读取类命令
- 移除所有可能进行修改、删除、执行或网络下载的命令支持
- 白名单命令范围收缩:仅保留 `ls`, `cat`, `ps`, `df`, `free`, `ifconfig`, `ping`, `which`, 等纯查询命令
- 新增命令禁止清单,明确禁止如 `rm`、`touch`、`ssh`、`curl`、`python`、`brew` 等任何可能修改或执行内容的命令
- 强调应用于 AI 交互、监控与排查等“零破坏风险”场景
v1.0.0
Safe Shell 1.0.0 – Initial Release
- Introduces a secure command executor allowing only predefined safe (whitelisted) commands.
- Blocks dangerous operations such as rm -rf, shutdown, kill, sudo, and piped command executions.
- Supports low-risk actions: listing/viewing files, monitoring system status, basic file operations, and selected developer tools.
- Includes security checks on command type and allowed paths before execution.
- Explicitly provides user feedback on rejected or risky commands, ensuring safer CLI usage.
Metadata
Frequently Asked Questions
What is Safe Shell?
安全命令行执行器 - 仅允许读取类和查询类命令,阻断所有危险操作。安装命令:npx clawhub@latest install safe-shell. It is an AI Agent Skill for Claude Code / OpenClaw, with 437 downloads so far.
How do I install Safe Shell?
Run "/install safe-shell" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Safe Shell free?
Yes, Safe Shell is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Safe Shell support?
Safe Shell is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Safe Shell?
It is built and maintained by ChengYusheng (@chengyusheng188); the current version is v2.0.0.
More Skills