Back to skills
extension
Category: Productivity & OfficeNo API key required

外发密盾:本地文档敏感信息检查与脱敏

Performs fully local document disclosure-risk inspection, OCR, PII and credential detection, and secure redaction (本地文档外发检查、OCR、敏感信息识别与脱敏). Use when a user asks whether a PDF, scan, screenshot, text file, CSV, or JSON file is safe to share, or asks to inspect, scan, sanitize, redact, mask, 脱敏, 打码, 检查外发风险, 检查身份证/手机号/邮箱/银行卡/API Key/密级标记. Prefer this skill whenever private documents must remain offline or on localhost.

personAuthor: a18976231571hubModelScope

Local Doc Guardian

Quick start

Use the fixed entry point only:

scripts\run.ps1 "C:\path\to\document.pdf" --redact

Do not call client.py, server.py, or model files directly.

Workflows

Inspect a document

scripts\run.ps1 "C:\path\to\document.png"

Inspect and create a redacted copy

scripts\run.ps1 "C:\path\to\document.pdf" --redact

Return machine-readable JSON

scripts\run.ps1 "C:\path\to\document.pdf" --redact --format json

Check or stop the resident service

scripts\run.ps1 --health
scripts\run.ps1 --shutdown

Interpreting the reply

The reply contains:

  • 风险等级: high, medium, low, or none.
  • 发现数量: validated findings grouped by severity and type.
  • 报告路径: Markdown and JSON reports with masked values only.
  • 脱敏副本: present only when --redact is requested.
  • 耗时: local processing time in milliseconds.

Failure handling

  • Exit 1: invalid input, unsupported file, or inference failure.
  • Exit 2: local service communication failure.
  • Exit 3: first-run setup is still in progress; rerun with --continue.
  • Never upload the input or fall back to a cloud OCR service.
  • If a result is uncertain, report it as requiring manual review; do not claim a file is safe merely because no pattern matched.

Important

  • The first call creates an isolated environment and may take several minutes.
  • All environments, models, caches, logs, and outputs stay under this skill directory.
  • Input files are capped at 50 MiB, policy JSON at 1 MiB, and PDFs at 100 pages with per-page and aggregate render budgets.
  • Pass --min-confidence 0.0..1.0 when a workflow needs a stricter or more permissive per-request OCR threshold.
  • Reports never include complete detected secrets or identity numbers.
  • Redaction creates a new file and never overwrites the source.