aig787/agpm
Overview
This skill processes PDF files for reliable text extraction, form filling, table and image extraction, OCR of scanned pages, and basic PDF manipulation like merging, splitting, and watermarking. It focuses on predictable outputs and safe, memory-aware operations for both single files and large batches. Use it to convert unstructured PDFs into structured data or to automate form workflows.
How this skill works
The skill inspects PDF structure (pages, images, tables, form fields) and selects the appropriate pipeline: direct text extraction, region- or table-aware extraction, OCR for scanned content, or form field detection and filling. It provides manipulation utilities to merge/split files and apply annotations, and implements error handling and performance optimizations such as chunked or parallel processing for large sets.
When to use it
- Extract searchable text from native PDFs
- Run OCR on scanned documents to produce editable text
- Detect and populate PDF form fields automatically
- Extract tables or images for data export (CSV/Excel)
- Split or merge PDFs and add watermarks or annotations
Best practices
- Check for password protection and file integrity before processing
- Choose the right tool per task: table-aware extractors for tables, OCR for images, PyPDF2 for structural changes
- Process large documents in chunks and use streaming/generators to reduce memory use
- Validate extracted data with heuristics (invoice numbers, dates) before downstream use
- Test workflows on sample pages to tune OCR and region extraction parameters
Example use cases
- Extract invoice data (invoice number, date, totals) and output JSON or CSV for accounting ingestion
- Auto-fill application or compliance forms from user-provided data and save a flattened filled PDF
- Convert multi-page research reports into text and extract tabular datasets to CSV/Excel
- Batch-process a directory of scanned contracts with OCR and produce a searchable archive
- Split a combined report into single-page PDFs and add a confidentiality watermark
FAQ
Yes. The skill uses OCR (Tesseract or similar) on page images to extract text from scanned documents, but OCR quality depends on image resolution and scan quality.
How does it avoid running out of memory on large files?
It supports page-by-page processing, chunked workflows, generators, and parallel workers so you can limit memory usage and track progress during large or batch jobs.
3 skills
This skill helps you extract text, fill forms, and analyze PDFs efficiently, enabling automated data extraction and document processing.
This skill audits CSV data for quality, consistency, and completeness, helping you identify missing values, duplicates, and format issues efficiently.
This skill performs comprehensive code reviews focusing on correctness, performance, security, and maintainability to improve PR quality.