agentleFS
L4pisLazuliL4pisLazuli/grounded-paper-skills/.claude/skills/paper-extract/SKILL.md

paper-extract

Skill0 starsChanged 3 months agoMITView on GitHub

Hybrid PDF extract: prefer Marker `_raw/` for full text; take math from arXiv source, then Mathpix, then page image plus vision. Use when normalizing `_raw/` into `extracted/`, fixing equations or algorithms, or when the user mentions Marker, Docling, Mathpix, OCR, or arXiv source.

3 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. Deadpoolmine/systematic-research-skills★ 14same name
    2. smallSheep123/paper-skills★ 11same name
    3. lucaswychan/quant-paper-agent★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository4 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Do not treat direct PDF reading as the main path.

    line 12
  2. Distinctive:

    If the arXiv source cannot be obtained (paper not on arXiv, source withheld / PDF-only, or the fetch fails), fall to the next path in the …

    line 43
  3. Very specific:

    If no path resolves an equation, keep it and mark [extraction uncertain], and state which source was used.

    line 45
  4. Distinctive:

    Keep the OCR (Llama) configuration — API key, endpoint / model name, and cost-bearing options — under the user's own management (a local, …

    line 68
  5. Distinctive:

    survey / both: use the math reference priority (arXiv first) for method / math / algorithm pages.

    line 75
  6. Distinctive:

    Do not change meaning. No translation, no “helpful” paraphrase that alters sense

    line 79
  7. Very specific:

    Never cite _raw/ (wikilinks must target extracted/)

    line 83
  8. Distinctive:

    Do not invent a range ID to cover several blocks.

    line 104

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Paper extract (hybrid)

Do not treat direct PDF reading as the main path. Normalize machine output in _raw/ into extracted/.

Layout

sources/<source-id>/
├── original/          # PDF original (placed by human)
├── _raw/              # Machine extract (not the citation source of truth)
│   ├── marker.md      # Marker full-text draft (single full-text extractor)
│   ├── arxiv/         # arXiv LaTeX / e-print source (authoritative math; preferred)
│   ├── mathpix/       # high-accuracy math pages (fallback for math)
│   └── pages/         # page images pXX.png (optional, for re-extract)
└── extracted/         # human-readable source of truth (cite here)

Path priority (full text)

  1. Markdown exists under _raw/ (Marker) → read it and generate/update extracted/
  2. _raw/ missing → ask the user to run Marker (see tooling). Do not silently fill extracted/ by reading the whole PDF
  3. Exceptions: short checks (e.g., Abstract) or filling pages missing from _raw may use the PDF / page images

Math / equation reference priority

Equations and algorithms must come from an authoritative source, not from full-text OCR. Use this fixed order:

  1. arXiv LaTeX / e-print source (_raw/arxiv/) — preferred (compiled TeX; no OCR guesswork)
  2. Mathpix (or equivalent high-accuracy math OCR) on the PDF math pages (_raw/mathpix/)
  3. PDF page image + vision re-extract of only the affected pages (_raw/pages/)

Fallback on fetch failure (must be explicit)

  • If the arXiv source cannot be obtained (paper not on arXiv, source withheld / PDF-only, or the fetch fails), fall to the next path in the list above (Mathpix → page image + vision).
  • Do not substitute an undefined or arbitrary source (blog, mirror, a different paper, or model memory) for the missing equations.
  • If no path resolves an equation, keep it and mark [extraction uncertain], and state which source was used. When math correctness is load-bearing (survey / both), ask the user before proceeding.

Tooling (Windows-friendly)

Use caseToolOutput
Full-text draft (all modes)Marker (single full-text extractor)_raw/marker.md
Math / algorithms (survey)arXiv source → Mathpix → page image + vision (in that order)_raw/arxiv/ → _raw/mathpix/ → _raw/pages/
Scanned PDF onlyOCR (Llama vision OCR, or Tesseract)_raw/ocr.md
Naive OCR on text-layer PDFsNot the main path (math breaks easily)—

Marker: known weaknesses and how to complement them

Marker is the single full-text extractor (Docling is no longer used):

  • Equations / inline math can be imperfect → take math from the arXiv source (or Mathpix); do not trust Marker's math for algorithm.md
  • Complex / nested tables can be misparsed → keep the caption only, verify against the original PDF page, and note "See original for table"
  • Multi-column layout, footnotes, references can be reordered → sanity-check reading order against the PDF when a section looks scrambled
  • Figures are captured as captions only (by design) → note "See original for figure"
  • Mark any doubtful span [extraction uncertain] and re-extract only those pages via the math reference priority

OCR (Llama) configuration

  • Keep the OCR (Llama) configuration — API key, endpoint / model name, and cost-bearing options — under the user's own management (a local, gitignored env / config file that the user owns)
  • Reason: it carries credentials and billable settings, so it must never be committed or auto-edited by the agent
  • The agent may ask the user to run Llama OCR, but must not generate, hardcode, or commit these settings

By mode:

  • study: full-text _raw from Marker is enough to ingest
  • survey / both: use the math reference priority (arXiv first) for method / math / algorithm pages; re-extract page-by-page if still broken

Normalize _raw → extracted/

  • Do not change meaning. No translation, no “helpful” paraphrase that alters sense
  • Split by chapter/section into extracted/NN-<section-slug>.md (~300–500 lines)
  • Figures/tables: captions only; "See original for figure"
  • Symbol corruption (e.g., π→⇡, ρ→⇢), broken equation line breaks, or likely omissions: mark [extraction uncertain] and, if possible, re-extract only those pages via the math reference priority
  • Never cite _raw/ (wikilinks must target extracted/)

Block IDs (Obsidian)

  • One ID names one block. Latin letters, digits, hyphens only. Unique within the file. Same-page blocks: ^p12-a, ^p12-b
  • Simple paragraph: space + ^id at the end of the last line
Body text of the paragraph. ^p12-a
  • Structured blocks (blockquote, list, callout, table): ID on its own line, with a blank line before and after
> Quoted body from the paper.

^p12

Next paragraph.
  • Do not invent a range ID to cover several blocks. If later citations need each paragraph, give each its own ID

Roles

LocationRole
_raw/Machine output; ingest input
extracted/Reading / citation source of truth
survey/algorithm.mdCleaned math / pseudocode for implementation (cross-check the arXiv source or high-accuracy _raw)

Forbidden

  • Skipping _raw/ and filling extracted/ by reading the whole PDF
  • Treating broken extract as “correct math” without checking
  • Using naive OCR (e.g., Tesseract) as the main path for text-layer papers
  • On arXiv-source fetch failure, silently pulling equations from an undefined / arbitrary source instead of the defined fallback
  • Committing or auto-editing OCR (Llama) credentials / config

Done when

  • extracted/ chunks exist; meaning was not changed
  • Each extracted/ file has unique block IDs; placement matches the paragraph vs structured-block rules above
  • Uncertain math is marked [extraction uncertain] rather than silently “fixed”
  • Citations, if any were added in this pass, resolve to existing block IDs

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.