yuan1z0825/nature-skills/nature-downloader
Claude Code and agent skill by yuan1z0825/nature-skills
- community
Checking that the SKILL.md file is still in the repository.
Use when a user needs lawful academic full text, CNKI institutional access, English OA retrieval, publisher API access, institutional browser fallback, or supporting information downloads.
Install
npx vskill@latest install yuan1z0825/nature-skills/nature-downloaderSKILL.md
Nature Literature Downloader
This skill routes literature through lawful open-access, publisher-API, CNKI institutional, and browser-based institutional providers. scripts/batch_download.mjs is the orchestration entry point; school configuration, publisher credentials, metadata/OA resolution, provider downloads, content validation, and manifests are separate modules.
Verified routes are examples, not defaults. Every institution should start from the user's actual library resource URL, because resource portals, CAS callbacks, EZproxy, WebVPN, IP-authenticated database pages, and database detail pages reveal the live authorization path more reliably than a school name.
SI confirmation gate — do this first. Before downloading any PDF, CAJ, HTML, XML, archive, or attachment, ask whether the user wants Supporting Information. An explicit request for SI counts as yes; an explicit request for正文 only counts as no. Otherwise ask once for the whole batch. Run the downloader with exactly one of--sior--no-si. Without either flag the script returnssi_confirmation_requiredand does not create the output directory.
Main workflow. Normalize the DOI/title and identify language and publisher before routing. Chinese literature always uses CNKI. For English Elsevier, Springer Nature, and IEEE articles with usable provider credentials, try the publisher API first and do not require an OA determination after a successful API download. If that API attempt fails, automatically check legitimate OA sources. Other English publishers check OA first, then use the institutional Web Access route when OA is unavailable.
Chinese literature is CNKI-only. A Chinese title,zhmetadata language, explicit CNKI source URL, or--route cnkimust use CNKI even if another OA copy appears to exist. Reuse the user's current Chrome library/CNKI login state and prefer configureddiscovery.cnki_url. Never export cookies or collect the institutional password.
Publisher API fallback. A valid API key does not guarantee full-text entitlement. When an Elsevier, Springer Nature, or IEEE API attempt returns no entitlement or no usable full text, automatically try legitimate OA sources first. Returnapi_fallback_confirmation_requiredand ask once whether to use Web Access only after both the publisher API and OA routes fail. Do not switch to institutional Web Access automatically.
Browser-state principle. Authorized downloads depend on the exact browser profile where the user is logged in. If a proxy, CDP session, or browser automation tool opens a fresh profile or a different browser with no login state, do not treat the failure as missing library permission. Switch to a control path that reuses the user's active browser session, or ask the user to authenticate in the controlled browser instance.
Format principle. PDF, HTML full text, and database-native formats such as CAJ are different deliverables. If the user asks for PDF only, require a real PDF link orno_authorized_pdf_found/pdf_fetch_failedwhen none exists. Do not save CAJ, HTML, or a login page as if it were a PDF.
Download Intake and First-Run Configuration
For every download request, first establish the paper list and ask:
Do metadata lookup before this question only when needed to identify the requested papers. Do not download files until the answer is known. Configure a library only when the selected route is CNKI or Web Access. Configure a publisher API only when the selected English article belongs to Elsevier, Springer Nature, or IEEE; an OA determination is not required before trying a configured provider API.
Paid Library Resource Configuration
Ask for the library resource URL the user actually uses:
Then infer the authorization route from the URL before saving config:
The distributed skill contains no school presets. If the user cannot provide a resource URL, ask them to locate their institution's library/database entry instead of guessing a school-specific domain.
The default config path is:
For tests or isolated profiles, set:
The downloader reads this config automatically. If discovery.web_of_science_url is present, scripts/batch_download.mjs uses it as the Web of Science entry; otherwise it falls back to https://www.webofscience.com/wos/woscc/basic-search.
For Chinese literature, the downloader also reads discovery.cnki_url when present. If absent, scripts/batch_download.mjs --title "<中文题名>" falls back to https://kns.cnki.net/kns8s/defaultresult/index.
API-First and Open-Access Fallback
For an English article, identify its publisher before deciding when to resolve article-level OA:
- Collect a DOI, PMID, exact title, article URL, or a definite paper list, then normalize its metadata and publisher.
- If it belongs to Elsevier, Springer Nature, or IEEE and usable provider credentials are configured, try that publisher API first. On success, record
accessMode: publisher_apiandoa_status: not_checked_api_first; do not run OA resolution only to label the article. - If the publisher API fails, automatically search legitimate OA sources such as PMC, Unpaywall, publisher OA pages, arXiv, and other lawful repositories or clearly open PDF URLs. Preserve the failed API attempt in the manifest.
- For all other English publishers, search those legitimate OA sources before Web Access.
- For an exact title or an explicit OA-only request, prefer:
``bash node scripts/batch_download.mjs --title "<exact title>" --open-access --no-si --out "<project>" ``
Use --pdf-url when the user supplies a known legitimate OA PDF URL.
- Verify the downloaded file and record the source. Mark a successful PDF as
open_access_downloaded. - If no lawful OA full text is found, mark
oa_not_found. For a supported publisher whose API already failed, request confirmation before Web Access. For another publisher, continue to Web Access. If--route open_accesswas explicitly requested, stop after the OA result.
Publisher API Credentials
Configure credentials lazily, only when the route first needs them:
Give the user the official registration link: Elsevier https://dev.elsevier.com/, Springer Nature https://dev.springernature.com/docs/quick-start/api-access/, or IEEE https://developer.ieee.org/member/register.
Springer credentials are scoped by service: metadata_api_key validates against /meta/v2/json and cannot enable a download; openaccess_api_key uses /openaccess/jats; fulltext_api_key uses /xmldata/jats under a Full Text agreement. Configure only the services the user has activated. A key may be reused explicitly for multiple services if the account grants each service; do not assume either shared or distinct keys. For Full Text, enter the complete issued KEY/METRIC value in the hidden prompt or via --stdin when required by the account. Setting one Springer service preserves the others. The legacy api_key (including set springer_nature without --service) remains a Full Text credential for compatibility, never an inferred Meta or OA credential.
Springer downloads try the configured Full Text service first, then the configured OA service on failure. OA-only credentials go directly to the OA service. Meta-only credentials do not qualify for API-first downloading. Both full-text services retain content validation and secret-free source URLs. The existing general OA and confirmed Web Access fallbacks follow if these services fail. Validation defaults to the Full Text service; --service metadata and --service openaccess probe only the selected service and credential. Validation checks an HTTP response, leaving article entitlement unverified. Meta validation cannot prove OA or Full Text access, and even a successful full-text service probe cannot guarantee a particular article. Official service references: Meta, OA, Full Text.
Do not proactively ask the user to paste an API key into chat. If the user voluntarily sends a publisher API key, treat that as authorization to save that exact key: do not reject it, ask them to regenerate it, or repeat it back. Pass it to configure_credentials.py set <provider> --stdin, keep it out of command-line arguments, logs, replies, and manifests, then report only the masked confirmation and validation status. The local hidden prompt remains the preferred path when the key has not already been provided. IEEE Metadata API access is not paid full-text access; require the issued Full-Text Access endpoint/template before treating IEEE as downloadable through the API. Secrets are stored in ~/.config/lit-dl/credentials.json with mode 0600.
Resource URL Triage
Classify the user-provided URL before choosing an access path:
If the URL is a login page with a service= parameter, treat the callback host as the resource service and do not make the login page the whole workflow. For example, https://login.university.example/authserver/login?service=https://resources.university.example/callback means the identity service returns to the user's resource portal after authentication.
Institution-Specific Domains
Confirm against what actually appears in the user's address bar; correct these for each institution instead of assuming a preset is complete.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/nature-downloader/SKILL.md
Popularity
- Repository stars
- 29,463
- Repository forks
- 1,747
- 7-day trend score
- 51
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/yuan1z0825/nature-skills/nature-downloader)