privacy-mask – skill Lập trình cho agent AI
Che, làm mờ, ẩn danh và kiểm duyệt thông tin nhạy cảm (PII) trong ảnh chụp màn hình và hình ảnh: số điện thoại, email, số định danh, API key, ví crypto, thẻ tín dụng, mật khẩu và nhiều thông tin khác.
Cài skill privacy-mask bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/privacy-mask-12b54.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /privacy-mask – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/privacy-mask-12b54.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $privacy-mask – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/privacy-mask-12b54.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /privacy-mask – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/privacy-mask-12b54.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /privacy-mask – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
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 unavailable, report that prerequisite. The commands below illustrate package names, not authorization to install: select a reviewed version, inspect dependencies and obtain the requested installation scope before changing the environment. Confirm installed help before use:
1. Install via pip: pip install privacy-mask
2. Ensure Tesseract OCR is installed: brew install tesseract (macOS) or apt install tesseract-ocr (Linux)
3. Verify installation: privacy-mask --version
4. (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-runfirst 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.jsonOutput is JSON:
{
"status": "success",
"detections": [{"label": "PHONE_CN", "text": "***", "bbox": [10, 20, 100, 30]}],
"summary": "Masked 1 regions: 1 PHONE_CN"
}Example workflow
1. User provides a screenshot: ~/Desktop/error-screenshot.png
2. Run detection: privacy-mask mask ~/Desktop/error-screenshot.png --dry-run
3. IF detections found, mask the image: privacy-mask mask ~/Desktop/error-screenshot.png
4. The masked output is saved as ~/Desktop/error-screenshot_masked.png
5. 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-placeis 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-placeby default — preserve the original unless the user asks otherwise - Don't ignore dry-run results — if
--dry-runfinds PII, the image must be masked before use - Don't hardcode config paths — inspect the installed CLI default or let the user specify
--config
Important
- Verify the installed version and selected detection engine before using sensitive files; do not infer offline behavior from the tool name. Optional models may require downloads.
- OCR and pattern matching can miss secrets, handwriting, small text, QR codes or unusual formats. Inspect the exported image manually before sharing; zero detections does not establish anonymization.
- Treat dry-run output as sensitive: detection logs may include recognized text. Do not publish them or send them to external services unredacted.
- No
config.jsonor CLI is bundled with this AAS entrypoint. Locate defaults in the reviewed CLI installation or pass a user-supplied--configpath.
Limitations
- Use this skill only when the task clearly matches its upstream source and local project context.
- Verify commands, generated code, dependencies, credentials, and external service behavior before applying changes.
- Do not treat examples as a substitute for environment-specific tests, security review, or user approval for destructive or costly actions.
Skill liên quan
- probation-tracker – Sổ theo dõi thử việc: nhân viên, ngày bắt đầu và kết thúc, điểm đánh giá ở mốc 30, 60 và…
- project-based-performance – Đánh giá hiệu suất theo dự án: vai trò, dự án và quản lý, điểm giao hàng, chất lượng và…
- push-skill-to-github – Commit và push thay đổi skill lên kho skills đã cấu hình sau khi review và kiểm tra.
- pydantic-models-py – Tạo model Pydantic theo mẫu multi-model để có hợp đồng API rõ ràng.
- pypict-skill – Tạo test theo cặp (pairwise).
- pytest-skill – Tạo test pytest chuẩn production bằng Python, với fixtures, parametrize, markers…
- python – Hướng dẫn super-code theo ngôn ngữ cho Python.
- python-development – Bạn là chuyên gia kiến trúc dự án Python, chuyên khởi tạo ứng dụng Python sẵn sàng…