agentsclimarketplace

18 document processing

Skill heymegabyte/claude-skills/18-document-processing

PDF/DOCX/XLSX/PPTX generation and parsing on Cloudflare Workers. Covers CF Browser Rendering → PDF, pdf-lib Worker-native generation, docx/exceljs output, pptxgenjs slides, and RAG-ready text extraction. Use cases: donor annual reports, SaaS invoices, tax receipts, financial reports, grant applications. Source: anthropics/skills pdf/docx/pptx/xlsx patterns.From its SKILL.md

Install
npx -y skills add heymegabyte/claude-skills --skill 18-document-processing

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing 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.

SKILL.md

3.0 KB, 586 tokens by cl100k_base, as published. Nobody here has run it

18 — Document Processing

Worker-native document I/O. All generation runs at the edge — no Lambda, no container, no third-party conversion SaaS.

Sub-modules

  • pdf-generation.md — CF Browser Rendering → PDF + pdf-lib fallback
  • pdf-parsing.md — text + table extraction for RAG ingestion
  • docx-xlsx.md — DOCX (docx library) + XLSX (exceljs) generation in Workers
  • pptx-generation.md — PPTX via pptxgenjs in Workers

Decision tree

Need document output?
├── PDF (invoice / receipt / report)
│   ├── Complex layout (HTML → PDF) → CF Browser Rendering
│   └── Programmatic (no layout) → pdf-lib in Worker
├── DOCX / XLSX (data export / mail merge)
│   ├── DOCX → docx library (pure JS, Worker-compat)
│   └── XLSX → exceljs (no canvas dep, Worker-compat)
└── PPTX (slide deck / pitch deck)
    └── pptxgenjs (Worker-compat, no native deps)

Need document input (RAG)?
├── PDF text → pdf-parse (pure JS) or Workers AI document extraction
└── Tables → structured JSON → D1 or Vectorize

Cloudflare primitives used

  • CF Browser Rendering — puppeteer-compatible Workers binding for HTML → PDF
  • R2 — store and serve generated documents
  • D1 — job state + document metadata
  • Workers AI — optional OCR for scanned PDFs (Llama Vision)
  • Queues — async generation jobs (large reports)

Use case map

Use caseFormatMethod
SaaS invoicePDFpdf-lib → R2
Tax receipt (nonprofit)PDFCF Browser Rendering → R2
Donor annual reportPDFCF Browser Rendering (full layout)
Financial exportXLSXexceljs → R2
Grant applicationDOCXdocx → R2
Board slide deckPPTXpptxgenjs → R2
RAG: donor docsTextpdf-parse → Vectorize

Cross-links

  • rules/cloudflare-lock-in-is-leverage.md — CF Browser Rendering over puppeteer SaaS
  • rules/feature-flags.md — gate new doc types behind flag before GA
  • 13-observability-and-growth/ — track document generation events in PostHog
  • 08-deploy-and-runtime-verification/ — smoke-test R2 presigned URL after deploy

What ships with it: 4 files

24.1 KB alongside SKILL.md

Keep looking

Skills are one crate of 613,757. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.