AI Agent Hub
Back to skills
Data Mask icon

Data Mask

Office Efficiency Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please install @user_dc99567a/data-mask according to https://skillhub.cn/install/skillhub.md.

About this skill

Problem It Solves

Replaces real amounts, order counts, conversion rates, and other numeric values in report.docx, Q2_data.xlsx, screenshots, or pasted text with masked values. This avoids manual editing before sharing documents or sending data to LLMs while keeping files in a usable form.

How It Works

  • Format-aware entry points: mask.py for plain text, dataframe_mask.py for Excel/CSV, and file_mask.py as the unified entry for Word, PPT, PDF, HTML, Markdown, and images.
  • Numeric detection and filtering: recognizes values with units such as , , 亿, and %, skips IDs, sequence numbers, and years, and can preserve phone numbers with --skip-phone.
  • Strategy-based masking: hash creates deterministic alternate numbers and saves a mapping table; placeholder replaces values with [A], [B]; blur and range preserve magnitude or ranges for external use but are not reversible.
  • Layout preservation: Word/PPT keeps fonts, tables, headers/footers, and grouped shapes where possible; Excel/CSV preserves column structure; PDF/HTML/images often output as text or simplified PDF.
  • Restore and batch processing: -m saves a mapping table, --unmask restores using the same table, and a shared mapping table can keep multiple files consistent.

Boundaries and Caveats

  • Masks numbers only; it does not detect person names, places, company names, or other semantic PII, so manual review is still required before external sharing.
  • Legacy .doc/.xls, scanned PDFs, and JS-rendered HTML need conversion, OCR, or browser extraction first.
  • The mapping table acts like a restore key; keep it separate from masked files and out of public repositories.
  • Masking is not encryption; for compliance-heavy workflows, combine placeholder with encryption, approval, and audit controls.

Use Cases

  • Mask amounts and conversion rates in a monthly .docx before sending it to an LLM, while keeping layout.
  • Apply hash masking to sales and profit columns in an Excel sheet and save a mapping table for later restore.
  • Batch-process multiple Word and PPT files in one directory using a shared mapping table for consistent values.
  • OCR table numbers from screenshots, mask them as text, and review before submitting to AI tools.

Best For

  • Operations staff who send monthly business reports externally and need to replace real amounts and completion rates with controlled fake values.
  • Analysts who prepare LLM inputs and need to hide sensitive numbers while keeping a restorable mapping.
  • Business or legal staff who must sanitize PPT and Excel values before sending them to partners.
  • Automation engineers who need to mask numbers across many documents and verify restore consistency.