Agent SkillsEverClaw/EverClaw › pii-guard

pii-guard

GitHub

防止个人身份信息(PII)泄露的安全技能。在 git push、邮件发送或外部发布前扫描内容,检测到敏感数据时硬阻断并提示用户确认,保障数据安全。

skills/pii-guard/SKILL.md EverClaw/EverClaw

Trigger Scenarios

git push 发送邮件 社交媒体发帖 ClawHub 发布 GitHub 交互 外部数据传输

Install

npx skills add EverClaw/EverClaw --skill pii-guard -g -y
More Options

Use without installing

npx skills use EverClaw/EverClaw@pii-guard

指定 Agent (Claude Code)

npx skills add EverClaw/EverClaw --skill pii-guard -a claude-code -g -y

安装 repo 全部 skill

npx skills add EverClaw/EverClaw --all -g -y

预览 repo 内 skill

npx skills add EverClaw/EverClaw --list

SKILL.md

Frontmatter
{
    "name": "pii-guard",
    "description": "Personally identifiable information (PII) leak prevention for EverClaw. Scans outbound content against configurable PII patterns before git push, email, social media, ClawHub publishing, GitHub interactions, or any external data transmission. Provides git pre-push hooks, CLI scanning tools, and hard-block enforcement with user override capability. Use when checking content for PII before external actions, adding new protected patterns, configuring git pre-push hooks, or auditing data leak prevention."
}

PII Guard — Personal Data Leak Prevention

Purpose

Prevents personal identifiable information (PII) from being sent to external services. This skill MUST be checked before any outbound action that transmits data externally.

When This Fires

Mandatory check before:

  • git push (any repo)
  • Sending emails
  • Posting to social media (X/Twitter, Moltbook, etc.)
  • Publishing to ClawHub
  • Creating/updating GitHub issues, PRs, discussions, or comments
  • Any message action to external channels with file attachments
  • Any web_fetch POST or form submission
  • Any exec command that sends data externally (curl POST, scp, rsync, etc.)

How It Works

1. Pattern File

All protected patterns live in the workspace:

~/.openclaw/workspace/.pii-patterns.json

This file is NEVER committed — it contains the very data it protects.

2. Scanning

The scanner checks content against all patterns in these categories:

  • names — Protected personal names
  • emails — Protected email addresses
  • phones — Protected phone numbers (all formats)
  • wallets — Protected blockchain addresses
  • organizations — Protected org/church/school names
  • people — Protected associate/contact names
  • websites — Protected personal domains
  • keywords — Any other protected strings

3. Behavior: HARD BLOCK

When PII is detected:

  1. STOP — Do not proceed with the external action
  2. REPORT — Tell the user exactly what was found and where
  3. WAIT — Only proceed if the user explicitly confirms after reviewing

Error format:

🚫 PII GUARD: Blocked — personal data detected

Found in: <filename or content description>
Match: "<the matched pattern>"
Category: <names|emails|phones|etc>

Action blocked: <what was about to happen>
To proceed: Remove the PII or explicitly confirm override.

4. Git Pre-Push Hook

A global git hook is installed at:

~/.openclaw/workspace/scripts/git-hooks/pre-push

Configured via: git config --global core.hooksPath ~/.openclaw/workspace/scripts/git-hooks

This runs automatically on every git push across ALL repos on this machine.

  • Scans the diff being pushed (not just HEAD)
  • Blocks push if PII detected
  • Can be bypassed with git push --no-verify (use with extreme caution)

5. Agent Integration

The agent should call pii_scan before external actions:

# Scan a file
~/.openclaw/workspace/scripts/pii-scan.sh <file_or_directory>

# Scan stdin
echo "some content" | ~/.openclaw/workspace/scripts/pii-scan.sh -

# Scan a string
~/.openclaw/workspace/scripts/pii-scan.sh --text "check this string"

Exit codes:

  • 0 — Clean, no PII found
  • 1 — PII detected (blocked)
  • 2 — Error (patterns file missing, etc.)

Adding New Patterns

Edit ~/.openclaw/workspace/.pii-patterns.json and add entries to the appropriate category array. Changes take effect immediately — no restart needed.

Security Notes

  • .pii-patterns.json must NEVER be committed to any repo
  • The patterns file itself contains PII — treat it as sensitive
  • The hook and scan scripts are safe to publish (they contain no PII)
  • When in doubt, scan first

Version History

  • f580bc4 Current 2026-07-25 11:17

Same Skill Collection

cron-packs/SKILL.md
flavors/buddybots.org/SKILL.md
memory-upgrade/SKILL.md
mission-control/SKILL.md
skills/agent-chat/SKILL.md
skills/night-shift/SKILL.md
skills/relationships/SKILL.md
skills/skillguard/SKILL.md
skills/three-shifts/SKILL.md
skills/xmtp-comms-guard/SKILL.md
three-shifts/SKILL.md
skills/prompt-guard/SKILL.md
skills/skillguard/test-fixtures/evasive-03-prompt-subtle/SKILL.md
skills/skillguard/test-fixtures/evasive-06-unicode-injection/SKILL.md
skills/skillguard/test-fixtures/evasive-10-roleplay/SKILL.md
skills/skillguard/test-fixtures/legit-api-skill/SKILL.md
skills/skillguard/test-fixtures/malicious-skill/SKILL.md
skills/skillguard/test-fixtures/clean-skill/SKILL.md
skills/skillguard/test-fixtures/evasive-01-string-concat/SKILL.md
skills/skillguard/test-fixtures/evasive-02-encoded/SKILL.md
skills/skillguard/test-fixtures/evasive-04-timebomb/SKILL.md
skills/skillguard/test-fixtures/evasive-05-alias-chain/SKILL.md
skills/skillguard/test-fixtures/evasive-07-sandbox-detect/SKILL.md
skills/skillguard/test-fixtures/evasive-08-reverse-shell/SKILL.md
skills/skillguard/test-fixtures/evasive-09-python-pickle/SKILL.md
skills/skillguard/test-fixtures/evasive-11-polyglot-json/SKILL.md
skills/skillguard/test-fixtures/evasive-12-multi-stage/SKILL.md

Metadata

Files
0
Version
3227fb7
Hash
f997a320
Indexed
2026-07-25 11:17

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-22 00:55
浙ICP备14020137号-1 $mapa de visitantes$