一键导入
exec-risk
Host shell MUST go through claw-run (gate then exec). Three layers: rules → Grok re-check → human only if still danger. Prefer claw-run over bare exec.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Host shell MUST go through claw-run (gate then exec). Three layers: rules → Grok re-check → human only if still danger. Prefer claw-run over bare exec.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Ledger development tasks to Feishu Base via dev-task-ledger.sh. Write roots from ~/.openclaw/tasks-allowlist.json (per agent). Use on accept/confirm/close of coding/ops work; not for pure Q&A.
Drive the machine Chrome debug browser via OpenClaw-managed MCP (chrome-devtools). Use for page navigation, snapshots, screenshots, clicks, forms, console/network inspection — not for host shell risk.
Allowlisted development (wezdeck (+ optional team roots in local config)) under OpenClaw: wezdeck defaults to primary master; claw worktrees when parallel/isolation needed; 团队仓 still prefers claw-*; human/Claw rails (H1/H2, C1/C2/C3), ACP access layer.
Full error closed-loop for Dex (Main): diagnose, safe self-fix, verify, report; platform Exec failed handling; escalation with options. Load when handling failures or writing failure reports.
Multi-role adversarial code review for allowlisted repos. Agent loads this skill and runs host scripts (find → refute → sandbox repro); humans only state intent (e.g. 审一下 / 对抗审查). Use when user asks for adversarial review, task acceptance recommends review, or runtime code changed before merge.
Multi-role adversarial code review for this repo. Agent loads this skill and runs host scripts (find → refute → sandbox repro). Humans only state intent (审一下 / 对抗审查). Use when user asks for adversarial review, acceptance recommends review, or runtime code changed before merge.
| name | exec-risk |
| description | Host shell MUST go through claw-run (gate then exec). Three layers: rules → Grok re-check → human only if still danger. Prefer claw-run over bare exec. |
OpenClaw exec.mode=full does not hard-block host shell. You enforce
this skill on every host command. Skipping the gate is a protocol violation.
| Layer | Local setting | Role |
|---|---|---|
| OpenClaw host policy | mode=full, ask=off | No /approve spam for normal shell |
OpenClaw strictInlineEval | false (personal OpenClaw · Dex) | Do not hard-block xargs / -c at platform |
This skill (claw-run / gate) | always | Semantic risk: rules → Grok → 飞书 if danger |
strictInlineEval=false does not disable the classifier. It only removes
platform /approve on inline carriers. Risk control is claw-run + Feishu.
Prefer: rg -l 'pat' packages over find … \| xargs rg.
Classifier soft-covers high-risk inline forms (python -c, xargs rm/sh, …);
innocent xargs rg is not auto-danger — still run via claw-run.
Prefer claw-run.sh (gate + run in one step):
# From repo root, or use absolute path under wezterm-config/openclaw/scripts/
./openclaw/scripts/claw-run.sh -- git status
./openclaw/scripts/claw-run.sh 'ls -la'
./openclaw/scripts/claw-run.sh --dry-run 'rm -rf /tmp/x' # classify only
Gate-only (inspect without running):
./openclaw/scripts/claw-exec-gate.sh '<command>'
| exit | meaning |
|---|---|
| 0 | allow (or command finished after allow) |
| 2 | human_required — do not run; ask 飞书 |
| 3 | usage / empty |
| 4 | infra fail — treat as need human (fail closed) |
Stdout/stderr:
human_required, layer, reason.claw-run: command owns stdout; gate JSON is on stderr.before ANY host shell (exec / bash -c / pipelines):
1. Prefer: claw-run.sh [--] <command>
Or: claw-exec-gate.sh <command> then run only if decision=allow
2. If exit 2 or human_required=true:
- 飞书说明 layer + reason + 完整命令
- 等待用户明确同意(是 / 确认 / yes)
- 仅在同意后: claw-run.sh --force -- <same command>
3. Never invent --force. Never “先跑再报”.
4. Trivial probes still go through claw-run (rules allow instantly; no LLM).
Exceptions (no gate):
claw-exec-gate.sh / claw-exec-classify.sh / claw-run.sh themselvescommand
→ 1) claw-exec-classify.sh (rules)
safe | write → ALLOW (stop; no LLM, no human)
danger → 2)
→ 2) Grok simple classifier (grok-proxy /responses)
safe | write → ALLOW (rule false-positive cleared)
danger → 3)
→ 3) Human (Feishu)
explain + wait for explicit yes
→ claw-run.sh --force -- '<command>'
Flags (gate / run):
| flag | effect |
|---|---|
--skip-llm / CLAW_RUN_SKIP_LLM=1 | rules only; danger always human |
--always-llm (gate only) | also LLM on safe/write |
--force / CLAW_RUN_FORCE=1 | skip gate after human yes |
--dry-run (run only) | gate decision only, no exec |
Enough for: plan, worktree 初评, reuse, ledger, whether to write code.
Not enough for: host shell — still claw-run / gate.
| label | Meaning |
|---|---|
| safe | probe / read-only |
| write | normal dev (still no force-push main without chat confirm per AGENTS) |
| danger | destructive / secret / pipe-to-shell → human |
Keep rule patterns simple; extend claw-exec-classify.sh when real misses appear.
Do not reconfigure OpenClaw allowlist to replace this skill unless the user
explicitly asks for hybrid hard-block (allowlist only claw-run). Default is
protocol + wrapper (option A).