clawshell
Human-in-the-loop security layer. Intercepts high-risk commands and requires push notification approval.
- License 许可
- MIT
- 最近更新
- 2026-08-23
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- clawshell
- tags
- [ "security", "approval", "sandbox" ]
- version
- 0.1.0
- metadata
- { "openclaw": { "requires": { "env": [ "CLAWSHELL_PUSHOVER_USER", "CLAWSHELL_PUSHOVER_TOKEN" ], "bins": [ "node" ] }, "primaryEnv": "CLAWSHELL_PUSHOVER_USER" } }
- description
- Human-in-the-loop security layer. Intercepts high-risk commands and requires push notification approval.
02 资源文件 4
- 参考文档_meta.json286 B
- 参考文档package-lock.json437 B
- 参考文档package.json58 B
- 参考文档pnpm-lock.yaml410 B
03 SKILL.md 正文
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
- The agent calls
clawshell_bashinstead ofbash - ClawShell analyzes the command against built-in and configurable risk rules
- Based on risk level:
- Critical (e.g.
rm -rf /, fork bombs) — automatically blocked - High (e.g.
rm -rf,curlto 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
- Critical (e.g.
- 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 executeworkingDir(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
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:
CLAWSHELL_PUSHOVER_USER=your-user-key
CLAWSHELL_PUSHOVER_TOKEN=your-app-token
Alternatively, configure Telegram instead:
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:
## 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.
04 同仓库更多 Skills
crowd-prompting
A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.
dilemm-ai
Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
git-summary
Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.
agent-constitution
Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.