Install
$ agentstack add skill-shaishavmaisuria-research-paper-lifecycle-skills-fetch-paper ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
Fetch Paper
Resolves one DOI or arXiv ID to a legal open-access copy (PDF URL, arXiv HTML rendering, landing page) and optionally downloads it for transient reading. This is the fetch layer that find-papers, literature-review, study-exemplars, and draft-related-work build on.
When to use
- The user has a DOI, doi.org URL, arXiv ID, or arxiv.org URL and wants the paper.
- Another skill needs full text for a paper it found (lit review, exemplar study).
- The user asks "is there an open-access version of this paper?"
- NOT for topic/title/venue search — run
find-papersfirst to get the identifier.
Inputs
- Exactly one identifier per fetch: a DOI (
10.1145/3589132.3625571,
https://doi.org/...) or an arXiv ID (2403.12345, arXiv:2403.12345v2, cs/0309136, or any arxiv.org URL). arXiv-issued DOIs (10.48550/arXiv.*) are auto-converted.
UNPAYWALL_EMAIL(orCONTACT_EMAIL) env var — a real address; Unpaywall
rejects placeholders with HTTP 422. The script prompts if unset.
Process
- Resolve the identifier. Run:
`` python3 scripts/resolve_oa.py --json ``
The script handles everything deterministic: identifier normalization, Unpaywall best_oa_location lookup, arXiv PDF/HTML URLs, the post-2026 ACM DL open-access fallback for 10.1145/* DOIs, rate limiting, 429 backoff, and response caching under .cache/fetch-paper/. Never hand-roll these API calls.
- Interpret the result (exit codes: 0 = OA found, 3 = no legal OA copy,
2 = bad input/config, 1 = network failure):
- Prefer
html_url(arXiv HTML) when present — easiest to read directly. - Otherwise use
pdf_url. Read the meaning ofoa_status,version, and
license in [references/oa-sources.md](references/oa-sources.md).
version: submittedVersionmeans a preprint — warn the user that the
published version may differ before they quote or cite page numbers.
- Fetch the full text transiently. Either read the URL directly, or:
`` python3 scripts/resolve_oa.py --download ``
which saves the PDF to a fresh temp directory (never the repo). Read it, extract what the task needs, then delete it. dl.acm.org blocks scripted downloads — give the user the URL to open in a browser instead.
- If exit code is 3 (no legal OA copy): relay the script's suggestions —
author homepages / institutional repositories (search via find-papers), arXiv by title, the user's library access, or emailing the authors. Never suggest Sci-Hub, LibGen, or any shadow library, and never try to bypass a paywall. Full rules: [references/copyright-and-politeness.md](references/copyright-and-politeness.md).
- Process, don't persist. Quote at most short excerpts in your analysis.
Never write paper text, abstracts, or the PDF into the repository or any committed file. Metadata (DOI, title, BibTeX fields) is always fine.
Output
- A resolution report (human-readable, or JSON with
--json):is_oa,
oa_status, license, version, pdf_url, html_url, landing_url, source, plus notes.
- With
--download: a transient PDF in a temp directory, path printed to stderr. - Nothing is ever written into the repository.
Guardrails
- One identifier per invocation — never loop this script over a list of DOIs
for bulk harvesting (ACM ToU and arXiv policy both prohibit it). For a handful of papers in a session, run it one at a time and let the built-in rate limits breathe.
- Legal sources only; transient processing only; no storage, no redistribution.
- Cite the published DOI, not the preprint, when both exist — and verify every
citation with verify-citations before it lands in a bibliography.
- Never submit anything to any system on the user's behalf.
References
- [references/oa-sources.md](references/oa-sources.md) — Unpaywall fields and
errors, arXiv URL patterns, ACM DL open access, troubleshooting.
- [references/copyright-and-politeness.md](references/copyright-and-politeness.md)
— what is safe to keep vs. transient-only, politeness contract.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: ShaishavMaisuria
- Source: ShaishavMaisuria/research-paper-lifecycle-skills
- License: Apache-2.0
- Homepage: https://shaishavmaisuria.github.io/research-paper-lifecycle-skills/
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.