{"id":48690313,"url":"https://github.com/agents365-ai/paper-fetch","last_synced_at":"2026-04-15T09:00:55.365Z","repository":{"id":350493278,"uuid":"1204723538","full_name":"Agents365-ai/paper-fetch","owner":"Agents365-ai","description":"Legal open-access PDF downloader by DOI — Unpaywall, arXiv, PMC, bioRxiv. Multi-platform Agent Skill.","archived":false,"fork":false,"pushed_at":"2026-04-11T03:08:05.000Z","size":46,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-11T05:35:37.929Z","etag":null,"topics":["agent-skills","claude-code","claude-code-skill","claude-skills","doi","open-access","openclaw","openclaw-skills","pdf-downloader","skill-md","skillsmp","unpaywall"],"latest_commit_sha":null,"homepage":"https://agents365-ai.github.io/paper-fetch/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Agents365-ai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-08T09:14:24.000Z","updated_at":"2026-04-11T05:26:57.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Agents365-ai/paper-fetch","commit_stats":null,"previous_names":["agents365-ai/paper-fetch"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Agents365-ai/paper-fetch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agents365-ai%2Fpaper-fetch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agents365-ai%2Fpaper-fetch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agents365-ai%2Fpaper-fetch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agents365-ai%2Fpaper-fetch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Agents365-ai","download_url":"https://codeload.github.com/Agents365-ai/paper-fetch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agents365-ai%2Fpaper-fetch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31705574,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-12T05:11:36.334Z","status":"ssl_error","status_checked_at":"2026-04-12T05:11:27.332Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent-skills","claude-code","claude-code-skill","claude-skills","doi","open-access","openclaw","openclaw-skills","pdf-downloader","skill-md","skillsmp","unpaywall"],"created_at":"2026-04-11T05:08:55.857Z","updated_at":"2026-04-12T06:00:58.238Z","avatar_url":"https://github.com/Agents365-ai.png","language":"Python","funding_links":[],"categories":["Discover \u0026 Collect"],"sub_categories":["Literature Search \u0026 Discovery"],"readme":"# paper-fetch — Legal Open-Access PDF Downloader\n\n[中文文档](README_CN.md)\n\n## What it does\n\n- Downloads paper PDFs from a **DOI** (or batch file of DOIs) via legal open-access sources\n- **5-source fallback chain**: Unpaywall → Semantic Scholar `openAccessPdf` → arXiv → PubMed Central OA → bioRxiv/medRxiv\n- **Zero dependencies** — pure Python standard library, no `pip install` needed\n- **Auto-named output** — `{first_author}_{year}_{short_title}.pdf`\n- **Batch mode** — pass a file of DOIs with `--batch`\n- **Never touches Sci-Hub or any paywall-bypass service** — if no OA copy exists, reports failure with metadata so you can go through ILL\n- **Self-updating** — when installed via `git clone`, each invocation spawns a detached background `git pull --ff-only` (throttled to once per 24h). Zero user action required. Disable with `export PAPER_FETCH_NO_AUTO_UPDATE=1`.\n\n## Discipline Coverage\n\n**The skill is discipline-agnostic** — it works for any field, not just life sciences or computer science. Coverage depends on whether the paper has a legal OA version, not on its subject area.\n\n| Source | Discipline scope |\n|---|---|\n| **Unpaywall** | ✅ All disciplines (covers every Crossref DOI — humanities, social sciences, physics, chemistry, economics, etc.) |\n| **Semantic Scholar** | ✅ All disciplines (cross-domain academic graph) |\n| **arXiv** | Physics, math, CS, statistics, quantitative finance, economics, EE |\n| **PubMed Central** | Biomedical only |\n| **bioRxiv / medRxiv** | Biology / medicine preprints only |\n\nIn practice, **Unpaywall + Semantic Scholar alone cover OA papers in chemistry, materials, economics, psychology, humanities, and every other field** via institutional repositories, SSRN, RePEc, and publisher-hosted OA copies. arXiv/PMC/bioRxiv are additional fallbacks for their specific domains. If no legal OA copy exists anywhere, the skill reports failure honestly — it will **never** bypass paywalls regardless of discipline.\n\n## Multi-Platform Support\n\nWorks with all major AI coding agents that support the Agent Skills format:\n\n| Platform | Status | Details |\n|----------|--------|---------|\n| **Claude Code** | ✅ Full support | Native SKILL.md format |\n| **OpenClaw / ClawHub** | ✅ Full support | `metadata.openclaw` namespace |\n| **Hermes Agent** | ✅ Full support | Installable under research category |\n| **[pi-mono](https://github.com/badlogic/pi-mono)** | ✅ Full support | `metadata.pimo` namespace |\n| **OpenAI Codex** | ✅ Full support | `agents/openai.yaml` sidecar |\n| **SkillsMP** | ✅ Indexed | GitHub topics configured |\n\n## Comparison\n\n### vs No Skill (native agent)\n\n| Feature | Native agent | This skill |\n|---------|-------------|------------|\n| Resolve DOI to PDF | Ad-hoc web search | Deterministic 5-source chain |\n| Unpaywall integration | No | Yes — highest OA coverage |\n| arXiv / PMC / bioRxiv fallback | Manual | Automatic |\n| Batch download | No | Yes — `--batch dois.txt` |\n| Consistent filenames | No | Yes — `author_year_title.pdf` |\n| Legal-only guarantee | None | Hard refuses paywall bypass |\n| Dependencies | Varies | Python stdlib only |\n\n## Prerequisites\n\n- **Python 3.8+** (standard library only, no extra packages)\n- **Unpaywall contact email** (optional but recommended) — set once:\n\n```bash\nexport UNPAYWALL_EMAIL=you@example.com\n```\n\nAdd it to `~/.zshrc` / `~/.bashrc` to persist. Without it, Unpaywall is skipped and the remaining 4 sources (Semantic Scholar, arXiv, PMC, bioRxiv/medRxiv) are still tried.\n\n## Skill Installation\n\n### Claude Code\n\n```bash\n# Global install\ngit clone https://github.com/Agents365-ai/paper-fetch.git ~/.claude/skills/paper-fetch\n\n# Project-level install\ngit clone https://github.com/Agents365-ai/paper-fetch.git .claude/skills/paper-fetch\n```\n\n### OpenClaw / ClawHub\n\n```bash\nclawhub install paper-fetch\n\n# Or manual\ngit clone https://github.com/Agents365-ai/paper-fetch.git ~/.openclaw/skills/paper-fetch\n```\n\n### Hermes Agent\n\n```bash\ngit clone https://github.com/Agents365-ai/paper-fetch.git ~/.hermes/skills/research/paper-fetch\n```\n\nOr add to `~/.hermes/config.yaml`:\n\n```yaml\nskills:\n  external_dirs:\n    - ~/myskills/paper-fetch\n```\n\n### pi-mono\n\n```bash\ngit clone https://github.com/Agents365-ai/paper-fetch.git ~/.pimo/skills/paper-fetch\n```\n\n### OpenAI Codex\n\n```bash\n# User-level\ngit clone https://github.com/Agents365-ai/paper-fetch.git ~/.agents/skills/paper-fetch\n\n# Project-level\ngit clone https://github.com/Agents365-ai/paper-fetch.git .agents/skills/paper-fetch\n```\n\n### SkillsMP\n\n```bash\nskills install paper-fetch\n```\n\n### Installation paths summary\n\n| Platform | Global path | Project path |\n|----------|-------------|--------------|\n| Claude Code | `~/.claude/skills/paper-fetch/` | `.claude/skills/paper-fetch/` |\n| OpenClaw | `~/.openclaw/skills/paper-fetch/` | `skills/paper-fetch/` |\n| Hermes Agent | `~/.hermes/skills/research/paper-fetch/` | Via `external_dirs` |\n| pi-mono | `~/.pimo/skills/paper-fetch/` | — |\n| OpenAI Codex | `~/.agents/skills/paper-fetch/` | `.agents/skills/paper-fetch/` |\n| SkillsMP | N/A (installed via CLI) | N/A |\n\n## Usage\n\nSingle DOI:\n\n```bash\npython scripts/fetch.py 10.1038/s41586-021-03819-2\n```\n\nCustom output directory:\n\n```bash\npython scripts/fetch.py 10.1038/s41586-021-03819-2 --out ~/papers\n```\n\nBatch mode:\n\n```bash\ncat \u003e dois.txt \u003c\u003cEOF\n10.1038/s41586-021-03819-2\n10.1126/science.abj8754\n10.1101/2023.01.01.522400\nEOF\n\npython scripts/fetch.py --batch dois.txt --out ~/papers\n```\n\nDry-run (preview without downloading):\n\n```bash\npython scripts/fetch.py 10.1038/s41586-020-2649-2 --dry-run\n```\n\nHuman-readable text output:\n\n```bash\npython scripts/fetch.py 10.1038/s41586-020-2649-2 --format text\n```\n\nOr just ask your agent naturally:\n\n\u003e Download the AlphaFold2 paper PDF to my `~/papers` folder\n\n\u003e Fetch the PDF for DOI 10.1038/s41586-020-2649-2\n\n\u003e Download these three papers: 10.1038/s41586-021-03819-2, 10.1126/science.abj8754, 10.1101/2023.01.01.522400\n\n\u003e Check if this paper has an open-access PDF available: 10.1038/s41586-020-2649-2\n\n\u003e Batch download all DOIs from my dois.txt file into ~/papers\n\n## Resolution Order\n\n1. **Unpaywall** — best OA location across all publishers (highest hit rate)\n2. **Semantic Scholar** — `openAccessPdf` field + `externalIds` lookup\n3. **arXiv** — if the paper has an arXiv ID\n4. **PubMed Central OA subset** — if the paper has a PMCID\n5. **bioRxiv / medRxiv** — DOI prefix `10.1101/`\n6. Otherwise → report failure with metadata (title/authors) for ILL\n\n## Files\n\n- `SKILL.md` — **the only required file**. Loaded by all platforms.\n- `scripts/fetch.py` — the downloader (pure stdlib Python)\n- `agents/openai.yaml` — OpenAI Codex sidecar configuration\n- `README.md` — this file\n- `README_CN.md` — Chinese documentation\n\n## Known Limitations\n\n- **Coverage depends on OA availability** — if a paper has no legal OA copy, this skill cannot get it. That is a feature, not a bug.\n- **Some publisher redirects** return an HTML landing page instead of a PDF; the script validates the `%PDF` header and fails cleanly in that case\n- **No authentication** — institutional proxies (EZproxy / OpenAthens) are not supported in this version\n- **Host allowlist** — downloads are restricted to known OA provider domains; PDFs from unlisted hosts are blocked\n- **50 MB size limit** — per-PDF download cap to prevent runaway downloads\n\n## License\n\nMIT\n\n## Support\n\nIf this skill helps your work, consider supporting the author:\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\n      \u003cimg src=\"https://raw.githubusercontent.com/Agents365-ai/images_payment/main/qrcode/wechat-pay.png\" width=\"180\" alt=\"WeChat Pay\"\u003e\n      \u003cbr\u003e\n      \u003cb\u003eWeChat Pay\u003c/b\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n      \u003cimg src=\"https://raw.githubusercontent.com/Agents365-ai/images_payment/main/qrcode/alipay.png\" width=\"180\" alt=\"Alipay\"\u003e\n      \u003cbr\u003e\n      \u003cb\u003eAlipay\u003c/b\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n      \u003cimg src=\"https://raw.githubusercontent.com/Agents365-ai/images_payment/main/qrcode/buymeacoffee.png\" width=\"180\" alt=\"Buy Me a Coffee\"\u003e\n      \u003cbr\u003e\n      \u003cb\u003eBuy Me a Coffee\u003c/b\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n## Author\n\n**Agents365-ai**\n\n- Bilibili: https://space.bilibili.com/441831884\n- GitHub: https://github.com/Agents365-ai\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagents365-ai%2Fpaper-fetch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagents365-ai%2Fpaper-fetch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagents365-ai%2Fpaper-fetch/lists"}