Jed

Clawshell

运维安全v0.1.0
作者:Jed更新于 2026-05-11clawshell@clawhub_polucas/clawshell
安全扫描权限检查#Approval#Sandbox

据 AlphaMoat 统计,截至 2026-09,Clawshell 累计下载 3,749 次、获 7 个星标,在全部 5,078 个 AI 技能中排名第 2,842 位,在「运维安全」分类(264 个)中排名第 175 位。

累计安装
199
累计下载
3,749
星标
7
全站排名
#2,842
全站前 56% · 「运维安全」前 67%
平台累计安装累计下载星标评论
ClawHub ↗1233,65671
SkillHub ↗1993,7497—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

主文说明 ClawShell 会分析命令风险,对高风险操作要求通过推送通知明确批准,并可自动阻止标记为 critical 的命令。

资料发布于 2026-10-27

可以用来做什么

  • 审阅并拦截高风险命令

什么时候用

  • 需要在 shell 操作执行前加入人工确认环节时

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

检查这条 shell 命令的风险,并说明是否需要人工批准

月度数据趋势

累计下载3,749
2,6503,2403,8302026-03 · 累计下载 2,7312026-05 · 累计下载 3,1432026-06 · 累计下载 3,2722026-07 · 累计下载 3,4742026-08 · 累计下载 3,5652026-09 · 累计下载 3,74926-0326-09
星标7
6782026-03 · 星标 72026-05 · 星标 72026-06 · 星标 72026-07 · 星标 72026-08 · 星标 72026-09 · 星标 726-0326-09

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-093,749—7
2026-083,565+2.6%7
2026-073,474+6.2%7
2026-063,272+4.1%7
2026-053,143—7
2026-032,731—7

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

4.2 KB · ClawHub v0.1.0
---
name: clawshell
description: Human-in-the-loop security layer. Intercepts high-risk commands and requires push notification approval.
version: 0.1.0
metadata:
  openclaw:
    requires:
      bins: ["node"]
      env: ["CLAWSHELL_PUSHOVER_USER", "CLAWSHELL_PUSHOVER_TOKEN"]
    primaryEnv: "CLAWSHELL_PUSHOVER_USER"
展开全部(共 122 行)
tags: [security, approval, sandbox]
---

# ClawShell

Human-in-the-loop security layer for OpenClaw. ClawShell intercepts shell commands before execution, analyzes their risk level, and requires your explicit approval (via push notification) for dangerous operations.

## How it works

1. The agent calls `clawshell_bash` instead of `bash`
2. ClawShell analyzes the command against built-in and configurable risk rules
3. Based on risk level:
   - **Critical** (e.g. `rm -rf /`, fork bombs) — automatically blocked
   - **High** (e.g. `rm -rf`, `curl` to external URLs, credential access) — sends a push notification and waits for your approval
   - **Medium** (e.g. `npm install`, `git push`) — logged and allowed
   - **Low** (e.g. `ls`, `cat`, `git status`) — allowed
4. All decisions are logged to `logs/clawshell.jsonl`

## Tools

### clawshell_bash

Secure replacement for `bash`. Analyzes command risk and executes only if safe or approved.

**Parameters:**
- `command` (string, required) — The shell command to execute
- `workingDir` (string, optional) — Working directory (defaults to cwd)

**Returns:** `{ exitCode, stdout, stderr }`

High-risk commands will block until you approve or reject via push notification. Critical commands are rejected immediately.

### clawshell_status

Returns current ClawShell state: pending approval requests and recent decisions.

**Parameters:** none

### clawshell_logs

Returns recent log entries for audit and debugging.

**Parameters:**
- `count` (number, optional) — Number of entries to return (default: 20)

## Setup

### 1. Install dependencies

```bash
cd /app/workspace/skills/clawshell
npm install
```

### 2. Configure Pushover notifications

Create a Pushover application at https://pushover.net/apps/build and add your keys to `.env`:

```env
CLAWSHELL_PUSHOVER_USER=your-user-key
CLAWSHELL_PUSHOVER_TOKEN=your-app-token
```

Alternatively, configure Telegram instead:

```env
CLAWSHELL_TELEGRAM_BOT_TOKEN=your-bot-token
CLAWSHELL_TELEGRAM_CHAT_ID=your-chat-id
```

### 3. Add to TOOLS.md

Add the following to your OpenClaw `TOOLS.md` so the agent uses ClawShell for shell commands:

```markdown
## Shell Access

Use `clawshell_bash` for ALL shell command execution. Do not use `bash` directly.
ClawShell will analyze commands for risk and require human approval for dangerous operations.

Available tools:
- `clawshell_bash(command, workingDir)` — Execute a shell command with risk analysis
- `clawshell_status()` — Check pending approvals and recent decisions
- `clawshell_logs(count)` — View recent audit log entries
```

## Configuration

ClawShell reads configuration from environment variables (`CLAWSHELL_*`) with fallback to `config.yaml`.

| Variable | Default | Description |
|---|---|---|
| `CLAWSHELL_PUSHOVER_USER` | — | Pushover user key |
| `CLAWSHELL_PUSHOVER_TOKEN` | — | Pushover app token |
| `CLAWSHELL_TELEGRAM_BOT_TOKEN` | — | Telegram bot token (alternative) |
| `CLAWSHELL_TELEGRAM_CHAT_ID` | — | Telegram chat ID (alternative) |
| `CLAWSHELL_TIMEOUT_SECONDS` | 300 | Seconds to wait for approval before auto-reject |
| `CLAWSHELL_LOG_DIR` | logs/ | Directory for JSONL log files |
| `CLAWSHELL_LOG_LEVEL` | info | Log verbosity: debug, info, warn, error |
| `CLAWSHELL_BLOCKLIST` | — | Comma-separated extra blocked commands |
| `CLAWSHELL_ALLOWLIST` | — | Comma-separated extra allowed commands |

Custom rules can also be defined in `config.yaml` under `rules.blocklist` and `rules.allowlist` using exact strings, globs, or regex patterns.

## Limitations

- **Not a security guarantee.** LLMs can encode, split, or obfuscate commands to bypass pattern matching.
- **Defense-in-depth only.** Use alongside OpenClaw's sandbox mode, not as a replacement.
- **Approval latency.** High-risk commands block execution until you respond or the timeout expires.

> **Always ask your AI to scan any skill or software for security risks.**

「运维安全」分类下的热门技能

数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。