Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/useai-pro/openclaw-skills-security --skill output-sanitizer- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads output-sanitizer automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Output Sanitizer
You are an output sanitizer for OpenClaw. Before the agent's response is shown to the user or logged, scan it for accidentally leaked sensitive information and redact it.
Why Output Sanitization Matters
AI agents can accidentally include sensitive data in their responses:
- A code review skill might quote a hardcoded API key it found
- A debug skill might dump environment variables in error output
- A test generator might include database connection strings in test fixtures
- A documentation skill might include internal server paths
What to Scan and Redact
1. Credentials and Secrets
Detect and replace with [REDACTED]:
| Type | Pattern | Example |
|---|---|---|
| AWS Access Key | AKIA[0-9A-Z]{16} | AKIA3EXAMPLE7KEY1234 |
| AWS Secret Key | 40-char base64 after access key | wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY |
| OpenAI API Key | sk-[a-zA-Z0-9]{48} | sk-proj-abc123... |
| Anthropic Key | sk-ant-[a-zA-Z0-9-]{80,} | sk-ant-api03-... |
| GitHub Token | ghp_[a-zA-Z0-9]{36} | ghp_xxxxxxxxxxxx |
| Generic Passwords | password\s*[:=]\s*['"][^'"]+['"] | password: "hunter2" |
| Private Keys | -----BEGIN.*PRIVATE KEY----- | PEM-formatted keys |
| JWT Tokens | eyJ[a-zA-Z0-9_-]+\.eyJ[a-zA-Z0-9_-]+ | Full JWT strings |
| Database URLs | <db-scheme>://[^\s]+ | postgres://user:pass@host:5432/db |
Note: <db-scheme> usually includes postgres, mysql, mongodb.
2. Personally Identifiable Information (PII)
Detect and mask:
| Type | Action | Example |
|---|---|---|
| Email addresses | Mask local part: j***@example.com | john.doe@company.com |
| Phone numbers | Mask digits: +1 (***) ***-1234 | Last 4 visible |
| SSN / National IDs | Full redaction: [SSN REDACTED] | Any 9-digit pattern with dashes |
| Credit card numbers | Mask: ****-****-****-1234 | Last 4 visible |
| IP addresses (private) | Keep as-is (usually config) | 192.168.1.1 |
| IP addresses (public) | Evaluate context | May need redaction |
3. Internal System Information
Redact or generalize:
| Type | Action |
|---|---|
| Full home directory paths | Replace /Users/john/ with ~/ |
| Internal hostnames | Replace with [internal-host] |
| Internal URLs/endpoints | Replace domain with [internal] |
| Stack traces with internal paths | Simplify to relative paths |
| Docker/container IDs | Truncate to first 8 chars |
4. Source Code Secrets
When the agent outputs code snippets, check for:
- Hardcoded connection strings
- API keys in configuration objects
- Passwords in environment variable defaults
- Private keys embedded in source
- Webhook URLs with tokens
Sanitization Protocol
Step 1: Scan
Run all detection patterns against the output text.
Step 2: Classify
For each finding:
- Critical: Credentials, private keys, tokens → always redact
- High: PII, database URLs → redact unless explicitly debugging
- Medium: Internal paths, hostnames → generalize
- Low: Non-sensitive but internal → leave but flag
Step 3: Redact
Replace sensitive values while preserving context:
BEFORE:
Database connected at postgres://admin:s3cr3t_p4ss@db.internal:5432/prod
AFTER:
Database connected at postgres://[REDACTED]@[REDACTED]:5432/[REDACTED]
BEFORE:
Error in /Users/john.smith/projects/secret-project/src/auth.ts:42
AFTER:
Error in ~/projects/.../src/auth.ts:42
Step 4: Report
OUTPUT SANITIZATION REPORT
==========================
Items scanned: 1
Redactions made: 3
[CRITICAL] API Key detected and redacted (line 15)
Type: OpenAI API Key
Action: Replaced with [REDACTED]
[HIGH] Email address detected and masked (line 28)
Type: PII - Email
Action: Masked local part
[MEDIUM] Full home directory path generalized (line 42)
Type: Internal path
Action: Replaced with ~/
Rules
- Always err on the side of over-redacting — a false positive is better than a leaked secret
- Never log or store the original sensitive values
- Maintain readability after redaction — the output should still make sense
- If an entire response is sensitive (e.g., dumping .env), replace with a warning instead
- Do not redact values in code that the user explicitly asked to see (e.g., "show me my .env") — but warn them
FAQ
What does the output-sanitizer skill do?
Sanitize OpenClaw agent output before display. Strips leaked credentials, PII, internal paths, and sensitive data from responses.
How do I install output-sanitizer?
Run npx skills add https://github.com/useai-pro/openclaw-skills-security --skill output-sanitizer in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/output-sanitizer/ (personal) or .claude/skills/output-sanitizer/ (project).
Which AI agents can use output-sanitizer?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is output-sanitizer safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains output-sanitizer?
It is published by useai-pro in useai-pro/openclaw-skills-security. It has 476 recorded installs.
More from useai-pro/openclaw-skills-security
skill-vetter
useai-pro/openclaw-skills-security
Security-first vetting for OpenClaw skills. Use before installing any skill from ClawHub, GitHub, or other sources. Checks for red flags, permission scope, and suspicious patterns.
skill-auditor
useai-pro/openclaw-skills-security
Comprehensive security auditor for OpenClaw skills. Checks for typosquatting, dangerous permissions, prompt injection, supply chain risks, and data exfiltration patterns — before you install anything.
skill-guard
useai-pro/openclaw-skills-security
Runtime security monitor for active OpenClaw skills. Watches file access, network calls, and shell commands. Flags anomalous behavior and enforces permission boundaries.
prompt-guard
useai-pro/openclaw-skills-security
Detect and neutralize prompt injection attacks in OpenClaw skill content, user inputs, and external data sources. Prevents instruction hijacking and context manipulation.
credential-scanner
useai-pro/openclaw-skills-security
Scan your project for exposed credentials, API keys, and secrets before running OpenClaw skills. Prevents accidental exfiltration.
dependency-auditor
useai-pro/openclaw-skills-security
Audit npm, pip, and Go dependencies that OpenClaw skills try to install. Checks for known vulnerabilities, typosquatting, and malicious packages.
Popular security skills
azure-compliance
microsoft/azure-skills
Run Azure compliance and security audits with azqr plus Key Vault expiration checks. Covers best-practice assessment, resource review, policy/compliance validation, and security posture checks. WHEN: compliance scan, security audit, BEFORE running azqr (compliance cli tool), Azure best practices, Key Vault expiration check, expired certificates, expiring secrets, orphaned resources, compliance assessment.
minimal-run-and-audit
lllllllama/rigorpilot-skills
Rigor Run skill for README-first deep learning repo reproduction. Use when the task is specifically to capture or normalize evidence from the selected smoke test or documented inference or evaluation command and write standardized reprooutputs/ files, including patch notes when repository files changed. Do not use for training execution, initial repo intake, generic environment setup, paper lookup, target selection, hidden scientific-meaning changes, or end-to-end orchestration by itself.
seo-audit
coreyhaines31/marketingskills
When the user wants to audit, review, or diagnose SEO issues on their site. Also use when the user mentions "SEO audit," "technical SEO," "why am I not ranking," "SEO issues," "on-page SEO," "meta tags review," "SEO health check," "my traffic dropped," "lost rankings," "not showing up in Google," "site isn't ranking," "Google update hit me," "page speed," "core web vitals," "crawl errors," "indexing issues," "stuck on page 2," "striking distance keywords," "title tag rewrite," "low CTR," "local SEO," "Google Business Profile," or "map pack." Use this even if the user just says something vague like "my SEO is bad" or "help with SEO" — start with an audit. For building pages at scale to target keywords, see programmatic-seo. For adding structured data, see schema. For AI search optimization, see ai-seo.
firebase-security-rules-auditor
firebase/agent-skills
Audits Firebase (Firestore, Cloud Storage) security rules for vulnerabilities, privilege escalation, role bypasses, create vs update inconsistencies, resource exhaustion, type safety, size limits, and hasOnly ownership checks. Use when auditing/reviewing rules, running red-team rule assessments, or scoring against auditor checklists. Don't use for Firebase CLI (login, deploy), Auth, Crashlytics, Remote Config, or database queries.
audit
pbakaus/impeccable
Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review.
competitors
coreyhaines31/marketingskills
When the user wants to create competitor comparison or alternative pages for SEO and buyer-facing use. Also use when the user mentions 'alternative page,' 'vs page,' 'competitor comparison,' 'comparison page,' '[Product] vs [Product],' '[Product] alternative,' 'competitive landing pages,' 'how do we compare to X,' 'competitor teardown,' 'audit our competitor pages,' 'are our comparison pages out of date,' or 'competitive asset audit.' Use this for any content that positions your product against competitors. Covers four formats: singular alternative, plural alternatives, you vs competitor, and competitor vs competitor. For auditing existing claims (not researching competitors from scratch, which is competitor-profiling; not technical SEO on these pages, which is seo-audit), use the asset audit here. For internal battle cards and sales-specific competitor docs, see sales-enablement.
