ocr-parser
Skill1 starsChanged 4 months agoMITView on GitHub
This skill should be used when the user wants to perform OCR (extract text from images or PDFs) and wants the agent to invoke a provider-agnostic OCR tool. Supports Alibaba DashScope Qwen (default model qwen3.5-ocr; PDF via Response API, images via chat), Volcano Engine Ark Doubao vision OCR, and Unisound U1 OCR — via scripts/ocr_parser.py and scripts/qwen_pdf_package.py. Use when the user says "OCR this image", "把 PDF 转成文字 / Markdown", "识别图片中的文字", "extract text from this PDF", or explicitly invokes one of the supported providers.
- Reads credentials
In this repository2 other files it gives its agents.
- premium-ui-gallerySkill
- visionSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 1 is distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Do not use for handwritten signature verification or languages the chosen model does not support.
- Very specific: line 48
Write a package folder (same convention as math_ai/QM/reference/<name>/):
- Very specific: line 62
Prefer scripts/qwen_pdf_package.py for PDFs when using Qwen (handles split ≤50 pages, merge, image download, meta).
- Very specific: line 63
Place literature under a project ref/ (or equivalent).
- Very specific: line 87
No real keys in the source repo.
- Very specific: line 96
PDF + Qwen (default): run python scripts/qwen_pdf_package.py <pdf> [--out-dir <package_dir>].
- Very specific: line 98
Use unisound only if the user asks for Unisound / U1, or Qwen PDF fails.
- Very specific: line 106
Document changes in references/providers.md.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
OCR Parser (multi-provider)
Extract text from images and PDFs via a single skill. Default OCR model is qwen3.5-ocr.
| Provider | Input | Workflow | Output | Best for |
qwen | image or PDF | sync | text/md | default; PDF native + CJK |
volcano | image | sync | text | Volcano Ark alternative |
unisound | async 4-step | markdown | alternative PDF layout parser |
When to use
- Image or PDF text extraction / OCR.
- Mentions of Qwen / 通义 / DashScope, Volcano / 火山 / Doubao, Unisound / 云知声 / U1.
- Workflow step that needs OCR as a sub-task.
Do not use for handwritten signature verification or languages the chosen model does not support.
Quick start
# Image (default provider qwen, default model qwen3.5-ocr → falls back to qwen-vl-plus chat OCR if needed)
python scripts/ocr_parser.py ./receipt.png
# PDF → QM/reference-style package (recommended for papers)
python scripts/qwen_pdf_package.py ./paper.pdf
python scripts/qwen_pdf_package.py ./paper.pdf --out-dir ./ref/paper
# Or via ocr_parser with explicit PDF provider path
python scripts/ocr_parser.py --provider qwen ./paper.pdf -o ./paper.md
# Volcano / Unisound
python scripts/ocr_parser.py --provider volcano "https://example.com/page.png"
python scripts/ocr_parser.py --provider unisound ./paper.pdf -o paper.md
# Override model
python scripts/ocr_parser.py --provider qwen --model qwen-vl-plus ./img.jpgPDF OCR output layout (required)
For academic PDFs / multi-page docs, do not leave a bare .md next to the PDF.
Write a package folder (same convention as math_ai/QM/reference/<name>/):
<name>/
<name>.pdf # source PDF (copied into the package)
<name>.md # merged Markdown; image refs are relative: images/...
images/ # downloaded figures / crops from OCR
_pages/ # per-chunk markdown (≤50 pages per chunk for qwen3.5-ocr)
_ocr_raw/ # optional raw intermediates
_ocr_meta.json # model, page count, image count, timestampsRules for the agent:
- Prefer
scripts/qwen_pdf_package.pyfor PDFs when using Qwen (handles split ≤50 pages, merge, image download, meta). - Place literature under a project
ref/(or equivalent); each OCR’d paper is one subfolder as above. - Loose PDFs that are not yet OCR’d may sit directly in
ref/; after OCR, move/copy into<name>/. - Markdown must reference local
images/...paths, not expiring OSS URLs. qwen3.5-ocrPDF limit: ≤50 pages and ≤100 MB per request — longer PDFs are split automatically.
Example _ocr_meta.json:
{
"source_pdf": "paper.pdf",
"model": "qwen3.5-ocr",
"task": "document_parsing",
"pages": 13,
"chunks": 1,
"pages_per_chunk": 50,
"embedded_images": 4,
"page_renders": 0,
"md_chars": 12345,
"finished_at": "2026-08-09 14:00:00"
}Configuration (API keys)
No real keys in the source repo. The script auto-loads <skill_dir>/.env.
cp ocr-parser/.env.example ~/.claude/skills/ocr-parser/.env
# fill DASHSCOPE_API_KEY / VOLCANO_API_KEY / UNISOUND_API_KEY as neededWorkflow
- PDF + Qwen (default): run
python scripts/qwen_pdf_package.py <pdf> [--out-dir <package_dir>]. - Image + Qwen:
python scripts/ocr_parser.py <image>(default providerqwen, default modelqwen3.5-ocr). - Use
unisoundonly if the user asks for Unisound / U1, or Qwen PDF fails. - On auth errors, surface the missing env var name.
- On empty/garbled output, try another model/provider — see
references/providers.md.
Extending
- Image providers: add
<name>_ocr(...)inscripts/ocr_parser.pyand register inPROVIDERS. - PDF packaging / model defaults: edit
scripts/qwen_pdf_package.pyandQWEN_DEFAULT_MODELinocr_parser.py. - Document changes in
references/providers.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

