OpenParable
Skip to content
← Back to skills

PDF To Bibtex

Documents
pdf-to-bibtex

PDF To Bibtex is an Agent Skill for documents published in the JabRef/jabref repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Turns PDF papers into BibTeX entries with JabRef's jabkit CLI, pulling metadata from XMP, embedded BibTeX, GROBID, or text heuristics - builds a bibliography from a whole folder of papers.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/JabRef/jabref/blob/HEAD/skills/users/pdf-to-bibtex/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/pdf-to-bibtex, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

PDF to BibTeX

Extract bibliographic data from PDF files and produce BibTeX entries using jabkit, JabRef's command-line toolkit.

Setup

jabkit runs via JBang — no JDK setup needed. Install JBang if missing:

curl -Ls https://sh.jbang.dev | bash -s - app setup   # Linux/macOS
iex "& { $(iwr -useb https://ps.jbang.dev) } app setup"   # Windows

Then install jabkit on the PATH (the same command also updates it):

jbang app install --fresh --force jabkit@jabref

One-off run without installation:

jbang --fresh jabkit@jabref --help

Basic usage

jabkit convert --input paper.pdf --input-format pdfMerged --output paper.bib

Omit --output to print BibTeX to stdout. Add --porcelain before the subcommand for script-friendly output:

jabkit -p convert --input paper.pdf --input-format pdfMerged

PDF importer formats

Pass one of these as --input-format:

Format idStrategy
pdfMergedMerges results of the other importers into one best-effort entry — use this by default
pdfXmpReads XMP metadata stored in the PDF
pdfEmbeddedBibFileReads a BibTeX file embedded as PDF attachment
pdfVerbatimBibtexParses BibTeX printed verbatim on the first page
pdfContentHeuristic extraction from the text of the first page
pdfGrobidSends the PDF to a GROBID service (requires GROBID to be enabled/reachable)
pdfBibiliographyRule-based parsing of the bibliography section

--input-format "*" auto-detects the format (also works for non-PDF inputs).

Recommended workflow

  1. Run with pdfMerged first.

  2. Check the result for a doi field. If a DOI is present but fields look incomplete, fetch clean metadata instead:

    jabkit doi-to-bibtex 10.1145/3149935.3149942
    
  3. Validate the resulting library:

    jabkit check paper.bib
    

Batch conversion

for f in papers/*.pdf; do
  jabkit -p convert --input "$f" --input-format pdfMerged >> library.bib
done

Afterwards generate citation keys for all entries:

jabkit citationkeys generate library.bib --output library.bib

Related

  • Write metadata back into PDFs (reverse direction): jabkit pdf update --citation-key <key> --input library.bib --input-format bibtex
  • Full CLI reference: the jabkit skill in this repository.