pdflisted
Install: claude install-skill kennethkhoocy/legal-scholarship-skills
# PDF Skill — Unified Extraction and Manipulation
One auto-triggered entry point for all PDF work. The skill probes the PDF first, then routes to the cheapest sufficient backend. GPU OCR (LightOnOCR-2-1B, ~3 GB VRAM) is reserved for scans; dolphin v2 remains as fallback.
## Step 1 — Probe first (ALWAYS)
Run this before any other PDF action:
```bash
python ~/.claude/skills/pdf/scripts/probe_pdf.py <input.pdf>
```
The probe returns JSON with:
- `classification`: one of `encrypted`, `scanned`, `born_digital_footnotes`, `born_digital_simple`, `born_digital_formulas`, `born_digital_tables`, `born_digital_complex`, `uncertain`, `error`
- `formula_density`: fraction of sampled pages carrying a math signal (math fonts such as CMMI/CMSY/CMEX, or math glyphs). Above `0.2` the PDF is classified `born_digital_formulas` and must be routed to a LaTeX-capable backend.
- `footnote_density`: fraction of sampled pages that look footnote-bearing. At/above `0.5` the PDF is classified `born_digital_footnotes` and routed to Docling-direct, which reconstructs footnotes (and emits formula LaTeX) — opendataloader-pdf discards footnote structure.
- `recommended_backend`: one of `halt_password_required`, `lightonocr`, `docling`, `pypdf`, `pdfplumber`, `opendataloader_hybrid`, `opendataloader_then_lightonocr`, `fallback` (`docling` drives `scripts/docling_extract.py`, the footnote-and-formula-aware path; `lightonocr` drives `scripts/lightonocr_run.py`)
- `reasoning`: one-sentence rationale
- `warni