pdf-toolkit
БесплатноЗапускает вложенные скриптыНе проверенAudit PDF files for metadata leakage, page count, encryption, JavaScript, embedded files, and version. Use before sending a PDF externally, when redacting…
от borghei★ 1 250 звёзд на GitHubОб этом скилле
PDF Toolkit
Audit .pdf files for metadata, page count, encryption status, embedded JavaScript, embedded files, and PDF version — using the standard library only.
Table of Contents
- Keywords
- Quick Start
- Core Workflows
- Tools
- Reference Guides
- Templates
- Best Practices
- Scope & Limitations
Keywords
pdf, pdf audit, pdf metadata, pdf review, pdf leakage, pdf security, redaction, document handoff
Clarify First
Before running the audit, settle the inputs below. When one is missing or vague and would change the result, ask about it; when it wouldn't, use a sensible default and say which one you used.
- Audit purpose (pre-handoff metadata scrub, inbound security triage, or bulk outbound check): selects which of the 3 workflows and which fields you act on.
- Recipient / handling context (external party, managed laptop): sets what counts as a leak or a threat worth quarantining.
- Expected legitimate metadata (who the author/title should be): without it you can't distinguish a leak from expected data.
Ask about the two or three inputs that matter most for this request, not the whole list. If the user wants a result straight away, produce it and state your assumptions at the top.
Quick Start
python scripts/pdf_auditor.py contract.pdf
Outputs: PDF version, page count, file size, metadata (Author, Title, Producer, Creator, dates), encryption status, embedded JavaScript indicators, embedded file indicators.
Core Workflows
Workflow 1: Pre-Handoff PDF Metadata Audit
Goal: Stop leaking author identity, prior client names, or document history when handing a PDF to an external party.
Steps:
- Run:
python scripts/pdf_auditor.py document.pdf - Review metadata fields:
Authormatches the sender (not "Bob's intern" from a prior project)Titlematches the document, not a leftover working titleProducerdoesn't reveal an internal-only PDF toolCreationDateandModDateare reasonable for the deal
- If metadata leaks, re-export from source with cleaned properties (or use a redaction tool)
Time Estimate: 2-3 minutes per document.
Workflow 2: PDF Security Triage
Goal: Decide whether a received PDF can be opened safely on a managed laptop.
Steps:
- Run audit
- JavaScript indicator present → quarantine; review in a sandbox
- Embedded files indicator present → list of file types; quarantine if unexpected
- Encrypted with non-empty owner password → request password from sender via separate channel
- Decision: open / quarantine / reject
Time Estimate: 1-2 minutes per inbound document.
Workflow 3: Bulk Audit of an Outbound Document Set
Goal: Audit every PDF in a folder before zipping for a customer or partner.
Steps:
- Loop:
for f in *.pdf; do python scripts/pdf_auditor.py "$f" --json; done > audit.jsonl - Parse the JSON Lines for any metadata leakage or anomalies
- Re-export problem files from source
- Re-run audit until clean
Time Estimate: 1-2 minutes per file.
Tools
pdf_auditor.py
Reads a PDF using stdlib parsing — no pypdf or pdfplumber required. Detects:
- PDF version (from header)
- Page count (via
/Type /Pageobject scan) - File size
- Document Info / XMP metadata (Title, Author, Subject, Keywords, Producer, Creator, CreationDate, ModDate)
- Encryption status (
/Encryptreference present) - JavaScript indicators (
/JS,/JavaScript,/AAkeys) - Embedded files indicator (
/EmbeddedFiles)
python scripts/pdf_auditor.py document.pdf
python scripts/pdf_auditor.py document.pdf --json
Limits:
- Does not extract text content — pure PDF text extraction with stdlib is unreliable. For text extraction install
pdfplumberorpypdfseparately. - Cannot decrypt encrypted files.
- Detects only the presence of JavaScript/embedded files, not their behavior.
Reference Guides
references/pdf_handoff_guide.md— What to scrub from PDFs before external send; PDF/A and PDF/UA basics; common leakage patterns
Templates
assets/pdf_handoff_checklist.md— Pre-send PDF sign-off checklist
Best Practices
- Re-export rather than redact. Redaction tools that "remove" content can leave it recoverable. The safest path is regenerating the PDF from the source document with sensitive fields removed.
- Scrub document properties at the source. In Word: File → Inspect Document → Document Inspector. In Pages: File → Properties. Then export to PDF.
- Don't trust filenames. A file named
Public-Report.pdfcan carry private metadata indistinguishable to the human eye. - Use PDF/A for archival. PDF/A removes JavaScript and external dependencies, making documents safe for long-term archive.
Scope & Limitations
In Scope:
- Read-only a
Установить pdf-toolkit в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл pdf-toolkit?
Audit PDF files for metadata leakage, page count, encryption, JavaScript, embedded files, and version. Use before sending a PDF externally, when redacting sensitive metadata, or running a PDF security review.
Как установить скилл pdf-toolkit?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл pdf-toolkit запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
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