Accurate OCR and document extraction with AI
OCR and document extraction whose numbers you can trust: the PDF's own text first, each page read with context from the one before, and validators (running balance to the cent, checksums, totals) that decide what is correct.
Install just this skill
From your terminal, in one command:
claude plugin marketplace add iampreetdave-max/agent-skills && claude plugin install doc-extraction@iampreetdave-skillsOr from inside Claude Code:
/plugin marketplace add iampreetdave-max/agent-skills/plugin install doc-extraction@iampreetdave-skillsOr without the plugin system (macOS, Linux or Git Bash):
git clone --depth 1 https://github.com/iampreetdave-max/agent-skills /tmp/agent-skills && mkdir -p ~/.claude/skills && cp -r /tmp/agent-skills/skills/doc-extraction ~/.claude/skills/Restart Claude Code afterwards. On Windows PowerShell 5, use ; instead of &&. Remove it with claude plugin uninstall doc-extraction@iampreetdave-skills.
Use it
It loads by itself when what you ask matches, for example:
- “Extract the transactions from these bank statements”
- “Which OCR should I use for scanned invoices?”
- “The totals don't match after OCR”
Or call it directly with /doc-extraction:doc-extraction. Installed from a pack, the pack name comes first, for example /all-skills:doc-extraction.
What it does
- Reads the PDF's text layer first, and sends only scanned pages to OCR.
- Gives the OCR model the previous page's headers, last rows and running totals, so tables that span pages stay intact.
- Crops at 300 DPI, asks for a fixed JSON schema, and caches every call.
- Checks running balance to the cent, totals, checksums and amounts in words before anything counts as done.
- Keeps one adapter per layout and a human review step for what fails a check.
Needs
Nothing extra. Python with PyMuPDF helps. Also in all-skills, senior-pack. Read the full instructions in SKILL.md on GitHub.