literature-pdf-ocr-library
Skill738 starsChanged 8 months agoMITView on GitHub
Search traceable academic papers, download legally accessible PDFs from arXiv and open-access sources, convert PDFs or page images to Markdown with a PaddleOCR layout-parsing API (or local pdfminer fallback), and organize the results into an AI-readable literature library. Use when Claude Code needs to build a paper corpus, batch OCR PDFs to Markdown, ingest real literature into a knowledge base, fetch arXiv or Hugging Face paper leads, or turn a directory of papers into structured Markdown plus metadata.
In this repository34 other files it gives its agents.
- academic-researcherSkill
- bioinformatics-init-analysisSkill
- biorxiv-databaseSkill
- claude-code-dispatchSkill
- codex-dispatchSkill
- dataset-discoverySkill
- gemini-deep-researchSkill
- inno-code-surveySkill
- inno-deep-researchSkill
- inno-experiment-analysisSkill
- inno-experiment-devSkill
- inno-figure-genSkill
- inno-grant-proposalSkill
- inno-idea-evalSkill
- inno-idea-generationSkill
- inno-paper-reviewerSkill
- inno-paper-writingSkill
- inno-pipeline-plannerSkill
- inno-prepare-resourcesSkill
- inno-rclone-to-overleafSkill
- inno-reference-auditSkill
- making-academic-presentationsSkill
- ml-paper-writingSkill
- paper-analyzerSkill
- paper-finderSkill
- paper-image-extractorSkill
- Remote Experiment ExecutionSkill
- Research Experiment DriverSkill
- Research Idea ConvergenceSkill
- Research Literature TraceSkill
- research-newsSkill
- Research Paper HandoffSkill
- Research Pipeline PlannerSkill
- scientific-writingSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 29
Never dump papers into the root or a flat directory without a corpus name.
- Very specific: line 52
After OCR, record each paper's ocr/ path in literature_bank.md so agents can read the actual content.
- Distinctive: line 92
Read source-strategy.md when you need source-specific behavior, file layout conventions, or legal constraints.
- Very specific: line 93
Use scripts/search_and_download_papers.py for traceable search and PDF download (supports --query and --arxiv-ids).
- Very specific: line 94
Use scripts/paddleocr_layout_to_markdown.py for single-file or batch OCR conversion (supports --fallback-pdfminer).
- Very specific: line 95
Use scripts/build_library_index.py to generate library_index.json and library_index.jsonl.
- Very specific: line 96
Use scripts/ingest_literature_library.py when the user wants the full ingestion workflow in one go.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
Literature PDF OCR Library
Overview
Use this skill to build a real, traceable literature corpus instead of fabricating references or scraping arbitrary publisher pages. The default workflow is: narrow the topic, search official or stable APIs, download only legally accessible PDFs, run OCR or layout parsing, then emit a clean Markdown library with machine-readable metadata.
Canonical Directory Layout
In Oh My Paper projects, the corpus always lives under .pipeline/literature/<corpus-name>/.
In standalone projects, use research/literature/<corpus-name>/.
Never dump papers into the root or a flat directory without a corpus name.
.pipeline/
literature/
<corpus-name>/ ← one folder per topic/session, e.g. "humanoid-locomotion"
search_results.json ← raw search/ID-lookup results
library_index.json ← consolidated index for the whole corpus
library_index.jsonl
papers/
<arxiv-id>-<title-slug>/ ← one folder per paper
metadata.json
paper.pdf
ocr/ ← OCR output lives here, next to the PDF
paper/
doc_0.md ← main OCR markdown (PaddleOCR: multiple pages)
manifest.json
doc_0.md ← pdfminer fallback: single flat fileRules:
--out-diralways points to.pipeline/literature/<corpus-name>/— never to.pipeline/literature/directly.- OCR output lives inside the paper's own folder (
papers/<slug>/ocr/), not in a top-levelocr/directory. - After OCR, record each paper's
ocr/path inliterature_bank.mdso agents can read the actual content.
Commands
# Download by arXiv IDs (recommended when IDs are known from web search)
python .claude/skills/literature-pdf-ocr-library/scripts/search_and_download_papers.py \
--arxiv-ids 2502.13817 2501.14459 \
--out-dir .pipeline/literature/my-corpus \
--download-pdfs
# Download by query
python .claude/skills/literature-pdf-ocr-library/scripts/search_and_download_papers.py \
--query "humanoid locomotion reinforcement learning" \
--out-dir .pipeline/literature/my-corpus \
--limit 20 --sources arxiv semanticscholar openalex hf_daily \
--download-pdfs
# OCR: PaddleOCR API (best quality)
export PADDLEOCR_TOKEN="<token>" # ask user, never hardcode
python .claude/skills/literature-pdf-ocr-library/scripts/paddleocr_layout_to_markdown.py \
.pipeline/literature/my-corpus/papers/*/paper.pdf \
--output-dir .pipeline/literature/my-corpus/papers \
--skip-existing
# OCR: pdfminer fallback (text-only, no layout — confirm with user first)
python .claude/skills/literature-pdf-ocr-library/scripts/paddleocr_layout_to_markdown.py \
.pipeline/literature/my-corpus/papers/*/paper.pdf \
--output-dir .pipeline/literature/my-corpus/papers \
--fallback-pdfminer
# Build index
python .claude/skills/literature-pdf-ocr-library/scripts/build_library_index.py \
--library-root .pipeline/literature/my-corpusResources
- Read source-strategy.md when you need source-specific behavior, file layout conventions, or legal constraints.
- Use
scripts/search_and_download_papers.pyfor traceable search and PDF download (supports--queryand--arxiv-ids). - Use
scripts/paddleocr_layout_to_markdown.pyfor single-file or batch OCR conversion (supports--fallback-pdfminer). - Use
scripts/build_library_index.pyto generatelibrary_index.jsonandlibrary_index.jsonl. - Use
scripts/ingest_literature_library.pywhen the user wants the full ingestion workflow in one go.
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.

