jmagly/aiwg/pdf-extractor
Claude Code and agent skill by jmagly/aiwg
- community
Checking that the SKILL.md file is still in the repository.
Extract text, tables, and images from PDF files. Use when converting PDF documentation, manuals, or reports to searchable text.
Install
npx vskill@latest install jmagly/aiwg/pdf-extractorSKILL.md
PDF Extractor Skill
Purpose
Single responsibility: Extract structured content (text, tables, images) from PDF files into organized, searchable formats. (BP-4)
Grounding Checkpoint (Archetype 1 Mitigation)
Before executing, VERIFY:
- [ ] PDF file exists and is readable (
file <path>confirms PDF format) - [ ] PDF is not corrupted (
pdfinfo <path>returns metadata) - [ ] Password known if encrypted
- [ ] Output directory is writable
- [ ] Required tools available (pdfplumber, pytesseract for OCR)
DO NOT proceed without verification. Inspect PDF metadata first.
Uncertainty Escalation (Archetype 2 Mitigation)
ASK USER instead of guessing when:
- PDF appears to be scanned (needs OCR) but OCR tools unavailable
- Multiple table formats detected - unclear which parser to use
- Password-protected but no password provided
- Image extraction quality unclear (resolution, format preferences)
- Language detection needed for OCR
NEVER assume PDF structure without inspection.
Context Scope (Archetype 3 Mitigation)
| Context Type | Included | Excluded | |
|---|---|---|---|
| RELEVANT | Target PDF, extraction options, output path | Other PDF files | |
| PERIPHERAL | Similar PDF structure examples | Unrelated documents | |
| DISTRACTOR | Previous extraction attempts | Other file formats |
Workflow Steps
Step 1: Inspect PDF (Grounding)
Step 2: Determine Extraction Strategy
| PDF Type | Detection | Strategy | |
|---|---|---|---|
| Text-based | pdftotext produces readable text | Direct extraction | |
| Scanned/Image | pdftotext produces empty/garbled | OCR required | |
| Mixed | Some pages text, some images | Hybrid approach | |
| Tables | Visual grid patterns | Table extraction mode | |
| Forms | Interactive fields | Form field extraction |
Step 3: Execute Extraction
Option A: With skill-seekers (if installed)
Option B: Manual extraction guidance
Step 4: Validate Output
Recovery Protocol (Archetype 4 Mitigation)
On error:
- PAUSE - Stop extraction, preserve partial output
- DIAGNOSE - Check error type:
File not found→ Verify pathPassword required→ Ask user for passwordCorrupt PDF→ Try repair withqpdf --checkOCR failed→ Check tesseract installation, language packsMemory error→ Process in chunks, reduce workers
- ADAPT - Switch strategy based on diagnosis
- RETRY - Resume with adapted approach (max 3 attempts)
- ESCALATE - Ask user for guidance
Checkpoint Support
State saved to: .aiwg/working/checkpoints/pdf-extractor/
For large PDFs, extraction saves progress per chunk:
Output Structure
Configuration Options
Extraction Quality Metrics
| Metric | Good | Acceptable | Poor | |
|---|---|---|---|---|
| Text extraction rate | >95% | 80-95% | <80% | |
| Table accuracy | >90% | 70-90% | <70% | |
| Image quality | >300 DPI | 150-300 DPI | <150 DPI | |
| OCR confidence | >90% | 70-90% | <70% |
Troubleshooting
| Issue | Diagnosis | Solution | |
|---|---|---|---|
| Garbled text | Scanned PDF | Enable OCR mode | |
| Missing tables | Complex layout | Use --extract-tables with pdfplumber | |
| Poor OCR | Low resolution | Increase DPI, check language pack | |
| Memory error | Large PDF | Use chunked extraction, reduce workers | |
| Corrupt PDF | File damaged | Try qpdf --check or mutool clean |
Dependencies
Required:
- Python 3.10+
- pdfplumber or pypdf
Optional (for advanced features):
- pytesseract + tesseract-ocr (for OCR)
- Pillow (for image processing)
- camelot-py (for complex tables)
References
- Skill Seekers PDF Support: https://github.com/jmagly/Skill_Seekers/blob/main/docs/PDF_MCP_TOOL.md
- REF-001: Production-Grade Agentic Workflows (BP-1, BP-4)
- REF-002: LLM Failure Modes (Archetype 1-4 mitigations)
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingagentic/code/addons/doc-intelligence/skills/pdf-extractor/SKILL.md
Popularity
- Repository stars
- 102
- Repository forks
- 15
- Repository npm downloads, 7 days
- 2,424
- 7-day trend score
- 42
Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 21 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/jmagly/aiwg/pdf-extractor)