Privacy Mask
Detect and mask sensitive information in images locally before they leave your machine.
Prerequisites
This skill requires the privacy-mask CLI to be pre-installed on the system.
If it is not available, inform the user that they need to install it first:
- Install via pip:
pip install privacy-mask
- Ensure Tesseract OCR is installed:
brew install tesseract (macOS) or apt install tesseract-ocr (Linux)
- Verify installation:
privacy-mask --version
- (Optional) Install NER support:
pip install privacy-mask[ner]
When to use
- User sends a screenshot or image file (
.png, .jpg, .jpeg, .bmp, .tiff) that may contain private data
- User mentions privacy, masking, redacting, or anonymizing
- You need to analyze an image but want to redact sensitive info first
- IF the user shares a screenshot for debugging, THEN run
privacy-mask mask <path> --dry-run first to check for PII
- IF detections are found, THEN mask the image before proceeding with analysis
Usage
Mask an image:
privacy-mask mask /path/to/screenshot.png
privacy-mask mask /path/to/screenshot.png --in-place
privacy-mask mask /path/to/screenshot.png --dry-run # detect only, no masking
privacy-mask mask /path/to/screenshot.png --detection-engine regex # regex only, skip NER
privacy-mask mask /path/to/screenshot.png --config /path/to/custom-config.json
Output is JSON:
{
"status": "success",
"detections": [{"label": "PHONE_CN", "text": "***", "bbox": [10, 20, 100, 30]}],
"summary": "Masked 1 regions: 1 PHONE_CN"
}
Example workflow
- User provides a screenshot:
~/Desktop/error-screenshot.png
- Run detection:
privacy-mask mask ~/Desktop/error-screenshot.png --dry-run
- IF detections found, mask the image:
privacy-mask mask ~/Desktop/error-screenshot.png
- The masked output is saved as
~/Desktop/error-screenshot_masked.png
- Use the masked image for further analysis
What it detects
- IDs: Chinese ID card, passport, HK/TW ID, US SSN, UK NINO, Canadian SIN, Indian Aadhaar/PAN, Korean RRN, Singapore NRIC, Malaysian IC
- Phone: Chinese mobile/landline, US phone, international (+prefix)
- Financial: Bank card, Amex, IBAN, SWIFT/BIC
- Developer keys: AWS, GitHub, Slack, Google, Stripe tokens, JWT, connection strings, API keys, SSH/PEM keys
- Crypto: Bitcoin, Ethereum wallet addresses
- Other: Email, birthday, IP/IPv6, MAC, UUID, license plate, MRZ, URL auth tokens
- NER (optional): Person names, street addresses, organizations, dates of birth, medical conditions
Constraints
- Do NOT send unmasked images to any external API or cloud service
- Do NOT skip masking when detections are found — always mask before sharing
- Do NOT modify the original image unless
--in-place is explicitly requested
- Avoid running on very large images (>10MB) without warning the user about processing time
Anti-patterns
- Don't assume images are safe — always run detection even if the image "looks clean"
- Don't use
--in-place by default — preserve the original unless the user asks otherwise
- Don't ignore dry-run results — if
--dry-run finds PII, the image must be masked before use
- Don't hardcode config paths — use the bundled default or let the user specify
--config
Important
- All processing is local and offline — no data leaves the machine
- Configure rules in the bundled
config.json or pass --config for custom rules
1---2name: privacy-mask-33description: >-4 Mask, redact, anonymize and censor sensitive information (PII) in5 screenshots and images — phone numbers, emails, IDs, API keys, crypto6 wallets, credit cards, passwords, and more. Uses OCR (Tesseract +7 RapidOCR) with 47 regex rules and optional NER (GLiNER) to detect private8 data and applies blur/fill redaction overlays. Supports GDPR and9 compliance workflows, secret detection, and data loss prevention (DLP).10 All processing runs 100% locally and offline — no data leaves your machine.11version: 0.3.512license: MIT13compatibility: Requires tesseract OCR, Python 3.10+, and pre-installed privacy-mask CLI.14metadata:15 source: https://skillmd.com/skills/fullstackcrew-alpha/privacy-mask-316 author: wuhao17 openclaw:18 requires:19 bins:20 - tesseract21 - python322 - privacy-mask23 emoji: "\U0001F6E1"24 homepage: https://github.com/fullstackcrew-alpha/privacy-mask25 permissions:26 - id: local-file-read27 description: >-28 Reads image files provided by the user to perform OCR-based29 sensitive information detection. No files are copied or transmitted.30 scope: local31 optional: false32 - id: local-file-write33 description: >-34 Writes masked output images to the local filesystem (same directory35 as input, with _masked suffix, or user-specified path).36 scope: local37 optional: false38 hooks:39 - event: UserPromptSubmit40 description: >-41 Intercepts images in Claude's local image cache and applies42 privacy masking (blur/fill redaction) in-place before they are43 sent to the API. Runs entirely locally with no network calls.44 Requires the privacy-mask CLI to be installed.45 command: scripts/mask-images.sh46 timeout: 3000047---4849# Privacy Mask5051Detect and mask sensitive information in images locally before they leave your machine.5253## Prerequisites5455This skill requires the `privacy-mask` CLI to be pre-installed on the system.56If it is not available, inform the user that they need to install it first:57581. Install via pip: `pip install privacy-mask`592. Ensure Tesseract OCR is installed: `brew install tesseract` (macOS) or `apt install tesseract-ocr` (Linux)603. Verify installation: `privacy-mask --version`614. (Optional) Install NER support: `pip install privacy-mask[ner]`6263## When to use6465- User sends a screenshot or image file (`.png`, `.jpg`, `.jpeg`, `.bmp`, `.tiff`) that may contain private data66- User mentions privacy, masking, redacting, or anonymizing67- You need to analyze an image but want to redact sensitive info first68- IF the user shares a screenshot for debugging, THEN run `privacy-mask mask <path> --dry-run` first to check for PII69- IF detections are found, THEN mask the image before proceeding with analysis7071## Usage7273Mask an image:74```bash75privacy-mask mask /path/to/screenshot.png76privacy-mask mask /path/to/screenshot.png --in-place77privacy-mask mask /path/to/screenshot.png --dry-run # detect only, no masking78privacy-mask mask /path/to/screenshot.png --detection-engine regex # regex only, skip NER79privacy-mask mask /path/to/screenshot.png --config /path/to/custom-config.json80```8182Output is JSON:83```json84{85 "status": "success",86 "detections": [{"label": "PHONE_CN", "text": "***", "bbox": [10, 20, 100, 30]}],87 "summary": "Masked 1 regions: 1 PHONE_CN"88}89```9091### Example workflow92931. User provides a screenshot: `~/Desktop/error-screenshot.png`942. Run detection: `privacy-mask mask ~/Desktop/error-screenshot.png --dry-run`953. IF detections found, mask the image: `privacy-mask mask ~/Desktop/error-screenshot.png`964. The masked output is saved as `~/Desktop/error-screenshot_masked.png`975. Use the masked image for further analysis9899## What it detects100101- **IDs**: Chinese ID card, passport, HK/TW ID, US SSN, UK NINO, Canadian SIN, Indian Aadhaar/PAN, Korean RRN, Singapore NRIC, Malaysian IC102- **Phone**: Chinese mobile/landline, US phone, international (+prefix)103- **Financial**: Bank card, Amex, IBAN, SWIFT/BIC104- **Developer keys**: AWS, GitHub, Slack, Google, Stripe tokens, JWT, connection strings, API keys, SSH/PEM keys105- **Crypto**: Bitcoin, Ethereum wallet addresses106- **Other**: Email, birthday, IP/IPv6, MAC, UUID, license plate, MRZ, URL auth tokens107- **NER** (optional): Person names, street addresses, organizations, dates of birth, medical conditions108109## Constraints110111- Do NOT send unmasked images to any external API or cloud service112- Do NOT skip masking when detections are found — always mask before sharing113- Do NOT modify the original image unless `--in-place` is explicitly requested114- Avoid running on very large images (>10MB) without warning the user about processing time115116## Anti-patterns117118- **Don't assume images are safe** — always run detection even if the image "looks clean"119- **Don't use `--in-place` by default** — preserve the original unless the user asks otherwise120- **Don't ignore dry-run results** — if `--dry-run` finds PII, the image must be masked before use121- **Don't hardcode config paths** — use the bundled default or let the user specify `--config`122123## Important124125- All processing is **local and offline** — no data leaves the machine126- Configure rules in the bundled `config.json` or pass `--config` for custom rules