← 返回 Skills 市场
compass-soul

Agent Safety

作者 compass-soul · GitHub ↗ · v1.0.0
cross-platform ✓ 安全检测通过
782
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install agent-safety
功能描述
Outbound safety for autonomous AI agents — scans YOUR output before it leaves the machine. Git pre-commit hooks that automatically block commits containing A...
使用说明 (SKILL.md)

Agent Safety

Automated safety tools for autonomous AI agents. The principle: don't rely on prompts for safety — automate enforcement.

All scripts are in this skill's scripts/ directory. When OpenClaw loads this skill, resolve paths relative to this file's location.

Pre-Publish Security Scan

Scans files for secrets, PII, and internal paths before publishing.

bash scripts/pre-publish-scan.sh \x3Cfile-or-directory>

Detects:

  • API keys (AWS, GitHub, Anthropic, OpenAI, generic patterns)
  • Private keys (PEM blocks), Bearer tokens, hardcoded passwords
  • Email addresses, phone numbers, SSNs, credit card patterns
  • Physical addresses, name fields
  • Home directory paths, internal config paths

Exit 0 = clean. Exit 1 = blocking issues found, do not publish.

Git Pre-Commit Hook

Install once per repo. Automatically scans staged files on every commit:

bash scripts/install-hook.sh \x3Crepo-path>
  • Scans 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-verify

Install this on every repo you work with. It's the real guardrail.

Health Check

System monitoring for disk, workspace, security, and updates:

bash scripts/health-check.sh

Checks: Disk usage, workspace size, memory file growth, OpenClaw version, macOS updates, firewall status, SIP status.

Run periodically (every few heartbeats). Watch for warnings.

Rules

  1. Run pre-publish scan before ANY external publish action
  2. Install pre-commit hook on EVERY repo you work with
  3. Blocking issues (secrets, SSNs) must be fixed — no override
  4. Review items (emails, paths) need human judgment
  5. If a secret was ever committed, it's compromised — rotate immediately
安全使用建议
This skill appears to do what it says: inspect the included scripts before use, and be aware that install-hook.sh will create/overwrite a .git/hooks/pre-commit file in any repo you point it at (it is repo-local but will block commits until pass or you use --no-verify). The scanner prints filenames and match categories but does not exfiltrate file contents. Note health-check uses macOS-specific tools (softwareupdate, csrutil, firewall utility) and runs npm/openclaw queries that may contact the network for version checks. Review the regex rules in pre-publish-scan.sh to confirm they match your expectations (may produce false positives/negatives) and test the hook on a safe repo before installing broadly. If you previously committed secrets, follow the skill's guidance to rotate them — the scanner cannot undo prior exposure.
功能分析
Type: OpenClaw Skill Name: agent-safety Version: 1.0.0 The OpenClaw AgentSkills skill bundle is designed for agent safety, providing tools to scan for secrets, PII, and malicious patterns before publishing or committing. The `SKILL.md` and `README.md` clearly state this defensive purpose, and do not contain any prompt injection attempts with malicious intent. The `health-check.sh` script performs legitimate system monitoring, including checking for software updates via external network calls (npm, softwareupdate), without exfiltrating sensitive data. The `install-hook.sh` script installs a git pre-commit hook that uses `pre-publish-scan.sh` to analyze staged content for security issues. The `pre-publish-scan.sh` script is a defensive tool that actively detects and blocks patterns indicative of data exfiltration (e.g., `webhook.site`, `ngrok.io`), reverse shells (`/dev/tcp/`), bulk environment variable harvesting, and sensitive file access (`/etc/passwd`, `~/.ssh`), rather than performing these actions itself. All observed behaviors align with the stated purpose of enhancing security and preventing accidental data leaks.
能力评估
Purpose & Capability
Name/description claim outbound scanning and git-level enforcement; included scripts (pre-publish-scan.sh, install-hook.sh, health-check.sh) implement exactly that. No unrelated credentials, binaries, or install artifacts are requested. Reading OpenClaw workspace files and checking system state is consistent with the described health checks.
Instruction Scope
SKILL.md instructs running the provided scripts and installing the pre-commit hook. The scripts operate on staged files or the specified workspace and do not send scanned content to external endpoints. Health check runs local system queries (openclaw --version, npm view, softwareupdate, csrutil) — these are expected for version/update checks but are macOS-specific and may fail on other OSes.
Install Mechanism
No network download or extract install mechanism; this is an instruction-only skill with included scripts. install-hook.sh writes a repo-local .git/hooks/pre-commit file (intended behavior). There are no remote fetches of arbitrary code during install.
Credentials
The skill declares no required env vars or credentials. Scripts read files under $HOME/.openclaw/workspace and run local system commands; that access is coherent with the purpose of scanning workspace context and health-checking the system.
Persistence & Privilege
always:false and user-invocable: true. The only persistent change performed by the provided scripts is installation of a repo-local git pre-commit hook. The skill does not request global/system privileges or modify other skills' configs.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install agent-safety
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /agent-safety 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of agent-safety: automated outbound safety tools for autonomous AI agents. - Scans output for secrets, tokens, PII, and internal paths before files leave your machine. - Includes a git pre-commit hook to block commits with API keys, passwords, or sensitive info. - Provides a pre-publish security scanner for files and directories. - Adds a health-check script for monitoring system and workspace security. - Designed for automated enforcement at the git level; does not rely on prompts.
元数据
Slug agent-safety
版本 1.0.0
许可证
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Agent Safety 是什么?

Outbound safety for autonomous AI agents — scans YOUR output before it leaves the machine. Git pre-commit hooks that automatically block commits containing A... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 782 次。

如何安装 Agent Safety?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install agent-safety」即可一键安装,无需额外配置。

Agent Safety 是免费的吗?

是的,Agent Safety 完全免费(开源免费),可自由下载、安装和使用。

Agent Safety 支持哪些平台?

Agent Safety 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Agent Safety?

由 compass-soul(@compass-soul)开发并维护,当前版本 v1.0.0。

💬 留言讨论