安装

claude skill add --url github.com/openclaw/skills/tree/main/skills/darknoah/redact

文档

Redact Skill

Privacy redaction toolkit using PPStructureV3 OCR for text detection and replacement.

Scripts

ScriptFormatCommand
redact-image.pyImages (png, jpg, etc.)redact-image.py <input> <rules.csv> <output>
redact-pdf.pyPDFredact-pdf.py <input> <rules.csv> <output>
redact-document.pyWord (docx, doc)redact-document.py <input> <rules.csv> <output>
redact-presentation.pyPowerPoint (pptx, ppt)redact-presentation.py <input> <rules.csv> <output>

CSV Rules Format

csv
target_text,replacement_text
张三,李四
手机号,
身份证号,
RuleEffect
原文本,新文本Replace with new text
原文本,Empty = mask with █ (documents) or solid color block (images/PDF)

Masking Behavior

FormatEmpty Replacement
Images, PDFSolid color block overlay
Word, PowerPoint characters (same length as target)

Features

FeatureImagePDFDocumentPresentation
Text replacement
Solid color mask--
█ character mask--
OCR detection✅ (images)✅ (images)
Tables-
Headers/Footers--
Embedded images-

Environment Setup

bash
# Initialize virtual environment
./scripts/init-runtime.sh

# Activate
source scripts/.venv/bin/activate

Dependencies

  • Python 3.10+
  • PaddleOCR / PPStructureV3
  • python-docx, python-pptx, PyMuPDF, Pillow