Install
openclaw skills install @yottameta/yotta-guardian元盾 —— 跨智能体的危险调用拦截护栏:确定性规则引擎 + 可插拔意图验证(不绑模型),拦截危险 exec / write / edit / read / run / shell 工具调用,提供审计日志。触发:代理要执行高风险命令(递归删除、磁盘格式化、提权、防火墙改动、反向 shell、下载即执行等)、要写入系统敏感路径或修改系统配置、要在执行危险操作前做安全检查、或用户说 护栏/拦截/危险操作/安全检查 等。边界:默认只读评估,不自动执行也不放行危险操作;不替代用户决策;不隐藏审计记录;规则可配置。
openclaw skills install @yottameta/yotta-guardian跨智能体的工具调用拦截护栏:确定性规则引擎 + 可插拔意图验证,对 exec / write / edit / read / run / shell 工具调用做安全评估,输出 allow / deny + 命中规则 + 审计日志。
零依赖(Python 3.8+ 标准库),Windows + Linux + macOS 通用;Claude Code / Cursor / Codex / 通用 Agent 均可调用。
Do NOT trigger:
Windows 用 python,Linux/macOS 用 python3。
_BT_bash
python3 scripts/yotta_guardian.py check exec --cmd "git status"
python3 scripts/yotta_guardian.py check exec --cmd "rm -rf /"
python3 scripts/yotta_guardian.py check write --path /etc/passwd --content "..."
python3 scripts/yotta_guardian.py check --batch calls.json --json
python3 scripts/yotta_guardian.py check exec --cmd "..." --audit-log .yotta-guardian/audit.jsonl
python3 scripts/yotta_guardian.py audit --file .yotta-guardian/audit.jsonl --tail 20
_BT_
check(单条或 --batch 批量)。--allow / --allow-path / 自定义规则文件放行并留审计记录;不要绕过检查。--audit-log 落审计日志,供追溯。| 策略 | 行为 |
|---|---|
| default(默认) | 拒绝 critical / high;中危警告(exit 1) |
| strict | 拒绝 medium 及以上;低危也提示 |
| loose | 仅拒绝 critical;高危仅警告 |
--heuristic:启用内置本地启发式验证(对高影响动词升级为需人工确认);--verifier "命令" 或配置文件:外接任意意图验证器(如 LLM 网关),协议见 references/intent-verifier.md。本技能用于防止误操作与提升操作透明度,不替代人工决策。执行危险操作前请自行确认授权与合规。