Agent Safety for Openclaw

An automated outbound security framework that prevents AI agents from leaking secrets, PII, or internal system configurations.

compass-soul
v1.0.0
Feb 16, 2026
0
1.5k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install agent-safety

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install agent-safety using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Agent Safety?

Agent Safety is a critical security layer designed specifically for autonomous AI agents. While most security tools focus on inbound prompt injection, this skill prioritizes outbound protection by scanning output before it ever leaves the machine. It ensures that Openclaw Skills maintain a high standard of data privacy and operational security by preventing the accidental publication of sensitive credentials or internal metadata.

By implementing automated enforcement at the system and git levels, Agent Safety removes the reliance on LLM self-correction for security. It provides developers with peace of mind when using Openclaw Skills in production environments, ensuring that every commit and publication is verified against a strict set of safety rules.

Agent Safety Use Cases

  • Preventing the accidental leak of API keys for services like Anthropic, OpenAI, or AWS during development.
  • Automatically blocking git commits that contain PII such as Social Security Numbers, credit card patterns, or phone numbers.
  • Auditing directories for internal home paths or configuration files before sharing code or data externally.
  • Monitoring the local machine's health, including disk usage and firewall status, to ensure a stable environment for Openclaw Skills.

How Agent Safety Works

  1. The security scripts reside in the scripts directory and are triggered manually or via automated workflows.
  2. The pre-publish scanner parses files for specific regex patterns matching secrets, private PEM blocks, and sensitive identifiers.
  3. A git pre-commit hook can be installed to intercept git commit actions, scanning only the staged changes rather than the entire working tree.
  4. If the scanner detects high-risk items like SSNs or hardcoded passwords, it exits with a non-zero code to block the action.
  5. Periodic health checks are executed to report on system-level security metrics like SIP status and memory growth, providing a holistic view of the agent environment.

Agent Safety Setup

To secure a specific repository with git hooks, run:

bash scripts/install-hook.sh <repo-path>

To perform a manual scan on a directory or file before publishing to the web, use:

bash scripts/pre-publish-scan.sh <file-or-directory>

To verify the health and security status of the host machine running Openclaw Skills, execute:

bash scripts/health-check.sh

Agent Safety Data Schema & Taxonomy

Category Pattern / Data Type Enforcement Level
Secrets API Keys, PEM Blocks, Bearer Tokens Blocking (Exit 1)
PII SSNs, Credit Card Numbers, Emails Blocking / Review Required
System Home Paths, Config Paths, Internal IPs Review Required
Infrastructure Disk Usage, SIP Status, Firewall Status Warning/Reporting

Agent Safety Advanced Features

  • Localized scanning that ensures sensitive data never reaches a remote server for processing.
  • Deep integration with git version control to provide real-time guardrails for Openclaw Skills.
  • Comprehensive health monitoring that tracks workspace size and system updates to prevent environment degradation.
  • Support for custom pattern detection, allowing users to extend the scanner to include company-specific internal identifiers.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*