agentleFS
MoeenNehzatiMoeenNehzati/famulus/skills/pdf-to-markdown/SKILL.md

pdf-to-markdown

Skill4 starsChanged 4 months agoMITView on GitHub

Use when research-paper analysis requires readable source or text that is not already available. Do not use for generic non-research PDFs.

  • Reads credentials

14 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 3 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 11 edited versions we read keep these.

  • 3

    Distinctive

    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
  1. Very specific:

    No arXiv ID? Search arxiv [title] [authors] via WebSearch to find one.

    line 46
  2. Very specific:

    Run the scripts-fetch-arxiv-source interface with <arxiv-id> [<output-dir>].

    line 47
  3. Distinctive:

    If arXiv returns HTML instead of a tarball, the paper has no source — move on.

    line 49
  4. Distinctive:

    If LaTeX source found anywhere: download, extract, done.

    line 60
  5. Distinctive:

    If no LaTeX source found, convert the PDF directly.

    line 64
  6. Very specific:

    Before running: check whether models are cached using the scripts-check-marker-models interface.

    line 66
  7. Very specific:

    If any models are missing, warn the user: "Running marker will download missing models (~3GB total to ~/.cache/datalab/models/).

    line 67
  8. Very specific:

    Always specify --output_dir — the default buries output in the anaconda site-packages directory.

    line 73

“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md
<!-- BEGIN BLUEPRINT INTERFACES -->

Generated from blueprint.yaml. Do not edit this block by hand.

Executable Interfaces:

Send the required caller (caller skill), interface, version, and arguments; optional dry_run defaults to false. Compact uses ordered positionals plus an option mapping; ordered raw argv uses positionals: [] plus every argv token in list options. Never mix forms.

  • pdf-to-markdown._rtx.interface.scripts-check-marker-models — Check whether required Marker/Surya models are downloaded and cached locally.
    • Caller: pdf-to-markdown
    • Version: 1
    • Security level: 0
    • Alternative: owner Arguments JSON (replace labels with actual values). Omit optional positionals and options that are not needed. {"options": {}, "positionals": [], "stdin": null} Required options: []; positional arity: 0..0; stdin: forbidden
  • pdf-to-markdown._rtx.interface.scripts-fetch-arxiv-source — Download and extract the LaTeX source tarball for a paper from arXiv.
    • Caller: pdf-to-markdown
    • Version: 1
    • Security level: 2
    • Alternative: owner Arguments JSON (replace labels with actual values). Omit optional positionals and options that are not needed. {"options": {}, "positionals": ["arxiv-id", "output-dir"], "stdin": null} Required options: []; positional arity: 1..2; stdin: forbidden
<!-- END BLUEPRINT INTERFACES -->

PDF to Markdown

Overview

Convert a research paper to LLM-readable text. Prefer LaTeX source over PDF conversion — LaTeX preserves math, structure, and cross-references that PDF-to-text destroys.

Step 1 — Find LaTeX source (do this first)

Input required: paper title and authors. arXiv ID if known.

arXiv (check first — highest hit rate for CS/math/econ)

  1. No arXiv ID? Search arxiv [title] [authors] via WebSearch to find one.
  2. Run the scripts-fetch-arxiv-source interface with <arxiv-id> [<output-dir>].
    • Script downloads arxiv.org/src/<id>, extracts, lists .tex files found.
    • If arXiv returns HTML instead of a tarball, the paper has no source — move on.
  3. Root file is usually main.tex; if absent, scan for the file that \begin{document}.
  4. Done — hand .tex files to the LLM.

If not on arXiv — check in order

  • Author GitHub: WebSearch "[title]" site:github.com — look for a repo with .tex files
  • Author personal/institutional page: WebSearch [title] [author] latex source
  • OpenReview (openreview.net/search?term=[title]) — Attachments tab, look for source zip
  • ACL Anthology (aclanthology.org) — NLP venues; links to arXiv preprint when one exists

If LaTeX source found anywhere: download, extract, done.

Step 2 — PDF fallback via marker_single

If no LaTeX source found, convert the PDF directly.

Before running: check whether models are cached using the scripts-check-marker-models interface. If any models are missing, warn the user: "Running marker will download missing models (~3GB total to ~/.cache/datalab/models/). Proceed?" Do not run marker_single until confirmed.

Standard invocation (good typeset PDF, no extra cost):

marker_single paper.pdf --output_dir ./output --disable_image_extraction

Always specify --output_dir — the default buries output in the anaconda site-packages directory.

Math-heavy paper (ask user before using — slower, better equation/table output):

marker_single paper.pdf \
  --output_dir ./output \
  --disable_image_extraction \
  --llm_service <configured-marker-llm-service> \
  --use_llm \
  --redo_inline_math \
  --highres_image_dpi 300

Requires a configured Marker LLM backend, such as an Anthropic-backed Marker service with ANTHROPIC_API_KEY in the environment or the matching API-key flag. Uses the selected provider API (pay-per-token where applicable).

Other useful flags:

  • --page_range 0,5-10 — convert specific pages only
  • --output_format json — structured output instead of flat markdown
  • --disable_ocr — skip OCR for faster conversion (safe if PDF has selectable text)

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.