paper-pdf
Skill63 starsChanged 5 months agoMITView on GitHub
Parse an academic paper PDF into page text, page images, tables, figures, citations, and cross-references without inventing missing cells. Use before econ-referee, or whenever a working paper PDF needs a source-faithful local reading. Flags scanned pages and unsafe tables instead of guessing values.
- Installs packages
In this repository47 other files it gives its agents.
- install/claude.mdCLAUDE.md
- daskSkill
- econ-visualizationSkill
- geopandasSkill
- matplotlibSkill
- plotlySkill
- polarsSkill
- pymc-bayesian-modelingSkill
- scikit-learnSkill
- seabornSkill
- statistical-analysisSkill
- statsmodelsSkill
- pyfixestSkill
- python-panel-dataSkill
- r-econometricsSkill
- stata-data-cleaningSkill
- stata-regressionSkill
- wrdsSkill
- api-data-fetcherSkill
- citation-managementSkill
- datacommons-clientSkill
- exploratory-data-analysisSkill
- financial-text-nlpSkill
- literature-reviewSkill
- lit-review-assistantSkill
- openalex-apiSkill
- paper-2-acfin-webSkill
- research-ideationSkill
- research-lookupSkill
- sec-edgarSkill
- web-scrapeSkill
- academic-paper-writerSkill
- beamer-presentationSkill
- econ-humanizer-plusSkill
- econ-humanizerSkill
- econ-refereeSkill
- econ-slidesSkill
- econ-writeSkill
- econ-writing-plusSkill
- hypothesis-generationSkill
- latex-econ-modelSkill
- latex-postersSkill
- latex-tablesSkill
- peer-reviewSkill
- scholar-evaluationSkill
- scientific-critical-thinkingSkill
- venue-templatesSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 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.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 21
Do not use it to summarize the paper or to repair a bad scan.
- Distinctive: line 79
Never replace a blank cell with zero or with a value from a nearby row.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 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
Barrios Skills — John Barrios's curated workflow for economists and accountants. Prioritize reproducible empirical work, clear identification language, and journal-ready output.
Academic paper PDF parser
Local, deterministic parser for journal and working-paper PDFs. It writes text, page images, table grids, and figure crops. It does not OCR, call a model, or fill a cell it could not read.
The artifact list follows the reading needs of a referee pass. The code is original to this collection. It is not the Ingar30/reviewer preprocessor.
When to use
- The user hands you a paper PDF and wants tables, text, or figures you can check
- Before
econ-referee - A claim depends on a coefficient, sample size, or caption
Do not use it to summarize the paper or to repair a bad scan.
Setup
python3 -m venv .venv
source .venv/bin/activate
pip install -r skills/writing-and-review/paper-pdf/requirements.txtNeeds Python 3.11+ and PyMuPDF. pdfplumber is the second table reader. If it is missing, the parser still runs and marks those tables single_source.
Run
python skills/writing-and-review/paper-pdf/scripts/parse_paper_pdf.py \
--pdf paper.pdf \
--out paper-pdf-workOptional: --paper-id my-paper and --dpi 150 (72–300). Output goes to paper-pdf-work/<paper-id>/parsed/. Re-running replaces that parsed/ folder only.
Encrypted PDFs stop with a message. Export an unlocked file. Do not try to bypass a password.
What you get
| File | Use |
full_text.md | Body text in reading order, running headers removed |
pages/page_NNN.md | One page, with the printed page label when one was found |
page_images/page_NNN.png | The page to read when text is unsafe |
tables/table_inventory.json | Caption, status, and paths for each extracted grid |
tables/*.csv | Cells. Empty means empty |
tables/*.png | Crop of the table |
figures/figure_inventory.json | Figure captions and crops |
numbers_in_text.json | Number strings with surrounding words |
crossrefs.json | Table, figure, section, appendix, and equation mentions |
in_text_citations.json | Author-year mentions |
reference_list.json | Bibliography lines after a References heading |
sections.json | Heading lines |
quality.json | Pages and tables that must not be trusted as text |
manifest.json | File hash, tool versions, counts |
How to read the output
status: okmeans PyMuPDF and pdfplumber returned the same grid.single_sourcemeans only one extractor returned cells. Check the crop before quoting a coefficient.unsafemeans the grid is sparse or ragged. Leave those cells blank.conflictmeans the two extractors disagree. The main CSV is empty on purpose. Each engine's grid is saved beside it. Quote the crop, not either CSV.ocr_recommendedpages have no text layer, or a large image and little text. Readpage_images/.glyph_warningpages contain control or private-use characters, usually broken math fonts. Do not guess the missing symbol.- Two-column pages are read down the left column, then the right. A line that spans the page stays in vertical order.
- A line-end hyphen joined to a lowercase continuation is one word (
identifica-/tion). Other hyphens stay. - Repeated running headers are removed from the body. They are not deleted from the page image.
Rules for the referee
- Quote a number from a CSV only when that table's status is
okor you have checked the crop. - Never replace a blank cell with zero or with a value from a nearby row.
- A caption with no grid is not evidence the table was omitted from the paper. Open the page image.
- Year-like numbers in
numbers_in_text.jsonare markedyear_like. Do not treat a citation year as an estimate. - Reference splits are candidates. A wrapped bibliography line can merge or split incorrectly. Check the page before claiming a citation is missing.
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.

