sanitize

Detect and redact PII from text files with placeholders.

19|5|Updated Feb 18, 2026
One-click install
npx skills add https://github.com/agentward-ai/agentward --skill sanitize-agentward-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sanitize
Source: https://github.com/agentward-ai/agentward/tree/main/agentward-sanitize-skill
Command: npx skills add https://github.com/agentward-ai/agentward --skill sanitize-agentward-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Protects sensitive data by detecting and redacting PII from plain-text files, preventing leakage when sharing or processing data.

Core Features & Use Cases

  • Detects 15 PII categories including credit cards, SSNs, emails, API keys, addresses, and more.
  • Redacts matches to placeholders while preserving context, enabling safe sharing and analysis.
  • Local, zero-dependency processing with options to write sanitized output, emit JSON reports, and apply category filters for targeted scans.

Quick Start

Run the sanitize.py script on a text file to produce a sanitized output file.

Frequently Asked Questions about sanitize

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

FAQPage Schema
How do I detect and redact PII from text files locally without uploading data?

To redact PII locally, you can process text files directly on disk using a zero-dependency Python script. The tool detects 15 PII categories, replacing sensitive data with placeholders while preserving document context for safe sharing.

What types of sensitive data can a local text redaction script identify?

Local text redaction scripts can identify 15 PII categories, including credit cards, SSNs, emails, API keys, and addresses. You can apply category filters to target specific sensitive data types during the redaction process.

Can I get a JSON report of redacted PII from a plain-text file?

Yes, you can emit a JSON report detailing the redacted PII from a plain-text file. The script supports a --json flag to output structured reports and an optional entity map to track the raw data replaced by placeholders.

Do I need external Python libraries to sanitize sensitive data in a text file?

No, you do not need external Python libraries to sanitize sensitive data. The processing script has zero dependencies, ensuring a secure local environment where sensitive information never leaves your machine for external package processing.

What is the best way to sanitize text files for sharing without losing context?

The best way to sanitize text files for sharing is replacing PII with contextual placeholders. This redaction method removes sensitive data while maintaining the document's structural integrity, enabling safe analysis and distribution.

How do I run a targeted PII scan for only credit cards and emails in a document?

To run a targeted PII scan for credit cards and emails, use the --categories flag to filter the redaction script. This limits detection to specified categories, writing the sanitized output to a designated file via the --output option.