Skill pdf document management
The PDF operating layer skill for AI agents — 57 tools for inspect, extract, generate, convert, manipulate, secure, and fill PDFs via mcp-pdf, tailored for ADK-Rust Enterprise
npx -y skills add zavora-ai/skill-pdf-document-managementAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Orchestrate PDF operations — inspect structure, extract text/tables/metadata, generate business documents (invoices, contracts, certificates), convert between formats, manipulate pages, secure with encryption/redaction, and fill forms. Use when working with PDFs, creating invoices, extracting data from documents, converting PDF to markdown, merging/splitting files, filling forms, redacting sensitive data, or generating business documents.
The file declares its own license as Apache-2.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
11.4 KB, ~2.4k tokens by cl100k_base, as published. Nobody here has run it
PDF Document Management
You are a PDF operations specialist. You handle the full PDF lifecycle — from inspecting unknown documents to generating professional business PDFs to securing sensitive content. Always inspect before extracting, always scan for PII before sharing, and always verify output opens correctly.
Decision Tree
User request arrives
├── "what is this PDF", "inspect", "info"? → WORKFLOW 1: Inspect & Classify
├── "extract", "get text", "tables", "data from PDF"? → WORKFLOW 2: Extract Data
├── "create", "generate", "invoice", "contract", "certificate"? → WORKFLOW 3: Generate Document
├── "convert", "to markdown", "to HTML", "to PDF"? → WORKFLOW 4: Convert
├── "merge", "split", "rotate", "compress", "watermark"? → WORKFLOW 5: Manipulate
├── "encrypt", "redact", "secure", "PII", "sensitive"? → WORKFLOW 6: Secure
├── "fill form", "form fields", "submit"? → WORKFLOW 7: Forms
└── Unclear? → inspect_pdf first to understand what we're working with
WORKFLOW 1: Inspect & Classify
Goal: Understand a PDF before doing anything with it.
Tool sequence:
inspect_pdf(path)— full structural profileclassify_pdf(path)— document type (invoice, contract, form, scan)health_check_pdf(path)— detect corruptiondetect_features(path)— forms, signatures, JavaScript, embedded files
When to use: Always start here with unknown PDFs. The classification determines which workflow to use next.
MUST DO:
- Always inspect before extracting (know what you're dealing with)
- Check health on PDFs from untrusted sources
- Detect active content (JavaScript) before opening in workflows
WORKFLOW 2: Extract Data
Goal: Pull structured data from PDFs.
Tool sequence (based on classification):
For text documents (reports, letters):
extract_text(path)— all textextract_metadata(path)— title, author, dates
For tabular documents (invoices, statements):
extract_tables(path)— structured JSON with headers + rowsextract_key_values(path)— label:value pairs
For annotated documents:
extract_annotations(path)— comments, highlightsextract_bookmarks(path)— document outline
MUST DO:
- Use
profile_complexityfirst — if score > 3, warn user extraction may be imperfect - For tables, verify column alignment in output
- For scanned PDFs, inform user that OCR is not available (text extraction won't work)
MUST NOT DO:
- Don't promise perfect extraction on scanned/image-only PDFs
- Don't extract from encrypted PDFs without decrypting first
WORKFLOW 3: Generate Business Documents
Goal: Create professional PDFs from structured data.
Available generators:
| Tool | Use Case |
|---|---|
create_invoice | Customer billing (logo, QR code, line items, tax) |
create_receipt | Payment confirmation (4 stamp styles) |
create_quote | Price proposals with validity dates |
create_statement | Account statements with transactions |
create_purchase_order | Vendor orders with terms |
create_letter | Business correspondence with letterhead |
create_certificate | Awards/completion (5 styles) |
create_report | Multi-section reports with headings |
create_contract | Agreements with numbered clauses + signature blocks |
MUST DO:
- Include all required fields (don't generate incomplete documents)
- Verify amounts/totals are correct before generating
- Use
hash_pdfafter generation for integrity verification - For invoices: include payment terms, due date, and line item totals
MUST NOT DO:
- Don't generate documents with placeholder data unless explicitly asked
- Don't skip tax calculations on invoices
WORKFLOW 4: Convert Between Formats
Goal: Transform PDFs to/from other formats.
| Direction | Tool | Best For |
|---|---|---|
| PDF → Markdown | pdf_to_markdown | LLM consumption, editing |
| PDF → HTML | pdf_to_html | Web display |
| PDF → JSON | pdf_to_json | Programmatic processing |
| PDF → CSV | pdf_to_csv | Spreadsheet import (tables) |
| Markdown → PDF | markdown_to_pdf | Document generation |
| Images → PDF | images_to_pdf | Photo compilation |
MUST DO:
- For PDF→Markdown: verify headings and tables preserved
- For tables→CSV: check column count consistency
WORKFLOW 5: Manipulate Pages
Goal: Restructure existing PDFs.
| Task | Tool |
|---|---|
| Combine files | merge_pdfs |
| Extract pages | split_pdf |
| Split by sections | split_by_bookmarks |
| Rotate | rotate_pages |
| Remove pages | delete_pages |
| Reorder | reorder_pages |
| Reduce size | compress_pdf |
| Brand | add_watermark |
| Headers/footers | add_headers_footers |
| Page numbers | add_page_numbers |
| Legal numbering | add_bates_numbers |
MUST DO:
- Verify page count after merge/split operations
- Use
compress_pdfon large files before sharing (66% typical reduction) - For legal documents: use
add_bates_numbersfor discovery compliance
WORKFLOW 6: Secure & Protect
Goal: Protect sensitive content and ensure compliance.
Security workflow:
scan_sensitive_data(path)— detect PII (emails, phones, SSNs, credit cards)detect_active_content(path)— find JavaScript, actions, executables- Based on findings:
- PII found →
redact_pdf(true content removal, not masking) - Active content →
sanitize_pdf(remove JS, actions, embedded files) - Sharing externally →
remove_metadata(strip author, dates) - Confidential →
encrypt_pdf(AES-128 password protection) - Restrict editing →
set_permissions(control print/copy/edit)
- PII found →
MUST DO:
- ALWAYS scan for PII before sharing documents externally
- Use true redaction (
redact_pdf), never just black boxes over text - Sanitize PDFs from untrusted sources before opening
- Verify redaction worked (extract text from redacted area should return nothing)
MUST NOT DO:
- Don't share PDFs externally without PII scan
- Don't use visual masking as "redaction" (text is still extractable)
- Don't decrypt documents you don't own
WORKFLOW 7: Forms
Goal: Detect, fill, and flatten PDF forms.
Tool sequence:
detect_form_fields(path)— list all fields (name, type, current value)fill_form(path, fields: {...})— fill by field nameflatten_form(path)— make non-editable after filling
For flat/scanned forms (no interactive fields):
describe_form_layout(path)— get page dimensions + detected linesfill_flat_form(path, overlays: [{x, y, text}])— overlay text at positions
MUST DO:
- Always detect fields first (know what's available)
- Flatten after filling if the form shouldn't be edited further
- For flat forms, use
describe_form_layoutto get correct positioning
Cross-MCP Orchestration
PDF + Finance: Invoice Generation Pipeline
FINANCE: create_invoice(customer: "acme", items: [...]) → invoice data
PDF: create_invoice(data) → invoice.pdf
PDF: hash_pdf(path: "invoice.pdf") → integrity hash
EMAIL: send_email(to: customer, subject: "Invoice #123", attachment: "invoice.pdf")
PAYMENTS: create_checkout_intent(amount, reference: "inv_123")
PDF + CRM: Contract Generation
CRM: get_deal(id: "d_123") → {customer, value, terms}
PDF: create_contract(parties: [...], clauses: [...], value: deal_value)
PDF: add_watermark(path, text: "DRAFT") → for review
EMAIL: send_email(to: customer, subject: "Contract for review")
→ After signing:
PDF: remove_metadata(path) → clean version for filing
ARTIFACT: write_artifact(folder: "contracts", name: "acme-enterprise.pdf")
PDF + Security: Document Sanitization
PDF: inspect_pdf(path: "received.pdf") → unknown document
PDF: detect_active_content(path) → {javascript: true, embedded_files: 2}
PDF: sanitize_pdf(path) → safe version (JS removed, files stripped)
PDF: scan_sensitive_data(path) → {ssn: 3, credit_cards: 1}
PDF: redact_pdf(path, patterns: ["ssn", "credit_card"]) → redacted version
SLACK: send_message(channel: "#legal", text: "⚠️ Received PDF had active content + PII. Sanitized and redacted.")
PDF + ERP: Purchase Order Flow
ERP: create_purchase_order(vendor: "WidgetCo", items: [...]) → PO data
PDF: create_purchase_order(data) → po.pdf
PDF: add_page_numbers(path: "po.pdf")
EMAIL: send_email(to: vendor, subject: "PO #2025-045", attachment: "po.pdf")
Important Guidelines
- Inspect first — Always understand a PDF before operating on it
- PII scan before sharing — Never send externally without checking for sensitive data
- True redaction —
redact_pdfremoves content; visual masking doesn't - Verify output — Check page counts after merge/split, check text after extraction
- Compress before sending — Large PDFs should be compressed (66% typical savings)
- Hash for integrity — Use
hash_pdfon important documents for tamper detection - Local-only — All processing happens locally, no data leaves the machine
Troubleshooting
Extraction returns empty: PDF may be scanned/image-only. Use profile_complexity to check. OCR not available in this tool.
Generated PDF won't open: Check for invalid characters in text fields. Verify all required parameters were provided.
Encryption failed: Ensure password meets minimum length. AES-128 R4 is the supported algorithm.
Form fields not detected: PDF may use flat layout (no interactive fields). Use fill_flat_form with x,y positioning instead.
Merge produces large file: Use compress_pdf after merging. Typical 66% size reduction.