Input identification
- Treat the parent directory of the current SKILL.md as .
- Resolve from OBSIDIAN_VAULT_PATH; when missing, require the user to provide the Vault path.
- Accept:
- A valid arXiv ID, arXiv:ID, or arxiv.org link;
- A public HTTP(S) URL that returns PDF content;
- An existing local PDF.
- Non-arXiv web pages cannot be passed directly to the image script. First use paper-analyze/scripts/resolve_source.py; if it returns selected_pdf_url or local_pdf, then pass that value.
- Confirm the output directory is located at /20_Research/Papers///images. Existing images are kept by default unless the user requests a refresh.
Execution
<python> "<skill-dir>/scripts/extract_images.py" "<arxiv-id-or-pdf-url-or-local-pdf>" "<images-dir>" "<images-dir>/index.md"
The script automatically performs:
- arXiv: source images take priority, figure PDFs in the source come next, and the paper PDF is the fallback.
- Direct PDF URL: download to a temporary directory, then extract from the PDF.
- Local PDF: extract directly, with no network access.
Verification
- Confirm that the files in index.md actually exist.
- Prioritize architecture, method, main results, and ablation figures; filter out logos, small icons, and duplicate content.
- Check PNG readability; do not recommend embedding when cropping is wrong or text is too small.
- Return the directory, index, count, and the 3–5 most valuable filenames.
- Obsidian uses ![[filename.png|800]].
Failure handling
- URL returns HTML instead of PDF: stop and prompt to run the source resolver first; do not treat the URL as an arXiv ID.
- Public download fails: report the HTTP status or content type; do not attempt to log in or bypass access controls.
- Output path escapes the Vault: stop.
- Do not delete existing images, and do not leave temporary downloads in the Vault.