output-sanitizer

Redact credentials, PII, and internal paths from AI agent output.

Updated Mar 15, 2026
One-click install
npx skills add https://github.com/wongdean/knowledge-base --skill output-sanitizer-wongdean
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: output-sanitizer
Source: https://github.com/wongdean/knowledge-base/tree/main/backups/openclaw-config/20260315_232439/workspace-skills/openclaw-skills-security/skills/output-sanitizer
Command: npx skills add https://github.com/wongdean/knowledge-base --skill output-sanitizer-wongdean

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents the accidental leakage of sensitive information, such as credentials, PII, and internal system details, from AI agent responses before they are displayed or logged.

Core Features & Use Cases

  • Credential Redaction: Automatically detects and masks API keys, passwords, and tokens.
  • PII Masking: Obscures email addresses, phone numbers, and other personally identifiable information.
  • Internal Path Generalization: Replaces sensitive internal file paths and hostnames with generalized placeholders.
  • Use Case: After an agent performs a code review, this skill ensures that any accidentally quoted API keys or internal server paths within the review comments are redacted before the output is shared with the team.

Quick Start

Sanitize the provided agent output by redacting any sensitive information.

Frequently Asked Questions about output-sanitizer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I redact API keys and PII from AI agent output?

To redact API keys and PII from AI agent output, apply a post-processing sanitization module that uses pattern-based detection and masking rules to obscure credentials, email addresses, and phone numbers before responses are displayed or logged.

What is output sanitization for agent security?

Output sanitization for agent security is a post-processing technique that detects and masks sensitive information, such as personally identifiable information and internal system paths, to prevent accidental data leakage in displayed or logged AI responses.

How do I prevent internal system paths from leaking in agent responses?

To prevent internal system paths from leaking in agent responses, implement output sanitization rules that detect sensitive file paths and hostnames, replacing them with generalized placeholders before the content is shared or logged.

Can I use pattern-based detection to mask credentials in logged responses?

Yes, you can use pattern-based detection to mask credentials in logged responses. This sanitization approach automatically identifies and obscures API keys, passwords, and tokens during the post-processing phase of agent output handling.

Does output sanitization work as a post-processing module for code review comments?

Yes, output sanitization works as a post-processing module for code review comments. It ensures that any accidentally quoted API keys or internal server paths within the review comments are redacted before the output is shared with the team.

What are the limitations of pattern-based detection for data redaction?

Pattern-based detection for data redaction relies on predefined masking rules and patterns, meaning it may not identify sensitive information that lacks recognizable structural formats or falls outside of configured credential, PII, and internal path detection rules.