pii-pdf
БесплатноЗапускает вложенные скриптыНе проверенDetect and replace personal names, addresses, contacts, bank accounts and IBANs in PDF files or folders using the local pii-pdf JSON CLI. Use for PDF…
от glebis★ 417 звёзд на GitHubОб этом скилле
PDF PII workflow
Use the bundled, versioned pii-pdf CLI. It combines native character boxes, local Tesseract OCR, spaCy PERSON and format rules. Preserve the user's selected scope and retain originals. The detector is experimental: a completed command is not a validated anonymous document.
SKILL_DIR below means the directory containing this file. Resolve it from the actual loaded skill path; do not assume the current working directory is the skill directory.
Setup mode
When asked to install, configure or repair this engine:
python3 "$SKILL_DIR/scripts/setup.py" --plan
python3 "$SKILL_DIR/scripts/setup.py" --apply
Explain the actual installation plan before applying it. An explicit request to set up this engine authorizes its documented missing dependencies; do not ask again for the same installation. Downloads happen during setup, not document processing. The installer checks the bundled source hashes, uses an isolated Python environment, installs its Python dependencies and the pinned English model, and installs a missing Tesseract through an existing supported package manager. It does not bootstrap Homebrew, run remote shell installers, or invoke sudo automatically.
Default environment: ~/.local/share/pii-pdf/venv. --venv PATH selects another environment. --system skip skips installing system packages; if Tesseract is still missing the result remains incomplete. Report a missing package manager or privilege requirement with the exact missing step; do not invent success or silently substitute cloud OCR. Use setup.py --help for supported switches.
For installation through npx and runtime setup, read references/installation.md. The standalone toolkit is maintained at https://github.com/glebis/pii-pdf; this skill includes a versioned source snapshot for reproducible setup.
Doctor mode
When asked to diagnose, check, test or troubleshoot this engine (/pii-pdf doctor), or when a document run fails with exit 2/3:
python3 "$SKILL_DIR/scripts/doctor.py" # diagnose + synthetic smoke test
python3 "$SKILL_DIR/scripts/doctor.py" --no-smoke # diagnose only
python3 "$SKILL_DIR/scripts/doctor.py" --keep # keep fixture + redacted copy for inspection
It never installs dependencies or changes existing documents. The smoke check creates temporary synthetic files. Three stages, NDJSON on stdout:
setup_plan: bundled-source hashes and pending install steps (setup.py --plan).cli_doctor: dependencies and model in the runtime (pii-pdf doctor).smoke: builds a 2-page synthetic invoice (page 1 native text, page 2 image-only scan) with a fake name, email, phone and IBAN, redacts it, then checks native text and Tesseract OCR of every page. Each fake value must be gone, and the non-PII heading and total must survive. Skipped when stages 1–2 are blocking.
The final diagnosis event lists findings, each with stage, problem, fix and severity (blocking = install/repair, detector = leak or over-redaction). Exit 0 healthy, 3 blocking (repair with setup mode; an explicit repair request authorizes --apply), 4 smoke test flagged the detector (don't trust redactions until resolved), 5 doctor failed. Report each finding with its fix. Exit 0 means the fixture passed, not that real documents will be anonymised. The fixture contains only invented data, so --keep output is safe to inspect.
Locate and discover the CLI
python3 "$SKILL_DIR/scripts/run.py" schema
python3 "$SKILL_DIR/scripts/run.py" doctor
The launcher uses the default isolated environment, or --runtime PATH for another venv; if the default is absent it can use an installed pii-pdf on PATH. Require CLI 0.1.2+ (0.1.1 can trash its own published outputs on macOS) and PyMuPDF 1.26.7+ for new processing; older baseline environments need setup first. Read the live schema JSON for current parameters, defaults and event semantics. Do not guess flags or auto-install dependencies while handling a document request. If dependencies are missing, report them or use setup mode when installation is authorized.
Detection and redaction
python3 "$SKILL_DIR/scripts/run.py" detect "/path/statement.pdf" --json
python3 "$SKILL_DIR/scripts/run.py" redact "/path/statements" \
--output "/path/redacted" --recursive --json
- Accept a single PDF or a folder. Use
--recursivewhen subfolders are in scope; retain their relative structure. detectidentifies areas without writing PDFs.redactwrites copies. If the user requested redaction, proceed with copies within that scope; a separate confirmation is not a prerequisite.- Use a separate output directory. Do not add
--overwrite, drop attachments, or retain unsupported contents without an applicable user choice. Default unsupported-attachment behavior is an explicit error. - For a new batch,
--dry-runcan verify file selection and output paths without OCR, model loadi
Установить pii-pdf в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл pii-pdf?
Detect and replace personal names, addresses, contacts, bank accounts and IBANs in PDF files or folders using the local pii-pdf JSON CLI. Use for PDF anonymization, coordinate-based PII review, and setup of this PDF engine; not for general PDF editing or ordinary text anonymization.
Как установить скилл pii-pdf?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл pii-pdf запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic