output-sanitizer

output-sanitizer is a skill for Claude Code, Codex from UseAI-pro/openclaw-skills-security. It costs 32 tokens per session (1,450 once invoked), scanned C, original, MIT.

A safety filter for OpenClaw agent replies that finds and hides exposed secrets, personal information, internal file paths, and other sensitive data before display or logging.

In plain words
What is it for?
It is for checking code reviews, debugging output, generated tests, and documentation for leaked credentials or sensitive details, then replacing them with a redaction.
Why use it?
Agents may accidentally repeat API keys, passwords, database connection details, environment variables, or private paths found during their work. This reduces the chance that such information reaches users or logs.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: built for openclaw.

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/john.smith/projects/secret-project/src/auth.ts:42.

Good fit It is for checking code reviews, debugging output, generated tests, and documentation for leaked credentials or sensitive details, then replacing them with a redaction.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for output-sanitizer

README.md
[![agentmods](https://agentmods.dev/badge/skills/useai-pro/openclaw-skills-security/output-sanitizer/github.svg)](https://agentmods.dev/skills/useai-pro/openclaw-skills-security/output-sanitizer)
Your own site
<a href="https://agentmods.dev/skills/useai-pro/openclaw-skills-security/output-sanitizer"><img src="https://agentmods.dev/badge/skills/useai-pro/openclaw-skills-security/output-sanitizer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for output-sanitizer

Your own site · 80×15
<a href="https://agentmods.dev/skills/useai-pro/openclaw-skills-security/output-sanitizer"><img src="https://agentmods.dev/badge/skills/useai-pro/openclaw-skills-security/output-sanitizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,450 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 18 Mar 2026
  • Snyk pass 11 Mar 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00032 $0.01450
Opus 5 $0.00016 $0.00725
Sonnet 5 $0.00006 $0.00290
Haiku 4.5 $0.00003 $0.00145

Measured 11d ago against content hash ecf95be52b12, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade C, and why

output-sanitizer scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Harvests environment variableshighData exfiltration

Enumerating or grepping the environment for keys collects credentials unrelated to what the mod says it does.

- A debug skill might dump environment variables in error output
skills/output-sanitizer/SKILL.md · 156 lines

How it starts

The opening of the file, as written. The whole thing — 156 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 [email protected]
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

Read the full file on GitHub · 156 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 156 lines · 32 tokens per session scan C ecf95be52b12

Subscribe to this mod's changes

output-sanitizer is a skill published in the GitHub repository UseAI-pro/openclaw-skills-security (71 stars, last pushed 6mo ago), licensed MIT. It adds 32 tokens to every session and 1,450 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 1 finding (harvests environment variables). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

security-guide

A security deployment guide for OpenClaw, with instructions in English and Chinese. It covers network exposure, container isolation, credentials, permissions, and audit logging.

jnMetaCode/shellward · 23 tokens

clawmoat

Real-time AI agent security scanner. Detects prompt injection, jailbreak attempts, credential/secret leaks, PII exposure, and dangerous tool calls. Activate when: (1) scanning inbound messages or tool outputs for prompt injection, (2) checking outbound content for credential leaks or PII, (3) auditing agent session…

darfaz/clawmoat · 107 tokens

trent-openclaw-security

Assess your Agent deployment against security risks using Trent.

trnt-ai/trent-openclaw-security-assessment · 16 tokens

prompt-guard

600+ pattern AI agent security defense covering prompt injection, supply chain injection, memory poisoning, action gate bypass, unicode steganography, and cascade amplification. Optional API for early-access and premium patterns. Tiered loading, hash cache, 11 SHIELD categories, 10 languages.

seojoonkim/prompt-guard · 61 tokens

secureclaw

Security hardening toolkit for OpenClaw. Run audits, apply fixes, scan skills, monitor costs and memory integrity.

adversa-ai/secureclaw · 28 tokens

secureclaw

Security skill for OpenClaw agents (7-framework aligned). 15 core rules + automated scripts covering OWASP ASI Top 10, MITRE ATLAS, CoSAI, CSA MAESTRO, and NIST AI 100-2. Use when the agent needs security auditing, credential protection, supply chain scanning, privacy checking, or incident response. By Adversa AI…

adversa-ai/secureclaw · 95 tokens