arxiv-figures
Skill340 starsChanged 7 months agoMITView on GitHub
Optimize and prepare figures for arXiv submission: format conversion (EPS/PDF/PNG/JPG), size reduction, metadata stripping, processor compatibility (DVI vs PDFLaTeX). Triggers on: "optimize figures for arXiv", "reduce figure size", "convert figures for arXiv", "fix arXiv figures", "figure too large", "arxiv image compression". Companion to arxiv-preflight and arxiv-package.
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
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
- Distinctive: line 104
Remove palette indexing if unnecessary
- Distinctive: line 105
Remove alpha channel if background is solid
- Very specific: line 111
Verify %%BoundingBox appears near top of file, not only at end
- Very specific: line 112
If only %%BoundingBox: (atend), extract actual values and place at top
- Distinctive: line 116
If figures were renamed or reformatted:
- Distinctive: line 118
Remove explicit extensions where possible (allows processor flexibility)
- Very specific: line 119
Verify \graphicspath settings if used
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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.
Files
arXiv Figure Optimizer
Purpose
Analyze, optimize, and convert figures in a TeX/LaTeX project to meet arXiv requirements and size constraints. Produces correctly formatted, efficiently compressed figures that compile without errors.
Companion skills:
arxiv-preflight— full submission validationarxiv-package— tarball packaging
Format Rules
By Processor
| Processor | Accepted | Rejected |
| LaTeX (DVI mode) | .ps, .eps | .pdf, .png, .jpg |
| PDFLaTeX | .pdf, .png, .jpg | .ps, .eps |
By Content Type
| Content | Optimal Format | Rationale |
| Photographs | JPEG | Lossy compression suits continuous tone |
| Line drawings / diagrams | PDF (vector) | Scalable, sharp at any resolution |
| Plots with text labels | PDF (vector) | Text remains crisp and searchable |
| Screenshots / raster art | PNG | Lossless compression for sharp edges |
| Mixed photo + text | PNG or PDF | Depends on dominant content |
Workflow
1. Inventory
Scan the project for all figures:
- Parse
\includegraphicscalls from all.texfiles - Identify the TeX processor (DVI vs PDFLaTeX) from document preamble or build config
- For each figure: record path, format, file size, dimensions (pixels or vector bounds)
- Flag missing figures, wrong-format figures, oversized figures
2. Analyze
For each figure, determine:
- Format compliance — does the format match the processor?
- File size — flag individual figures >2MB, total >15MB
- Resolution — PNG/JPEG: flag >34 Megapixels (arXiv warning threshold since Feb 2026)
- Content type — photograph vs diagram vs plot (determines optimal format)
- Redundant metadata — PNG: ICC profiles, alpha channels, EXIF, interlacing
- EPS efficiency — verbose PostScript from plotting programs (common with matplotlib, R, MATLAB)
3. Optimize
Apply transformations in order of impact:
Format Conversion (when format violates processor requirements)
# EPS → PDF (for PDFLaTeX)
epstopdf figure.eps
# or
ps2pdf -dEPSCrop figure.eps figure.pdf
# PDF/PNG/JPG → EPS (for DVI mode)
convert figure.png figure.epsSize Reduction — Vector Figures
# Distill verbose EPS
eps2eps input.eps output.eps
# or convert to PDF
ps2pdf -dEPSCrop input.eps output.pdfSize Reduction — Raster Figures
# Strip PNG metadata, remove alpha, optimize compression
convert input.png -strip -alpha remove -define png:compression-level=9 output.png
# Reduce oversized PNG resolution (keep ≤300 DPI at print size)
convert input.png -resize 3000x3000\> -strip output.png
# JPEG quality optimization (80-90 is visually lossless for most content)
convert input.jpg -quality 85 -strip output.jpg
# Downsample oversized JPEG
convert input.jpg -resize 3000x3000\> -quality 85 -strip output.jpgPNG Optimization (avoid arXiv warnings)
- Remove palette indexing if unnecessary
- Remove alpha channel if background is solid
- Strip ICC color profiles
- Remove metadata chunks
- Disable interlacing
EPS BoundingBox Fix (prevents Missing number, treated as zero)
- Verify
%%BoundingBoxappears near top of file, not only at end - If only
%%BoundingBox: (atend), extract actual values and place at top
4. Update TeX Source
If figures were renamed or reformatted:
- Update
\includegraphicspaths - Remove explicit extensions where possible (allows processor flexibility)
- Verify
\graphicspathsettings if used
5. Verify
After optimization:
- Attempt local compilation to verify all figures render
- Compare visual output of optimized vs original figures
- Report size reduction per figure and total
6. Report
# Figure Optimization Report
**Processor:** [detected]
**Total figures:** [count]
**Size before:** [total MB]
**Size after:** [total MB]
**Reduction:** [percentage]
## Changes Made
| Figure | Original | Optimized | Size Before | Size After | Action |
|--------|----------|-----------|-------------|------------|--------|
| fig1 | fig1.eps | fig1.pdf | 12.3 MB | 0.4 MB | EPS→PDF conversion |
| fig2 | fig2.png | fig2.png | 8.1 MB | 1.2 MB | Strip metadata, downsample |
## Warnings
[Any remaining issues — e.g., figures still above thresholds]Tools Reference
| Tool | Install | Use Case |
ImageMagick (convert) | System package | Format conversion, resizing, stripping |
Ghostscript (ps2pdf, eps2eps) | System package | EPS/PS optimization and conversion |
epstopdf | TeX Live | EPS → PDF conversion |
pdfcrop | TeX Live | Trim PDF whitespace |
optipng | System package | PNG lossless optimization |
pngquant | System package | PNG lossy size reduction |
jpegoptim | System package | JPEG lossless optimization |
Core Principles
- Never degrade visual quality below print-readable. Optimization means removing waste (metadata, unnecessary resolution, verbose encoding), not destroying information.
- Match format to processor. A figure in the wrong format blocks compilation. This is the highest priority fix.
- Preserve vector where possible. Converting vector to raster is a one-way quality loss. Only do this when the vector version is pathologically large (>10MB) and cannot be distilled.
- Report everything. The user decides which optimizations to accept. Show before/after sizes and explain each transformation.
In this repository94 other files it gives its agents.
- AGENTS.mdAGENTS.md
- adr-writerSkill
- agent-builderSkill
- animateSkill
- api-docs-generatorSkill
- appraiseSkill
- architecture-diagramSkill
- architecture-reviewerSkill
- arxiv-packageSkill
- arxiv-preflightSkill
- benchmark-runnerSkill
- changelog-composerSkill
- chart-claritySkill
- citation-auditSkill
- codebase-advisorSkill
- code-refinerSkill
- competitive-analyzerSkill
- concept-to-imageSkill
- debug-investigatorSkill
- decision-mapSkill
- dependency-auditSkill
- devils-advocateSkill
- domain-modelingSkill
- engineering-retroSkill
- env-validatorSkill
- estimate-calibratorSkill
- feasibility-assessorSkill
- figure-rhetoricSkill
- figure-table-qualitySkill
- filesystemSkill
- githubSkill
- gpu-optimizerSkill
- handoffSkill
- html-presentationSkill
- html-videoSkill
- humanizeSkill
- idea-validatorSkill
- immuneSkill
- intakeSkill
- kg-builderSkill
- launch-videoSkill
- learning-workspaceSkill
- lightpanda-browserSkill
- linkedin-post-styleSkill
- literature-reviewSkill
- manuscript-provenanceSkill
- manuscript-reviewSkill
- manuscript-typographySkill
- market-analyzerSkill
- marp-slidesSkill
- mcp-to-skillSkill
- md-to-pdfSkill
- migration-risk-analyzerSkill
- milestone-runnerSkill
- module-deepeningSkill
- notebooklmSkill
- package-evaluatorSkill
- package-optimizerSkill
- paper-to-skillSkill
- plan-promptsSkill
- The first 60 shown.
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
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.

