arxiv-to-prompt CLI

A console tool that takes a paper's arXiv source and returns a single LaTeX file you can paste into an LLM request.

  • 172 ★ on the repository
  • Last commit
  • MIT
CLI

Extended access

Why this level

  • Downloads files from arXiv and keeps them in a local cache; it runs only your command.
All reasons and checks

takashiishida/arxiv-to-prompt

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add cli/arxiv-to-prompt

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • Downloads files from arXiv and keeps them in a local cache; it runs only your command.

This is third-party code. Review the repository files before installing.

What it does

`arxiv-to-prompt` downloads a paper's source by arXiv ID or URL, finds the main file with `\documentclass` and merges the rest through `\input` and `\include` into one coherent text. Formulas stay in the original LaTeX, so a model reads them without the losses a PDF brings. The output can be trimmed: `--no-comments` and `--no-appendix` drop comments and appendices, `--section` pulls out individual sections, `--abstract` keeps only the abstract and `--list-sections` shows the outline. `--figure-paths` prints figure file paths, `--expand-macros` expands `\newcommand`, `--token-count` counts tokens and `--copy` puts the result on the clipboard. Downloaded papers are cached locally. The same code is available from Python as `process_latex_source`.

Who it is for. Researchers and engineers who read arXiv papers with Claude Code, Codex or a chat and want formulas to reach the model intact.

Good fit when

  • You ask a model to derive a formula from a paper and the PDF mangles subscripts and fractions.
  • A forty-page paper will not fit the context, so appendices and comments can be dropped.
  • A summary needs only the introduction and methods: `--section` extracts them without the rest.
  • An agent has to see quickly which figures the paper contains, through `--figure-paths`.
  • A ready TeX project already sits on disk and has to be flattened into one file.

Not a fit when

  • The paper has no source on arXiv, only a PDF: the tool works with TeX.
  • You need arXiv search and metadata: an MCP server such as `arxiv-mcp-server` suits that better.
  • You want a finished summary: the tool only prepares text and the model does the answering.

Example request

Run `arxiv-to-prompt 1706.03762 --no-comments --no-appendix` and explain from the resulting LaTeX how attention is computed in this paper.

Limitations

The tool works only with TeX sources, so papers posted as a single PDF are out of reach. The package downloads files from arXiv, so network access is needed, and token counting requires the separate `arxiv-to-prompt[tokens]` install. The cache is stored locally and locked during writes (120 seconds by default, adjustable with `--lock-timeout`). A large paper without trimmed appendices can take a big share of the model's context. The latest commit in the repository is from August 2026.

How to disable. Run `pip uninstall arxiv-to-prompt` and delete the local cache of downloaded papers if you no longer need it.

FAQ

How do I install arxiv-to-prompt?

Run `pip install arxiv-to-prompt`. For token counting add the extra: `pip install 'arxiv-to-prompt[tokens]'`.

What input does the tool accept?

An arXiv ID such as `2303.08774` or a full arXiv URL. It always downloads the latest version of the paper, so you do not specify a version.

How do I extract only some sections?

First run `arxiv-to-prompt 2307.09288 --list-sections`, then `--section "Introduction"`. If a name repeats, use a path with `>`, for example `Fine-tuning > RLHF Results > Human Evaluation`.

How do I hand a paper to an LLM?

The `--copy` flag puts the result on the clipboard. In a shell use a pipeline: `arxiv-to-prompt 1706.03762 | llm -s "explain this paper"` with the `llm` library.

Can I use it from Python?

Yes: `from arxiv_to_prompt import process_latex_source`. The function takes the same options (no comments, no appendix, local folder) and returns a LaTeX string.

Discussion

No questions or reviews yet.

CLI tools

Takes an agent from a topic to an arXiv review paper in LaTeX IEEEtran: approved plan, every citation checked against a live source, PDF build

SkillExtended access487Repository stars

Two Claude Code skills: turn an arXiv paper into Markdown with formulas, and look up journal DOIs and IDs through the arXiv API.

PluginExtended access49Repository stars

Eight skills for LaTeX research papers, from topic to compiled PDF, with verified BibTeX citations and gated steps

SkillExtended access275Repository stars

An Overleaf CLI that pulls LaTeX projects to a folder, pushes edits, compiles PDFs and exposes them to an agent through MCP

CLIBroad access253Repository stars

A local MCP server for arXiv literature work: section-level paper reads, BibTeX from metadata, topic watches

MCP serverExtended access3.3KRepository stars

paper-reading-skill turns one arXiv AI or robotics paper into a report with each claim tied to evidence in the source.

SkillMinimal access151Repository stars

README in short

The README shows one-command install, flag examples with output and a Python example. At the end it lists projects built on the tool: an MCP server, a paper chat, a slide generator and an iOS app.

README badge

Report a problem