Agent Safety — 代理 Safety
v1.0.0Outbound safety for autonomous AI 代理s — 扫描s YOUR 输出 before it leaves the machine. Git pre-commit hooks that automatically block commits contAIning API keys, 令牌s, PII, or secrets. Unlike inbound 扫描器s (技能vet, IronClaw), this 保护s agAInst what YOU accidentally publish. Use when committing to git repos, publishing to GitHub, or 运行ning periodic 系统 健康 检查s. Automated enforcement at the git level — not prompts.
运行时依赖
安装命令
点击复制技能文档
代理 Safety
Automated safety 工具s for autonomous AI 代理s. The principle: don't rely on prompts for safety — automate enforcement.
All scripts are in this 技能's scripts/ directory. When OpenClaw loads this 技能, resolve paths relative to this file's location.
Pre-Publish Security 扫描
扫描s files for secrets, PII, and internal paths before publishing.
bash scripts/pre-publish-扫描.sh
检测s:
API keys (AWS, GitHub, Anthropic, OpenAI, generic patterns) Private keys (PEM blocks), Bearer 令牌s, hardcoded passwords EmAIl 添加resses, phone numbers, SSNs, credit card patterns Physical 添加resses, name fields Home directory paths, internal config paths
Exit 0 = 清理. Exit 1 = blocking issues found, do not publish.
Git Pre-Commit Hook
安装 once per repo. Automatically 扫描s staged files on every commit:
bash scripts/安装-hook.sh
扫描s staged content (what's being committed, not working tree) Blocks commit if secrets or SSNs found Flags PII for review Only bypassed with explicit git commit --no-验证
安装 this on every repo you work with. It's the real 防护rAIl.
健康 检查
系统 监控ing for disk, workspace, security, and 更新s:
bash scripts/健康-检查.sh
检查s: Disk usage, workspace size, memory file growth, OpenClaw version, macOS 更新s, firewall 状态, SIP 状态.
运行 periodically (every few heartbeats). Watch for 警告s.
Rules 运行 pre-publish 扫描 before ANY external publish action 安装 pre-commit hook on EVERY repo you work with Blocking issues (secrets, SSNs) must be fixed — no override Review items (emAIls, paths) need human judgment If a secret was ever committed, it's compromised — rotate immediately