Arxiv submission package

From FOURTEEN1416/academic-agent-toolkit · View interactive version

Arxiv submission package is an AI agent skill from the GitHub repository FOURTEEN1416/academic-agent-toolkit. Prepare an arXiv submission package from a LaTeX paper. Cleans the source, builds a tarball, and extracts metadata for upload.

How to use this skill

Skill file

arxiv-prep — arXiv Submission Preparation

Automate the tedious steps of preparing a LaTeX paper for arXiv upload. Creates a clean copy, removes cruft, verifies compilation, and produces a ready-to-upload tarball.

When to Use

Workflow

Phase 1: Pre-clean (judgment calls)

1. Find the paper

Same search logic as paper-presubmit-checks:

  1. User-provided path
  2. paper/current/main.tex
  3. paper/main.tex
  4. main.tex
  5. Glob for **/*.tex with \begin{document}

Identify the paper directory (parent of the main .tex file). All subsequent operations are relative to this directory.

2. Optionally run paper-presubmit-checks

Ask the user: "Want me to run the paper-presubmit-checks first?" Skip if they say they already did.

3. Check for supplements

Scan for separate supplement/appendix .tex files (e.g., supp.tex, appendix.tex, si.tex). If found, ask the user whether to:

4. Review style files

Grep for journal-specific language that should be removed for arXiv:

Flag these and ask before changing.

Phase 2: Automated cleaning

5. Optimize bibliography

Run bib_optimizer to remove unused citations and reorder entries to match their order of appearance in the text:

uvx bib_optimizer bibopt <main.tex> <references.bib> <references_cleaned.bib>

```bash

uvx bib_optimizer bibopt <si.tex> <si_references.bib> <si_references_cleaned.bib>

```

```bash

uvx bib_optimizer bibopt <main.tex> <references.bib> <references_main.bib>

uvx bib_optimizer bibopt <si.tex> <references.bib> <references_si.bib>

```

Then merge with bibtool (deduplicates by cite key):

```bash

bibtool -d references_main.bib references_si.bib -o references_cleaned.bib

```

If bibtool is not available, concatenate both files and manually remove any duplicate @type{key, entries (keep the first occurrence).

If bib_optimizer is not available, skip this step — the .bib will still be handled in step 7.

6. Run arxiv-latex-cleaner
uvx arxiv-latex-cleaner <paper-dir> --resize_images --im_size 500 --compress_pdf

This creates a <paper-dir>_arXiv/ directory with a cleaned copy. The original is untouched. The --compress_pdf flag reduces embedded PDF figure sizes, helping stay under arXiv's 50 MB limit.

If arxiv-latex-cleaner is not available, fall back to manual cleaning:

7. Post-cleaner fixes in `_arXiv/`

Apply these fixes to the cleaned copy:

Phase 3: Verify & package

8. Test compilation

Run in the _arXiv/ directory:

pdflatex -interaction=nonstopmode main.tex
pdflatex -interaction=nonstopmode main.tex
pdflatex -interaction=nonstopmode main.tex

(Three passes to resolve references.) Report:

9. Extract clean metadata

Parse the .tex file to extract metadata for copy-paste into the arXiv submission form:

Present this in a clean, copy-pasteable format.

10. Create tarball
cd <paper-dir>_arXiv && tar -cvf ../arxiv-submission.tar *
11. Final summary

Present:

Rules

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.