wdc63/sci-papers-downloder
Academic paper downloader skill: Scopus search + Unpaywall primary + optional Sci-Hub fallback
π Academic Paper Downloader Skill
δΈζθ―΄ζ (README.zh-CN.md)
A practical AI skill for searching papers from Elsevier/Scopus and then downloading full text by DOI/title with this strategy:
- Use Scopus to get clean metadata (DOI, title, year, source, cited count).
- Try download via Unpaywall first.
- Optionally use Sci-Hub CLI as a fallback when Unpaywall is unavailable.
Designed for conversational AI use ("download a batch", "download latest papers") and automated agent workflows.
β¨ Features
- π Scopus search by keywords/title/raw query
- π§Ύ Structured metadata output (DOI/title/year/source/cited_by)
- β¬οΈ Auto download by DOI
- π’ Unpaywall first (open-access priority)
- π Optional Sci-Hub fallback
- π§ Intent mapping for natural language:
few/ "some" / "a few"batchas many as possiblelatest/ recent-year mode
π§© Repository Structure
SKILL.md- skill behavior and policy mappingagents/openai.yaml- agent UI metadatascripts/search_scopus.py- Scopus search utilityscripts/download_open_access.py- DOI downloader (Unpaywall + fallback)scripts/topic_batch_download.py- end-to-end topic search + quantity/latest-aware download
π Quick Start
1) Get API access
Elsevier / Scopus API key
- Create an account on Elsevier Developer Portal: https://dev.elsevier.com/
- Create an API key in your profile.
- Make sure your key/account has access to Scopus Search API (depends on institutional entitlement).
Unpaywall email
Unpaywall API requires an email parameter. A real or virtual email can be used.
2) Configure environment variables
export ELSEVIER_API_KEY="your_elsevier_api_key"
export UNPAYWALL_EMAIL="your_email_or_virtual_email@example.com"3) Run via script or AI conversation
Option A: Direct script
# Download a latest batch in a topic
python3 scripts/topic_batch_download.py \
--keywords "pedestrian simulation" \
--quantity-mode batch \
--latest \
--outdir ./downloads# Download exactly 5 latest papers
python3 scripts/topic_batch_download.py \
--keywords "pedestrian simulation" \
--latest \
--target 5 \
--outdir ./downloads_latest_5Option B: Ask your AI agent (example prompts)
- "Download a batch of pedestrian simulation papers."
- "Download 5 latest papers in building evacuation simulation."
- "Download as many latest crowd simulation papers as possible."
The skill maps these words into concrete CLI behavior (few/batch/max + latest filters).
π€ Automated Agent Workflow
Use JSON output for pipelines:
python3 scripts/topic_batch_download.py \
--keywords "building pedestrian evacuation simulation" \
--latest \
--quantity-mode batch \
--json --out ./summary.json \
--outdir ./downloadsThen parse summary.json for downloaded paths, statuses, and DOI lists.
π§· Optional: Install Sci-Hub CLI fallback
uv tool install git+https://github.com/Oxidane-bot/scihub-cli.gitdownload_open_access.py fallback resolution order:
- custom
--scihub-cmd - local
scihub-cliin PATH uvx --from git+https://github.com/Oxidane-bot/scihub-cli.git scihub-cli
π Use as a Codex Skill
Install to your skill directory:
git clone https://github.com/wdc63/sci-papers-downloder.git ~/.codex/skills/sci-papers-downloderRestart your AI CLI/session so skill discovery refreshes.
βοΈ Legal & Ethics
- Unpaywall is used as the primary legal OA source.
- If you enable fallback sources, ensure your usage complies with local laws, institutional policy, and publisher terms.
- This repository is provided for research workflow automation only.
π License
MIT - see LICENSE.