Stop losing an afternoon to chasing dozens of reference PDFs by hand. One DOI in, every reference PDF out — using your existing institutional access.
$ npx -y skills add ltczding-gif/ref-downloader --agent claude-code
Stop losing an afternoon to chasing dozens of reference PDFs by hand. One DOI in, every reference PDF out — using your existing institutional access.
Status: beta (v0.4.1). Windows + Microsoft Edge verified path. macOS / Linux / Chromium untested. Expect rough edges around supplementary downloads and publisher-site changes. PR-worthy issues welcome.
Heads up — not a paywall bypass. ref-downloader uses your institutional access. If your university or organization subscribes to a journal, those refs work. If they don't, those refs become
manual_pendingfor you to follow up on by hand.
$ python run_ref_downloader.py 10.1021/jacs.5c05017
=== Ref Downloader Wrapper ===
DOI: 10.1021/jacs.5c05017
PROJECT: jacs.5c05017
Config: config.example.toml + config.local.toml
>>> extract_refs.py
Title: Designing Natural Cell-Inspired Heme-Spurred Membrane...
References found: 38
>>> validate_refs.py
Total: 38 Verified: 38 Failed: 0 No DOI: 0
>>> download_refs.py
[ 1] downloaded (842 KB) Lee2016_NatEnergy.pdf
[ 2] downloaded (1.2 MB) Wang2018_AdvMater.pdf
[ 3] manual_pending (auth_redirect)
[ 4] downloaded (655 KB) Chen2019_JACS.pdf
[ 5] failed (challenge_timeout)
[ 6] ignored (ignored_institution_access)
... 31 more refs processed ...
[38] downloaded (956 KB) Park2024_JElectrochemSoc.pdf
========== Download report ==========
Total references: 38
Main PDFs: 33 downloaded · 3 manual_pending · 1 failed · 1 ignored
SI files: 12 captured
PDFs land in: ./jacs.5c05017_refs/jacs.5c05017/
=====================================
download_report.csv gives every ref a status + reason (manual_pending (auth_redirect), failed (challenge_timeout), ignored); events.jsonl keeps the per-ref event trace.Ctrl+C. State persists per project; rerunning skips already-downloaded refs and retries only the failures.--auto mode retry queue (manual-pending refs get a second async attempt 60s later, hot-session preserved).REF_DOWNLOADER_BROWSER=cloak to swap in cloakbrowser's stealth Chromium with humanized input — no code changes, same pipeline. See Configuration.The skill is self-contained under skills/ref-downloader/. Pick the install path for your agent framework:
git clone https://github.com/ltczding-gif/ref-downloader.git
# Pick ONE install destination for your agent framework:
# Claude Code: cp -r ref-downloader/skills/ref-downloader ~/.claude/skills/
# Codex CLI: cp -r ref-downloader/skills/ref-downloader ~/.codex/skills/
# Copilot CLI / VSC: cp -r ref-downloader/skills/ref-downloader .github/skills/
# Project-local: cp -r ref-downloader/skills/ref-downloader .agents/skills/
cd ~/.claude/skills/ref-downloader # or wherever you copied it
pip install playwright pymupdf
playwright install msedge
cp config.example.toml config.local.toml # then set [crossref].mailto
# In your agent: just describe the task; the skill triggers via its description.
# Direct CLI for testing: python scripts/run_ref_downloader.py 10.1021/jacs.5c05017
What you'll see: 30–80 refs discovered for a typical chemistry/physics paper, then a mix of downloaded (refs your institution covers), manual_pending (SSO bounce or paywall), and occasional failed (publisher quirk). Run on a DOI from a journal your institution actually subscribes to for the highest hit rate. Details below.
tomllib).pip install pymupdf) for DOI extraction from PDF text when Zotero lookup is unavailable.Pick the install path for your agent framework:
| Framework | Install command |
|---|---|
| Claude Code | cp -r skills/ref-downloader ~/.claude/skills/ |
| Claude Agent SDK | same (auto-discovers ~/.claude/skills/) |
| Codex CLI | cp -r skills/ref-downloader ~/.codex/skills/ |
| Copilot CLI / VS Code agent | cp -r skills/ref-downloader .github/skills/ |
| Any framework (project-local) | cp -r skills/ref-downloader .agents/skills/ |
Then install Python prereqs INSIDE the copied skill folder (the skill protocol doesn't manage Python deps):
cd ~/.claude/skills/ref-downloader # or wherever you copied it
pip install playwright pymupdf # or use the source's requirements.txt
playwright install msedge
cp config.example.toml config.local.toml
# Edit config.local.toml — at minimum set [crossref].mailto.
# Windows: notepad config.local.toml
# macOS / Linux: $EDITOR config.local.toml (or vim / nano / code / ...)
If you want to hack on the code, the skill folder is a runnable Python project:
git clone https://github.com/ltczding-gif/ref-downloader.git
cd ref-downloader
pip install -r requirements.txt -r requirements-dev.txt
playwright install msedge
cp skills/ref-downloader/config.example.toml skills/ref-downloader/config.local.toml
# Edit config.local.toml — at minimum set [crossref].mailto.
# Run the offline test suite
python -m pytest tests/ -v
# Run the tool directly
python skills/ref-downloader/scripts/run_ref_downloader.py 10.1021/jacs.5c05017
(After install — paths assume the skill is at <SKILL_DIR>, e.g. ~/.claude/skills/ref-downloader/. In source, <SKILL_DIR> = skills/ref-downloader/.)
python <SKILL_DIR>/scripts/run_ref_downloader.py 10.1021/jacs.5c05017
Default output: <cwd>/jacs.5c05017_refs/jacs.5c05017/
python <SKILL_DIR>/scripts/run_ref_downloader.py "C:\path\to\your_paper.pdf"
Default output: <pdf_dir>/your_paper_refs/<doi-derived-name>/
python <SKILL_DIR>/scripts/run_ref_downloader.py 10.1021/jacs.5c05017 --output-dir refs/
python <SKILL_DIR>/scripts/run_ref_downloader.py 10.1021/jacs.5c05017 --yes --auto
python <SKILL_DIR>/scripts/run_ref_downloader.py 10.1021/jacs.5c05017 --config ./alt.toml
All configuration lives in config.local.toml (gitignored). Copy config.example.toml to bootstrap.
| Section | Key | Purpose |
|---|---|---|
[crossref] | mailto | Your email — entry into Crossref polite pool |
[zotero] | db_path | Optional path to zotero.sqlite for DOI lookup from PDF filename |
[browser] | edge_profile_dir | Edge profile directory; empty = OS default |
[browser] | disable_extensions | Set true to launch with --disable-extensions |
[institution] | auth_hosts | Hostnames that mean "you got bounced to SSO" (e.g. ["sso.your-uni.edu"]) |
[institution] | auth_url_fragments | URL substrings indicating SSO (e.g. ["oauth", "saml"]) |
[institution] | auth_page_titles | <title> text for SSO pages (catches HTML served as PDF) |
[institution] | auth_loading_titles | Loading-page titles (also reused for AIP/AVS publisher loading detection) |
[institution] | ignored_access_dois | DOIs you know are paywalled at your institution; skipped without retry |
Environment variables override file values:
| Variable | Maps to |
|---|---|
REF_DOWNLOADER_MAILTO | crossref.mailto |
REF_DOWNLOADER_ZOTERO_DB | zotero.db_path |
REF_DOWNLOADER_EDGE_PROFILE | browser.edge_profile_dir |
REF_DOWNLOADER_DISABLE_EXTENSIONS | browser.disable_extensions (1/true to enable) |
REF_DOWNLOADER_CONFIG | Path to alternate TOML file |
See skills/ref-downloader/config.example.toml for full documentation.
What it is. CloakBrowser is a third-party Python package by CloakHQ (MIT-licensed, available on PyPI as cloakbrowser). It ships a patched Chromium build with source-level anti-fingerprint changes designed to look like a normal browser to common bot-detection layers (Cloudflare Turnstile, Radware, DataDome, FingerprintJS, etc). Its launch_persistent_context_async() API is intentionally compatible with Playwright's — that's what lets ref-downloader swap backends with a single env var instead of rewriting the download flow.
ref-downloader is a Claude Code plugin with 1 hand-picked skill, indexed on Flowy in the Research category. Install it with the command on its page. It includes ref-downloader. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.
Is this plugin yours?
Claim it with GitHubSubmit a pluginPromote it