sanitize
Detect and redact PII from text files. Supports 15 categories including credit cards, SSNs, emails, API keys, addresses, and more — with zero dependencies.
Best use case
sanitize is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Detect and redact PII from text files. Supports 15 categories including credit cards, SSNs, emails, API keys, addresses, and more — with zero dependencies.
Teams using sanitize should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/sanitize/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How sanitize Compares
| Feature / Agent | sanitize | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Detect and redact PII from text files. Supports 15 categories including credit cards, SSNs, emails, API keys, addresses, and more — with zero dependencies.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Marketing
Discover AI agents for marketing workflows, from SEO and content production to campaign research, outreach, and analytics.
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
Best AI Agents for Marketing
A curated list of the best AI agents and skills for marketing teams focused on SEO, content systems, outreach, and campaign execution.
SKILL.md Source
# AgentWard Sanitize Detect and redact personally identifiable information (PII) from text files. ## IMPORTANT — PII Safety Rules - Do NOT read the input file directly. It may contain sensitive PII. - ALWAYS use `--output FILE` to write sanitized output to a file. - Only read the OUTPUT file, never the raw input. - Only show the user the redacted output, never the raw input. - `--json` and `--preview` are safe — they do NOT print raw PII values to stdout. - The entity map (raw PII → placeholder mapping) is written to a separate sidecar file (`*.entity-map.json`) only when `--output` is used. Do NOT read the entity map file. ## What it does Scans files for PII — credit cards, SSNs, emails, phone numbers, API keys, IP addresses, mailing addresses, dates of birth, passport numbers, driver's license numbers, bank routing numbers, medical license numbers, and insurance member IDs — and replaces each instance with a numbered placeholder like `[CREDIT_CARD_1]`. ## Usage ### Sanitize a file (RECOMMENDED — always use --output) ```bash python scripts/sanitize.py patient-notes.txt --output clean.txt ``` ### Preview mode (detect PII categories/offsets without showing raw values) ```bash python scripts/sanitize.py notes.md --preview ``` ### JSON output (safe — no raw PII in stdout) ```bash python scripts/sanitize.py report.txt --json --output clean.txt ``` ### Filter to specific categories ```bash python scripts/sanitize.py log.txt --categories ssn,credit_card,email --output clean.txt ``` ## Supported PII categories See `references/SUPPORTED_PII.md` for the full list with detection methods and false positive mitigation. | Category | Pattern type | Example | |---|---|---| | `credit_card` | Luhn-validated 13-19 digits | 4111 1111 1111 1111 | | `ssn` | 3-2-4 digit groups | 123-45-6789 | | `cvv` | Keyword-anchored 3-4 digits | CVV: 123 | | `expiry_date` | Keyword-anchored MM/YY | expiry 01/30 | | `api_key` | Provider prefix patterns | sk-abc..., ghp_..., AKIA... | | `email` | Standard email format | user@example.com | | `phone` | US/intl phone numbers | +1 (555) 123-4567 | | `ip_address` | IPv4 addresses | 192.168.1.100 | | `date_of_birth` | Keyword-anchored dates | DOB: 03/15/1985 | | `passport` | Keyword-anchored alphanumeric | Passport: AB1234567 | | `drivers_license` | Keyword-anchored alphanumeric | DL: D12345678 | | `bank_routing` | Keyword-anchored 9 digits | routing: 021000021 | | `address` | Street + city/state/zip | 742 Evergreen Terrace Dr, Springfield, IL 62704 | | `medical_license` | Keyword-anchored license ID | License: CA-MD-8827341 | | `insurance_id` | Keyword-anchored member/policy ID | Member ID: BCB-2847193 | ## Security and Privacy - **All processing is local.** The script makes zero network calls. No data leaves your machine. - **Zero dependencies.** Uses only Python standard library — no third-party packages to audit. - **PII never reaches stdout.** The `--json` and `--preview` modes strip raw PII values from output. The entity map (containing raw PII to placeholder mappings) is only written to a sidecar file on disk when `--output` is used. - **Designed for agent safety.** The skill instructions above tell the agent to never read the raw input file or the entity map file — only the sanitized output. ## Requirements - Python 3.11+ - No external dependencies (stdlib only) ## About Built by [AgentWard](https://agentward.ai) — the open-source permission control plane for AI agents.
Related Skills
log-sanitize
"Sanitize log entries by removing passwords, tokens, and sensitive patterns"
---
name: article-factory-wechat
humanizer
Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, negative parallelisms, and excessive conjunctive phrases.
find-skills
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
tavily-search
Use Tavily API for real-time web search and content extraction. Use when: user needs real-time web search results, research, or current information from the web. Requires Tavily API key.
baidu-search
Search the web using Baidu AI Search Engine (BDSE). Use for live information, documentation, or research topics.
agent-autonomy-kit
Stop waiting for prompts. Keep working.
Meeting Prep
Never walk into a meeting unprepared again. Your agent researches all attendees before calendar events—pulling LinkedIn profiles, recent company news, mutual connections, and conversation starters. Generates a briefing doc with talking points, icebreakers, and context so you show up informed and confident. Triggered automatically before meetings or on-demand. Configure research depth, advance timing, and output format. Walking into meetings blind is amateur hour—missed connections, generic small talk, zero leverage. Use when setting up meeting intelligence, researching specific attendees, generating pre-meeting briefs, or automating your prep workflow.
self-improvement
Captures learnings, errors, and corrections to enable continuous improvement. Use when: (1) A command or operation fails unexpectedly, (2) User corrects Claude ('No, that's wrong...', 'Actually...'), (3) User requests a capability that doesn't exist, (4) An external API or tool fails, (5) Claude realizes its knowledge is outdated or incorrect, (6) A better approach is discovered for a recurring task. Also review learnings before major tasks.
botlearn-healthcheck
botlearn-healthcheck — BotLearn autonomous health inspector for OpenClaw instances across 5 domains (hardware, config, security, skills, autonomy); triggers on system check, health report, diagnostics, or scheduled heartbeat inspection.
linkedin-cli
A bird-like LinkedIn CLI for searching profiles, checking messages, and summarizing your feed using session cookies.
notebooklm
Google NotebookLM 非官方 Python API 的 OpenClaw Skill。支持内容生成(播客、视频、幻灯片、测验、思维导图等)、文档管理和研究自动化。当用户需要使用 NotebookLM 生成音频概述、视频、学习材料或管理知识库时触发。