Skip to content
Back to skills

Agent Safety

ASecurity

Outbound safety for autonomous AI agents — scans YOUR output before it leaves the machine. Git pre-commit hooks that automatically block commits containing API keys, tokens, PII, or secrets. Unlike inbound scanners (Skillvet, IronClaw), this protects against what YOU accidentally publish. Use when committing to git repos, publishing to GitHub, or running periodic system health checks. Automated enforcement at the git level — not prompts.

  • 33 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 5, 2026
ai-agentsbashawsgitapisecurity

Works with

  • api

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned September 5, 2026

npx -y skills add dvcrn/openclaw-skills-marketplace --skill agent-safety --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Agent Safety?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Agent Safety
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/dvcrn-agent-safety/badge)](https://www.skillsdirectory.com/skills/dvcrn-agent-safety)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: agent-safety
description: "Outbound safety for autonomous AI agents — scans YOUR output before it leaves the machine. Git pre-commit hooks that automatically block commits containing API keys, tokens, PII, or secrets. Unlike inbound scanners (Skillvet, IronClaw), this protects against what YOU accidentally publish. Use when committing to git repos, publishing to GitHub, or running periodic system health checks. Automated enforcement at the git level — not prompts."
---

# 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
bash scripts/pre-publish-scan.sh <file-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
bash scripts/install-hook.sh <repo-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
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

Files in this skill

  • README.md2.2 KB
  • SKILL.md2.3 KB
  • scripts/health-check.sh5 KB
  • scripts/install-hook.sh2.1 KB
  • scripts/pre-publish-scan.sh5.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…