Install
openclaw skills install skill-privacy-guardSTOPS all sensitive information from entering skill files. Automatically blocks usernames, paths, personal data when creating or updating skills. CRITICAL - highest priority.
openclaw skills install skill-privacy-guardPREVENTS sensitive information from entering skill files. Acts as a security gate that blocks personal data, ensuring all skills remain generic and shareable.
AUTO-TRIGGER after:
CRITICAL: This skill has TOP PRIORITY. Always run after skill modifications.
Replace OS-specific absolute paths with generic notation:
| Pattern | Replace With |
|---|---|
C:\Users\{username}\ | ~/ |
/home/{username}/ | ~/ |
/Users/{username}/ | ~/ |
C:\Users\{username}\.claude\ | ~/.claude/ |
D:\Projects\myproject\ | ~/projects/example/ |
/var/www/mysite/ | /var/www/example/ |
Replace actual usernames with generic placeholders:
| Context | Replace With |
|---|---|
| File paths | alice, bob, user |
| Profile names | {username} placeholder |
| Session examples | Generic names |
| Employee IDs | EMP-12345 |
| User IDs | user-id-123 |
CRITICAL - Block all network identifiers:
192.0.2.1 (TEST-NET-1), 10.0.0.1 (generic private)00:00:00:00:00:00 or {MAC}server1.example.com, host.local8080 (generic), avoid specific service ports.example.com, .localvpn.example.comlb.example.comNEVER INCLUDE - Remove immediately:
Sanitize all connection information:
example_db, myapp_produsers, products (generic)public, mainredis.example.com:6379Example:
Before: mongodb://admin:pass123@10.1.2.3:27017/mycompany
After: mongodb://{user}:{pass}@{host}:{port}/{database}
Remove or genericize:
user@example.com+1-555-0100 (reserved)Alice Smith, Bob Jones123 Main St, Anytown, ST 12345Acme Corp, Example Inc4111-1111-1111-1111 (test card)XXX-XX-XXXXXXXXXXXXXDL-XXXXXXXSanitize cloud-specific information:
123456789012 (example)AKIAIOSFODNN7EXAMPLEmy-project-12345{subscription-id}registry.example.com/imagemy-bucket-example{distribution-id}Sanitize VCS information:
abc1234 (generic)feature/example-featureuser/example-repoExample:
Before: https://user:token@github.com/mycompany/private-repo.git
After: https://github.com/example-org/example-repo.git
Replace specific dates in examples:
2026-01-15 (generic date)2026-01-01T00:00:00Z{YYYY-MM-DD}, {timestamp}Sanitize web resources:
https://internal.example.comhttps://hooks.example.com/{id}https://admin.example.comNEVER include:
Remove if contextual:
{hash}Genericize:
internal-tool, corp-systemAfter a skill file is created or modified, automatically:
Regular expressions to check:
# ===== FILE PATHS =====
# Windows paths with username
C:\\Users\\[^\\]+\\
# Unix paths with username
/home/[^/]+/
/Users/[^/]+/
# Absolute paths
[A-Z]:\\[^`\n]+
/var/www/(?!example)[^/\s]+
# ===== NETWORK =====
# IP addresses (IPv4) - excluding reserved ranges
\b(?!(?:10\.|172\.(?:1[6-9]|2[0-9]|3[01])\.|192\.168\.|192\.0\.2\.|127\.))\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b
# IPv6 addresses
\b(?:[0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}\b
# MAC addresses
\b(?:[0-9A-Fa-f]{2}[:-]){5}[0-9A-Fa-f]{2}\b
# Private hostnames (not example.com/localhost)
\b(?!example\.com|localhost)[a-z0-9-]+\.(local|internal|corp|lan)\b
# ===== CREDENTIALS & SECRETS =====
# AWS Access Key IDs
\b(?:AKIA|ASIA)[0-9A-Z]{16}\b
# AWS Secret Keys
\b[A-Za-z0-9/+=]{40}\b
# Generic API keys
\b[aA][pP][iI][-_]?[kK][eE][yY]\s*[:=]\s*['\"]?[A-Za-z0-9_\-]{20,}
# Bearer tokens
[Bb]earer\s+[A-Za-z0-9\-._~+/]+=*
# Basic auth in URLs
https?://[^:]+:[^@]+@
# JWT tokens
eyJ[A-Za-z0-9_-]*\.eyJ[A-Za-z0-9_-]*\.[A-Za-z0-9_-]*
# Private keys
-----BEGIN\s+(?:RSA\s+)?PRIVATE\s+KEY-----
# ===== PERSONAL INFORMATION =====
# Real email addresses (not example.com)
\b[A-Za-z0-9._%+-]+@(?!example\.com|test\.com|demo\.com)[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b
# Phone numbers (various formats)
\+?1?[-.\s]?\(?[0-9]{3}\)?[-.\s]?[0-9]{3}[-.\s]?[0-9]{4}
# SSN format
\b\d{3}-\d{2}-\d{4}\b
# Credit card numbers
\b(?:\d{4}[-\s]?){3}\d{4}\b
# ===== USERNAMES & IDS =====
# Specific usernames in file patterns
\b([a-z]{5,}_(python|java|go|cpp))\b
# Employee IDs
\b(?:EMP|EMPLOYEE)[-_]?\d{4,}\b
# User IDs in paths
/users?/\d{5,}/
# ===== DATABASE =====
# Connection strings with credentials
(?:mongodb|mysql|postgresql|redis)://[^:]+:[^@]+@[^/\s]+
# Database hosts with specific names
\b(?:db|database|sql|mongo|redis)[-.](?!example)[a-z0-9-]+\.[a-z]{2,}\b
# ===== CLOUD & SERVICES =====
# AWS Account IDs (12 digits, not example)
\b(?!123456789012)\d{12}\b
# Docker private registries
\b(?!registry\.example\.com)[a-z0-9.-]+\.(?:azurecr\.io|gcr\.io|dkr\.ecr\.[a-z0-9-]+\.amazonaws\.com)
# S3 bucket names (specific ones)
s3://(?!example-bucket)[a-z0-9.-]{3,63}/
# ===== VERSION CONTROL =====
# Git URLs with credentials
git@(?!github\.com/example)[a-z0-9.-]+:[^/\s]+/[^\s]+\.git
https?://[^:]+:[^@]+@(?:github|gitlab|bitbucket)\.com
# Personal Git commit hashes in context
\bcommit\s+[0-9a-f]{7,40}\b
# ===== DATES WITH CONTEXT =====
# Recent specific dates (2024-2026 range)
202[4-6]-(?:0[4-9]|1[0-2])-(?:[0-2][0-9]|3[01])
# Timestamps with recent dates
202[4-6]-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}
# ===== OTHER =====
# File hashes (MD5, SHA1, SHA256) in personal context
\b[a-f0-9]{32}\b
\b[a-f0-9]{40}\b
\b[a-f0-9]{64}\b
# License keys (typical patterns)
\b[A-Z0-9]{5}-[A-Z0-9]{5}-[A-Z0-9]{5}-[A-Z0-9]{5}\b
# Internal tool/service names
\b(?:corp|internal|prod|staging)[-_][a-z0-9-]+\b
Create a sanitized version with:
Path replacements:
C:\Users\*\.claude\ → ~/.claude/
/home/*/.claude/ → ~/.claude/
/Users/*/.claude/ → ~/.claude/
Username replacements in examples:
john_python.md → alice_python.md
mary_java.md → bob_java.md
userspecificname → {username}
Date replacements in examples:
Recent specific dates → Generic dates (2026-01-15)
Before finalizing any skill, verify:
✓ Credentials & Secrets
✓ Network Information
✓ Personal Information
✓ Infrastructure
✓ Identifiers
✓ File Paths
~/ notationAfter sanitization, output:
🔒 Skill Sanitized: {skill_name}
Security scan completed:
✓ {N} absolute path(s) → replaced with ~/
✓ {N} username(s) → replaced with generic names
✓ {N} IP address(es) → replaced with TEST-NET
✓ {N} email(s) → replaced with example.com
✓ {N} credential(s) → REMOVED
✓ {N} date(s) → replaced with generic dates
✓ {N} hostname(s) → replaced with example.com
✓ {N} connection string(s) → replaced with placeholder
✓ {N} other sensitive item(s) → removed/replaced
🛡️ Skill is now secure, generic, and shareable.
If no sensitive info found:
✓ Skill already secure: {skill_name}
No sensitive information detected.
If CRITICAL issues found (credentials, keys):
🚨 CRITICAL: Blocked sensitive data in {skill_name}
REMOVED:
⚠️ {N} API key(s)
⚠️ {N} password(s)
⚠️ {N} private key(s)
⚠️ {N} token(s)
These items were completely removed (not replaced).
Manual review recommended.
{username}, {domain} intact~/ notationusername, password as variable names in code examples{username}, {domain}, {api-key} already in placeholder formatpython, java, nodejs as technology namesalice, bob, user already used as generic names192.0.2.x, 10.0.0.x already in use as examplesexample.com, test.com, localhost+1-555-0100 series (already reserved)user-id-123, session-abc in placeholder formatLocalhost & Local Development:
localhost, 127.0.0.1, 0.0.0.0192.168.1.100Ports:
Documentation URLs:
Code Examples:
Error Messages:
Log Samples:
User can explicitly trigger with:
Then follow the same process above.