Documents

PDF Sanitizer

Try it

Detect and redact sensitive information in PDFs — ID numbers, phone numbers, addresses, bank cards.

What it does

Detect and redact sensitive information in PDFs — ID numbers, phone numbers, addresses, bank cards.

The skill document

PDF Sanitizer

Detect and redact sensitive information in PDF documents while preserving original layout.

Workflow

  1. Ingest PDF — extract text layer and metadata via pdfplumber/PyMuPDF.
  2. Scan for PII — run regex + AI pattern matching against Chinese and international PII:
    • Chinese ID number (18-digit)
    • Chinese phone numbers
    • Bank card numbers
    • Email addresses
    • Residential addresses (Chinese)
    • Person names (context-based)
  3. Highlight — annotate every match with bounding boxes and category labels.
  4. Confirm — present categories to user for selection. Default: all categories enabled.
  5. Redact — apply chosen mode per category:
    • blackout — solid black rectangle over sensitive text
    • blur — pixel-level Gaussian blur on image-rendered area
    • placeholder — replace with [REDACTED] while keeping surrounding text
  6. Rebuild PDF — flatten redactions into final output, preserving original fonts, images, and layout.
  7. Report — output redacted PDF + JSON report listing each redaction:
    • original snippet (truncated), category, page number, bounding box, mode applied.

Sample Prompt

pdf-sanitizer redact --input contract.pdf --categories id_card,phone,address --mode blackout
pdf-sanitizer redact --input 社保材料.pdf --output clean.pdf --categories all --mode placeholder
pdf-sanitizer scan --input report.pdf
pdf-sanitizer review --input contract.pdf --page 3-7

Related skills

PDF toolkit: extract, merge, split, compress, convert, watermark, and protect PDFs.

4 installs

pdf to video, pdf to explainer video, pdf to presentation video — parse the PDF, outline, storyboard, voiceover, build, validate. Use when the user gives a PDF and wants an explainer, report broadcast, courseware, or training video.

Extract text, tables, and metadata from PDFs. Auto-detects native text vs scanned image pages and routes to pdfplumber or Tesseract OCR.

1 installs

Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multipl...

3 installs

Extract structured data from passports, driver's licenses, and national ID cards for KYC/onboarding — name, document number, dates, nationality — as typed JS...

4 installs