pdf-tools
PDF engineering for extraction, generation, modification, and form filling. Use when extracting text or tables from PDFs, generating PDFs with Puppeteer, modifying PDFs with pdf-lib, filling PDF forms, or implementing PDF security. Use for AI-assisted OCR, HTML-to-PDF conversion, and document processing pipelines.
What this skill does
# PDF Tools Full-lifecycle PDF engineering covering extraction, generation, modification, form filling, and security. Prioritizes JavaScript-first solutions (pdf-lib, unpdf, Puppeteer) with Python/CLI utilities for advanced scenarios. **When to use**: Extracting structured data from PDFs, generating pixel-perfect PDFs from HTML/React, modifying existing PDFs, filling forms (fillable or non-fillable), or securing documents with encryption. **When NOT to use**: Simple text file processing, image-only manipulation without PDF context, or tasks better handled by a word processor. ## Quick Reference | Task | Tool | Key Point | | -------------------------- | ----------------------------- | -------------------------------------------------------------------------- | | Generate PDF from HTML | Puppeteer / Playwright | `page.pdf()`; use `networkidle0` (Puppeteer) or `networkidle` (Playwright) | | Extract text (lightweight) | unpdf | Edge/serverless compatible | | Extract tables (AI) | Vision model + Zod schema | Multi-column and merged cell support | | Extract tables (non-AI) | pdfplumber (Python) | Precise cell boundary detection | | Modify, merge, split | pdf-lib (or `@pdfme/pdf-lib`) | Byte-level PDF manipulation in JS | | Fill fillable forms | pdf-lib (or `@pdfme/pdf-lib`) | Inspect AcroForm fields before writing | | Fill non-fillable forms | Python annotation scripts | Visual analysis + bounding box annotations | | Encrypt PDF | qpdf | AES-256: `qpdf --encrypt user owner 256 --` | | Repair corrupted PDF | qpdf | `qpdf input.pdf --replace-input` | | Fast text extraction (CLI) | poppler-utils | `pdftotext -layout input.pdf -` | | Merge thousands of files | pypdf (Python) | Lighter than headless browser | | Batch queue processing | BullMQ + unpdf | Redis-backed with retry, concurrency, progress tracking | | PDF/A archival compliance | ghostscript + verapdf | `gs -dPDFA=2` for conversion; verapdf for validation | | Tagged PDF (accessibility) | Puppeteer | `tagged: true` maps HTML semantics to PDF structure tags | | Digital signatures | @signpdf/\* | PKCS#7 signing with P12 certificates | | PDF comparison | unpdf + diff / pixelmatch | Text diff or pixel-level visual diff between versions | | Secure redaction | pymupdf (fitz) | `apply_redactions()` removes content bytes, not just visual overlay | ## Common Mistakes | Mistake | Correct Pattern | | ------------------------------------------------------ | ----------------------------------------------------------------- | | Using canvas drawing commands for PDF generation | Use Puppeteer/Playwright with HTML/CSS templates | | Running Puppeteer in edge/serverless environments | Use unpdf for edge; Puppeteer requires full Node.js | | Extracting complex layouts with basic text parsers | Use AI-assisted OCR or pdfplumber for multi-column text | | Storing unencrypted PDFs with PII in public storage | Apply AES-256 encryption via qpdf before storage | | Relying on `window.print()` for server-side generation | Use headless browser APIs (`page.pdf()`) for deterministic output | | Using pypdf for complex layout extraction | Use pdfplumber or AI OCR for multi-column or overlapping text | | Skipping font embedding in containerized environments | Embed Google Fonts or WOFF2 files with Puppeteer | | Writing to flattened PDF form fields | Inspect AcroForm fields with pdf-lib before writing | | Using unmaintained `pdf-lib` for encrypted PDFs | Use `@cantoo/pdf-lib` fork which adds encrypted PDF support | ## Delegation - **Inspect PDF structure and diagnose extraction issues**: Use `Explore` agent to examine AcroForm fields, encoding, and metadata - **Build end-to-end document processing pipelines**: Use `Task` agent to implement extraction, transformation, and generation workflows - **Design PDF architecture for a new system**: Use `Plan` agent to select tools and plan extraction, generation, or modification strategies ## References - [AI Extraction Patterns](references/ai-extraction-patterns.md) -- Vision-based table extraction, recursive summarization, multi-pass verification - [High-Fidelity Generation](references/high-fidelity-generation.md) -- Puppeteer HTML-to-PDF, CSS print tips, React templates, browser pooling - [Legacy Utilities](references/legacy-utilities.md) -- pdfplumber, pypdf, qpdf, poppler-utils for batch and forensic tasks - [Form Filling](references/form-filling.md) -- Fillable field extraction, non-fillable annotation workflow, validation scripts - [Batch Processing and Accessibility](references/batch-and-accessibility.md) -- Queue-based batch processing, PDF/A compliance, tagged PDFs, digital signatures, comparison, redaction
Related in Ads & Marketing
ads
IncludedMulti-platform paid advertising audit and optimization skill. Analyzes Google, Meta, YouTube, LinkedIn, TikTok, Microsoft, and Apple Ads. 250+ checks with scoring, parallel agents, industry templates, and AI creative generation.
banana
IncludedAI image generation Creative Director powered by Google Gemini Nano Banana models. Use this skill for ANY request involving image creation, editing, visual asset production, or creative direction. Triggers on: generate an image, create a photo, edit this picture, design a logo, make a banner, visual for my anything, and all /banana commands. Handles text-to-image, image editing, multi-turn creative sessions, batch workflows, and brand presets.
rpg-migration-analyzer
IncludedAnalyzes legacy RPG (Report Program Generator) programs from AS/400 and IBM i systems for migration to modern Java applications. Extracts business logic from RPG III/IV/ILE source code, identifies data structures (D-specs), file operations (F-specs), program dependencies (CALLB/CALLP), and converts RPG constructs to Java equivalents. Generates migration reports, complexity estimates, and Java implementation strategies with POJO classes, JPA entities, and service methods. Use when modernizing AS/400 or IBM i legacy systems, analyzing RPG source files (.rpg, .rpgle, .RPGLE), converting RPG to Java, mapping data specifications to Java classes, planning legacy system migration, or when user mentions RPG analysis, Report Program Generator, RPG III/IV/ILE, AS/400 modernization, IBM i migration, packed decimal conversion, or mainframe application rewrite.
brand-library-architect
IncludedBuild a complete brand library for a product — visual asset render pipeline, brand documentation set (BRAND, COPY, MANIFESTO, BIOS, FAQ, GLOSSARY, TONE, PRICING), open-source convention files (README, CONTRIBUTING, SECURITY, CODE_OF_CONDUCT), and a self-contained press kit. This skill should be used when the user asks to "build a brand library / brand kit / press kit / brand assets" for a product, "set up a brand library workflow," "create a positioning manifesto plus visual identity," or any combination of brand documentation + visual asset pipeline. Apply phase-by-phase or run end-to-end. Templates are product-agnostic and use {{TOKEN}} placeholders the skill prompts the user to fill.
writing-tech-post
IncludedAuthors engineering blog posts end-to-end: launch deep-dives, incident postmortems, architecture migrations, performance case studies, tutorials, AI/agent system writeups, security disclosures, and research-to-product translations. Picks the correct archetype, plans the abstraction ladder, enforces an evidence cadence (diagrams, benchmarks, profiles, traces, code, ablations), tunes voice against publisher house styles (Datadog, Vercel, GitHub, AWS, Meta, Cloudflare, Jane Street), and runs a pre-publish gate for narrative momentum and disclosure ethics. Use when drafting a new engineering post, restructuring a draft that feels flat, deciding which evidence form belongs where, validating that depth and product context are balanced, or preparing a postmortem, migration, or performance narrative for external publication. Do not use for API reference documentation, README authoring, marketing copy, release notes, generic SEO content, ghost-written executive thought leadership, or non-engineering long-form essays.
blog-google
IncludedGoogle API integration for blog performance: PageSpeed Insights, CrUX Core Web Vitals with 25-week history, Search Console performance, URL Inspection, Indexing API, GA4 organic traffic, NLP entity analysis for E-E-A-T, YouTube video search for embedding, and Google Ads Keyword Planner. Progressive feature availability based on credential tier (API key, OAuth/service account, GA4, Ads). Shares config with claude-seo at ~/.config/claude-seo/google-api.json. Use when user says "google data", "page speed", "core web vitals", "search console", "indexation", "GA4", "keyword research", "nlp entities", "blog performance", "youtube search", "google api setup".