exec-risk

A safety gate for running commands on the computer, checking each command against rules and asking a person to review commands that may be dangerous.

In plain words
What is it for?
It helps run host commands through the required gate, choose safer command forms, avoid fragile inline scripts, and handle risky system updates.
Why use it?
It reduces the chance that a shell command will damage files, expose data, or perform an unsafe operation by mistake.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/yunsii/wezdeck/exec-risk
Any agent
npx skills add yunsii/wezdeck --skill exec-risk
Clone the repo
git clone --depth 1 https://github.com/yunsii/wezdeck

Made for: Claude Code, Codex.

Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,849 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00075 $0.01849
Opus 5 $0.00037 $0.00924
Sonnet 5 $0.00015 $0.00370
Haiku 4.5 $0.00007 $0.00185

Measured 2d ago against content hash 8ab3ade152f4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

exec-risk scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

./openclaw/scripts/claw-run.sh --dry-run 'rm -rf /tmp/x' # classify only
openclaw/workspace/skills/exec-risk/SKILL.md · 170 lines

How it starts

The opening of the file, as written. The whole thing — 170 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Exec risk (layered) — option A protocol

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.

Platform vs classifier (division of labor)

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.

Required entry

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_requireddo not run; ask 飞书
3 usage / empty
4 infra fail — treat as need human (fail closed)

Stdout/stderr:

  • On deny: JSON on stdout (and stderr). Parse human_required, layer, reason.
  • On allow via claw-run: command owns stdout; gate JSON is on stderr.

Mandatory agent loop

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).

Read the full file on GitHub · 170 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 170 lines · 75 tokens per session scan C 8ab3ade152f4

Subscribe to this mod's changes

exec-risk is a skill published in the GitHub repository yunsii/wezdeck (5 stars, last pushed 6d ago), licensed MIT. It adds 75 tokens to every session and 1,849 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

workflow

Create, run, monitor, cancel, or resume deterministic JavaScript workflows that orchestrate multiple Codex, Claude, Cursor, or Kimi agents. Use for parallel investigation or review, staged agent pipelines, resumable long-running work, or when the user explicitly asks for a workflow, orchestration, fan-out, or several…

xxxoooxoxo/wiff · 70 tokens

orchestrate

Use only when the user explicitly types /orchestrate:orchestrate to decompose a large task, spawn a tree of parallel worker/subplanner/verifier subagents, and collect structured handoffs. Do not invoke autonomously.

odysseus0/claude-orchestrate · 54 tokens

launch

Launch and automate VS Code (Code OSS) using agent-browser via Chrome DevTools Protocol. Use when you need to interact with the VS Code UI, automate the chat panel, test UI features, or take screenshots of VS Code. Triggers include 'automate VS Code', 'interact with chat', 'test the UI', 'take a screenshot', 'launch…

workstream-labs/workstreams · 80 tokens

accessibility

Primary accessibility skill for VS Code. REQUIRED for new feature and contribution work, and also applies to updates of existing UI. Covers accessibility help dialogs, accessible views, verbosity settings, signals, ARIA announcements, keyboard navigation, and ARIA labels/roles.

workstream-labs/workstreams · 54 tokens

sessions

Agent Sessions window architecture — covers the sessions-first app, layering, folder structure, chat widget, menus, contributions, entry points, and development guidelines. Use when implementing features or fixing issues in the Agent Sessions window.

workstream-labs/workstreams · 45 tokens

component-fixtures

Use when creating or updating component fixtures for screenshot testing, or when designing UI components to be fixture-friendly. Covers fixture file structure, theming, service setup, CSS scoping, async rendering, and common pitfalls.

workstream-labs/workstreams · 47 tokens