[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79FAVA7BZS2J4RCVCFBJX8F":3,"skill-same:01M79FAVA7BZS2J4RCVCFBJX8F":311},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":32,"ownerHtmlUrl":33,"ownerBlogUrl":34,"ownerDescription":35,"updatedAt":36,"install":37,"resources":50},"01M79FAVA7BZS2J4RCVCFBJX8F","nature-downloader",null,"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.","hamzabellouch\u002Fagent-skills","hamzabellouch","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F237856042?v=4","01M79BRYW7XAMK3YDWQEMTWGWS","Hamza Bellouch","01M79BRYWXQV3JK2TGVTX8GN2A",8,"MIT","https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: nature-downloader\ndescription: 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.\nmetadata:\n  compatibility: Requires Node.js 22+ and Python 3. CNKI, Web Access, and SI routes additionally require the user's authenticated Chrome session and remote debugging. Uses only lawful OA, publisher API, and user-authorized institutional access.\n---\n\n# Nature Literature Downloader\n\nThis skill routes literature through lawful open-access, publisher-API, CNKI institutional, and browser-based institutional providers. `scripts\u002Fbatch_download.mjs` is the orchestration entry point; school configuration, publisher credentials, metadata\u002FOA resolution, provider downloads, content validation, and manifests are separate modules.\n\nVerified 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.\n\n> **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 `--si` or `--no-si`. Without either flag the script returns `si_confirmation_required` and does not create the output directory.\n\n> **Main workflow.** Normalize the DOI\u002Ftitle 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.\n\n```text\n规范化 DOI\u002F题名并识别语言、出版商\n├─ 中文文献：直接走 CNKI\n└─ 英文文献\n   ├─ Elsevier \u002F Springer Nature \u002F IEEE，且已配置有效 Key\n   │  ├─ 优先通过出版商 API 下载\n   │  ├─ API 下载成功：结束，不强制判断 OA\n   │  └─ API 下载失败：检查文章级 OA，再走 PMC \u002F Unpaywall \u002F 合法仓储\n   └─ 其他出版商\n      ├─ 检查文章级 OA\n      └─ OA 不可用：走 Web Access 机构授权\n```\n\n> **Chinese literature is CNKI-only.** A Chinese title, `zh` metadata language, explicit CNKI source URL, or `--route cnki` must use CNKI even if another OA copy appears to exist. Reuse the user's current Chrome library\u002FCNKI login state and prefer configured `discovery.cnki_url`. Never export cookies or collect the institutional password.\n\n> **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. Return `api_fallback_confirmation_required` and 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.\n\n> **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.\n\n> **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 or `%PDF` response and report `no_authorized_pdf_found` \u002F `pdf_fetch_failed` when none exists. Do not save CAJ, HTML, or a login page as if it were a PDF.\n\n## Download Intake and First-Run Configuration\n\nFor every download request, first establish the paper list and ask:\n\n```text\n是否同时下载这些文献的 Supporting Information（SI，补充材料）？\n```\n\nDo 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.\n\n### Paid Library Resource Configuration\n\nAsk for the library resource URL the user actually uses:\n\n```text\n请发你平时进入图书馆电子资源\u002F数据库的平台链接。\n可以是资源门户、数据库列表、Web of Science 入口、某个数据库详情页，\n或跳转到统一身份认证的登录链接。\n```\n\nThen infer the authorization route from the URL before saving config:\n\n```bash\npython3 scripts\u002Fconfigure_school.py infer \"https:\u002F\u002Fexample.edu\u002Flibrary\u002Fresources\"\npython3 scripts\u002Fconfigure_school.py url \"https:\u002F\u002Fexample.edu\u002Flibrary\u002Fresources\"\npython3 scripts\u002Fconfigure_school.py show\npython3 scripts\u002Fconfigure_school.py health --force\n```\n\nThe distributed skill contains no school presets. If the user cannot provide a resource URL, ask them to locate their institution's library\u002Fdatabase entry instead of guessing a school-specific domain.\n\nThe default config path is:\n\n```text\n~\u002F.config\u002Flit-dl\u002Fschool.json\n```\n\nFor tests or isolated profiles, set:\n\n```bash\nLIT_DL_CONFIG_DIR=\u002Fpath\u002Fto\u002Fconfigdir\n```\n\nThe downloader reads this config automatically. If `discovery.web_of_science_url` is present, `scripts\u002Fbatch_download.mjs` uses it as the Web of Science entry; otherwise it falls back to `https:\u002F\u002Fwww.webofscience.com\u002Fwos\u002Fwoscc\u002Fbasic-search`.\n\nFor Chinese literature, the downloader also reads `discovery.cnki_url` when present. If absent, `scripts\u002Fbatch_download.mjs --title \"\u003C中文题名>\"` falls back to `https:\u002F\u002Fkns.cnki.net\u002Fkns8s\u002Fdefaultresult\u002Findex`.\n\n### API-First and Open-Access Fallback\n\nFor an English article, identify its publisher before deciding when to resolve article-level OA:\n\n1. Collect a DOI, PMID, exact title, article URL, or a definite paper list, then normalize its metadata and publisher.\n2. 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_api` and `oa_status: not_checked_api_first`; do not run OA resolution only to label the article.\n3. 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.\n4. For all other English publishers, search those legitimate OA sources before Web Access.\n5. For an exact title or an explicit OA-only request, prefer:\n\n   ```bash\n   node scripts\u002Fbatch_download.mjs --title \"\u003Cexact title>\" --open-access --no-si --out \"\u003Cproject>\"\n   ```\n\n   Use `--pdf-url` when the user supplies a known legitimate OA PDF URL.\n6. Verify the downloaded file and record the source. Mark a successful PDF as `open_access_downloaded`.\n7. 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_access` was explicitly requested, stop after the OA result.\n\n### Publisher API Credentials\n\nConfigure credentials lazily, only when the route first needs them:\n\n```bash\npython3 scripts\u002Fconfigure_credentials.py set elsevier\npython3 scripts\u002Fconfigure_credentials.py set springer_nature\npython3 scripts\u002Fconfigure_credentials.py set ieee --fulltext-endpoint 'https:\u002F\u002Fissued-endpoint.example\u002Farticles\u002F{doi}'\npython3 scripts\u002Fconfigure_credentials.py set elsevier --stdin\npython3 scripts\u002Fconfigure_credentials.py show\npython3 scripts\u002Fconfigure_credentials.py validate \u003Cprovider>\npython3 scripts\u002Fconfigure_credentials.py delete \u003Cprovider>\npython3 scripts\u002Fconfigure_credentials.py contact-email researcher@example.org\n```\n\nGive the user the official registration link: Elsevier `https:\u002F\u002Fdev.elsevier.com\u002F`, Springer Nature `https:\u002F\u002Fdev.springernature.com\u002Fdocs\u002Fquick-start\u002Fapi-access\u002F`, or IEEE `https:\u002F\u002Fdeveloper.ieee.org\u002Fmember\u002Fregister`.\n\nDo 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 \u003Cprovider> --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\u002Ftemplate before treating IEEE as downloadable through the API. Secrets are stored in `~\u002F.config\u002Flit-dl\u002Fcredentials.json` with mode `0600`.\n\n## Resource URL Triage\n\nClassify the user-provided URL before choosing an access path:\n\n```text\ncas.* \u002F \u002Fauthserver\u002Flogin        CAS \u002F SSO login page; inspect service= callback, then return to the service portal\nidp\u002Fshibboleth \u002F carsi           CARSI \u002F Shibboleth institutional route\nezproxy \u002F libproxy               EZproxy remote-access proxy\nwebvpn \u002F vpn                     WebVPN route\nmetaersp \u002F metaauth \u002F uas        Library resource aggregation portal\nwebofscience \u002F sciencedirect     Database or publisher entry; check whether it was reached through a portal\n```\n\nIf 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:\u002F\u002Flogin.university.example\u002Fauthserver\u002Flogin?service=https:\u002F\u002Fresources.university.example\u002Fcallback` means the identity service returns to the user's resource portal after authentication.\n\n## Institution-Specific Domains\n\nConfirm against what actually appears in the user's address bar; correct these for each institution instead of assuming a preset is complete.\n\n```text\nLibrary home \u002F aggregation:  library.example.edu, resources.example.edu\nDiscovery\u002Fdatabase entry:    webofscience.com, clarivate.com, cnki.net, sciencedirect.com, provider.example.com\nUnified identity \u002F SSO:      sso.example.edu, cas.example.edu, idp.example.edu\nFederation \u002F WAYF:           ds.carsi.edu.cn, wayf.example.org, shibboleth\u002Fopenathens hosts\nProxy \u002F WebVPN:              ezproxy.example.edu, webvpn.example.edu\n```\n\nTreat configured institutional login, federation, proxy, and database-login hosts as sign-in stages. Do not treat reaching them as a final failure.\n\n## Boundaries\n\nUse only the user's legitimate institutional access. Do not bypass paywalls, DRM, or two-factor authentication.\n\n**Verification-first rule:** When a visible slider, checkbox, robot check, or simple verification control appears in the user's authenticated Chrome session, attempt it in the browser before asking the user to intervene. Keep the attempt bounded (at most two attempts on one tab), verify that the challenge disappeared, and continue from that same tab when successful.\n\n- Slider\u002Fdrag challenges (including CNKI puzzle sliders): estimate the visible travel distance and simulate a gradual drag.\n- ScienceDirect robot checks, managed Turnstile, and reCAPTCHA checkbox stages: try the visible checkbox once.\n- Simple `Continue`, `Verify`, or equivalent visible controls: click once, then re-check the page state.\n\n**User handoff:** Ask the user only after the bounded attempt fails, or immediately when the page requires secret or identity-bearing input such as an image-selection answer, QR approval, SMS\u002FOTP, passkey, hardware key, or two-factor authentication. Keep the challenged tab open and never ask the user to paste credentials or codes into chat.\n\nAvoid unbounded or indiscriminate downloading. Process only the definite paper list confirmed by the user, apply provider-friendly pacing, and leave a clear audit trail of what was downloaded, from where, and whether supporting information was found.\n\nDo not ask the user to paste institutional passwords, database passwords, OTP codes, recovery codes, or session tokens into chat or terminal. If the user offers one of those identity-bearing secrets, decline and use the handoff-login workflow instead. Publisher API keys follow the separate save-on-receipt rule above.\n\nException for saved institutional login pages: if the user explicitly says that the browser has already filled credentials and authorizes clicking the visible login\u002Fconfirm button, the agent may click that button once on the expected institutional SSO \u002F CAS \u002F CARSI \u002F Shibboleth page without reading, copying, or typing any credential. This exception does not apply to CAPTCHA, QR login, SMS\u002FOTP, publisher bot checks, consent\u002Fsecurity warnings, or any page outside the expected institutional login flow.\n\nDo not inspect or export cookies, passwords, local storage, browser profiles, or session files. Use the browser's already-authenticated page context only.\n\n## Preconditions\n\nBefore attempting downloads, confirm the conditions that apply to the selected access branch.\n\nFor the OA-only branch, confirm the target paper identifier\u002Flist, output folder, Node.js 22+, and Python 3 when PDF verification needs it. Do not require a library configuration or institutional browser login.\n\nFor the paid-library branch, confirm these conditions:\n\n1. The browser that holds the user's library\u002Fdatabase login state is open on the user's machine.\n2. The school configuration exists and is valid.\n   - Run `python3 scripts\u002Fconfigure_school.py show`.\n   - If missing, run `python3 scripts\u002Fconfigure_school.py preset \"\u003Cschool name>\"` or guide the user through `src\u002Fwizard.py`.\n3. The user has personally logged in to their institution\u002Flibrary route in that same browser, and can reach the library aggregation service, target database, or discovery entry.\n4. The browser-control path can reuse that same logged-in browser profile.\n   - For Chrome CDP, ask the user to open `chrome:\u002F\u002Finspect\u002F#remote-debugging` and enable remote debugging for the current browser instance.\n   - If CDP attaches to a stale browser, a temporary profile, or a different browser, use a browser-control channel that can reuse the user's active session instead of launching a new profile.\n5. The environment can run Node.js 22+.\n   - Try `node --version`.\n   - If `node` is not on PATH in Codex Desktop, try `%LOCALAPPDATA%\\OpenAI\\Codex\\bin\\node.exe`.\n6. The environment can run Python 3 for configuration and PDF text verification.\n   - Try `python3 --version`.\n   - Install Python helpers with `pip install -r requirements.txt` when needed.\n7. The web-access CDP proxy is available or can be started.\n   - Typical Claude Code path: `%USERPROFILE%\\.claude\\skills\\web-access-main\\scripts\\check-deps.mjs`.\n   - Typical shared agent path: `%USERPROFILE%\\.agents\\skills\\web-access-main\\scripts\\check-deps.mjs`.\n   - In Codex-only setups also check `%USERPROFILE%\\.codex\\skills\\web-access-main\\scripts\\check-deps.mjs`.\n8. The user has approved the target output folder.\n\nIf Claude Code says this skill is not installed, install or copy it to:\n\n```powershell\n$env:USERPROFILE\\.claude\\skills\\nature-downloader\n```\n\nCodex and other agent setups may instead use `.codex\\skills` or `.agents\\skills`; treat the three locations as install targets, not as different skill versions.\n\n## Batch Scope\n\nDefinite DOI\u002Ftitle\u002FPMID lists are supported without a fixed per-batch paper-count recommendation.\n\nOperational safeguards:\n\n- pace requests appropriately for each provider and maintain the manifest throughout the batch\n- attempt visible verification controls first; stop after at most two failed attempts, on institutional login expiry, or when an unusual\u002Fsecurity-sensitive prompt appears\n\nDo not turn a broad keyword search into unlimited automatic downloading. Do not download whole journal issues, volumes, or large result sets.\n\n## Status Categories\n\nClassify every paper into one of these statuses, and keep the status in the manifest:\n\n```text\ndownloaded\ndownloaded_with_si\nopen_access_downloaded\nfull_text_html_available\navailable_not_downloaded\nnative_fulltext_downloaded\nsi_confirmation_required\ncredentials_missing\ncredentials_invalid\napi_not_entitled\napi_fulltext_unavailable\napi_fallback_confirmation_required\noa_not_found\noa_resolution_inconclusive\nmetadata_ambiguous\ncarsi_waiting_user\ncarsi_resolved_retry_needed\npublisher_verification_waiting_user\nsciencedirect_robot_check\nretry_after_user_verification\nverification_auto_passed\nverification_auto_failed\ndo_not_auto_retry\nurl_needs_repair\nlibrary_no_permission\nno_full_text_link\npublisher_blocked_waiting_user\nno_authorized_pdf_found\nfailed_after_retry\n```\n\nUse `verification_auto_passed` when an automatic CAPTCHA\u002Fslider\u002Frobot check was successfully solved by the skill, and the download then proceeded normally.\n\nUse `verification_auto_failed` when auto-verification was attempted but could not pass the challenge. This is a user-handoff status, not a final failure.\n\nUse `carsi_waiting_user` only when the browser is visibly at an institutional SSO \u002F CAS \u002F CARSI-Shibboleth \u002F OpenAthens \u002F database authentication page. Do not treat this as a final failure.\n\nUse `publisher_verification_waiting_user` or `sciencedirect_robot_check` when a publisher page shows a verification challenge but no automatic interaction was possible. When a bounded automatic attempt was made and failed, use `verification_auto_failed` instead. None of these is a final download failure.\n\nUse `open_access_downloaded` when a legitimate open-access route such as PMC, the publisher's OA PDF, arXiv, or another lawful open PDF source provides the downloaded PDF without institutional authorization.\n\nFor a successful API-first download, record `oa_status: not_checked_api_first`; this means OA resolution was intentionally skipped, not that the article is non-OA. Use `api_fallback_confirmation_required` only after a supported publisher API attempt and its automatic OA fallback both fail.\n\nUse `full_text_html_available` when the library\u002Ffull-text resolver grants access to a readable HTML full text but no valid PDF link or `%PDF` response is available. This is a successful full-text access result, not a PDF download. Save the HTML\u002Ftext if the user asked for the article, and explicitly tell the user that the PDF was not available through the current authorized route.\n\nUse `library_no_permission` when the library portal, SFX\u002FOpenURL resolver, database, or publisher page clearly says the user's institution has no full-text entitlement for the paper. Tell the user plainly that the current library resources do not have permission for this article. Do not retry direct publisher access as if it were a temporary network problem.\n\n## Start Browser Control\n\nUse the web-access CDP proxy when it can attach to the same logged-in browser instance the user is using. If the task depends on existing login state and CDP opens a blank\u002Fnew profile, prefer a browser-control channel that reuses the user's active browser session.\n\nOn Windows PowerShell:\n\n```powershell\n$node = \"node\"\nif (-not (Get-Command node -ErrorAction SilentlyContinue)) {\n  $node = \"$env:LOCALAPPDATA\\OpenAI\\Codex\\bin\\node.exe\"\n}\n$checkDepsCandidates = @(\n  \"$env:USERPROFILE\\.claude\\skills\\web-access-main\\scripts\\check-deps.mjs\",\n  \"$env:USERPROFILE\\.agents\\skills\\web-access-main\\scripts\\check-deps.mjs\",\n  \"$env:USERPROFILE\\.codex\\skills\\web-access-main\\scripts\\check-deps.mjs\"\n)\n$checkDeps = $checkDepsCandidates | Where-Object { Test-Path $_ } | Select-Object -First 1\nif (-not $checkDeps) { throw \"web-access-main\u002Fscripts\u002Fcheck-deps.mjs not found\" }\n& $node $checkDeps\n```\n\nThen test:\n\n```powershell\nInvoke-WebRequest -UseBasicParsing -Uri \"http:\u002F\u002F127.0.0.1:3456\u002Ftargets\" -TimeoutSec 10\n```\n\nIf this hangs or fails:\n\n- Ask the user to confirm the remote debugging checkbox.\n- Check `%TEMP%\\cdp-proxy.log`.\n- If targets appear but the database\u002Flibrary page is unauthenticated, suspect a stale CDP endpoint, wrong browser, or fresh browser profile before suspecting missing library permission.\n- Do not attempt to read Chrome session files.\n\n## Fast Batch Path (default for 2+ papers — fast & token-efficient)\n\nFor anything beyond a single paper, run `scripts\u002Fbatch_download.mjs` instead of driving the browser step-by-step. OA and publisher APIs run without CDP; CNKI, Web Access, and requested SI lazily attach to the authenticated browser. Large DOMs and file bytes remain inside the scripts.\n\nThe script reads `~\u002F.config\u002Flit-dl\u002Fschool.json` automatically. When the config contains `discovery.web_of_science_url`, that URL is used as the Web of Science entry; otherwise the script falls back to its compiled default Web of Science URL.\n\n```bash\n# by topic (collects N records from Web of Science Core Collection):\nnode scripts\u002Fbatch_download.mjs --topic \"rice blast resistance gene\" --count 10 --no-si --out \"\u003Cproject>\"\n# by explicit DOIs:\nnode scripts\u002Fbatch_download.mjs --dois \"10.1007\u002Fs00122-021-03957-1,10.1111\u002Fpbi.14066\" --no-si --out \"\u003Cproject>\"\n# by exact open-access title (arXiv fallback, useful for DOI-less papers):\nnode scripts\u002Fbatch_download.mjs --title \"Attention Is All You Need\" --open-access --no-si --out \"\u003Cproject>\"\n# by Chinese exact title (default CNKI route):\nnode scripts\u002Fbatch_download.mjs --title \"乡村振兴背景下数字治理研究\" --no-si --out \"\u003Cproject>\"\n# by Chinese exact title, PDF only:\nnode scripts\u002Fbatch_download.mjs --title \"乡村振兴背景下数字治理研究\" --cnki-format pdf --no-si --out \"\u003Cproject>\"\n# by Chinese exact title with a library-provided CNKI entry:\nnode scripts\u002Fbatch_download.mjs --title \"乡村振兴背景下数字治理研究\" --cnki-url \"https:\u002F\u002Fkns.cnki.net\u002Fkns8s\u002Fdefaultresult\u002Findex\" --no-si --out \"\u003Cproject>\"\n# by known PDF URL:\nnode scripts\u002Fbatch_download.mjs --pdf-url \"https:\u002F\u002Farxiv.org\u002Fpdf\u002F1706.03762\" --title \"Attention Is All You Need\" --no-si --out \"\u003Cproject>\"\n# replace --no-si with --si only after the user explicitly requests SI\n```\n\nOutput includes `{ summary, manifest, results }`. The script writes `\u003Cproject>\u002Fmanifest.json` with route, OA evidence, access mode, format, MIME, bytes, SHA-256, SI choice, and typed failures; secret-looking fields are removed recursively. PDFs go under `PDFs\u002F`, native HTML\u002FXML under `FullText\u002F`, CAJ under `CNKI\u002F`, and supplements under `SupportingInformation\u002F`.\n\n**Token discipline (applies to all paths):** never `eval` a whole page DOM, search result, or PDF\u002FSI bytes back into the agent context. Keep large data inside Node\u002F`scripts\u002F*.mjs` and surface only compact status. Reserve interactive `\u002Feval` + `cdp_open_url.mjs` for the single-paper route below or for diagnosing one stuck paper after the batch run.\n\n## Recommended Web Access Workflow (other publishers and confirmed API-plus-OA fallback)\n\nUse this section only after legitimate OA sources are unavailable: directly for English publishers outside Elsevier\u002FSpringer Nature\u002FIEEE, or after the user explicitly accepts Web Access fallback when both a supported publisher API and the OA fallback failed. Start from Web of Science or the configured library portal and reuse the user's authenticated browser session.\n\nBefore using the library route, check for legitimate open-access availability when the article metadata suggests OA or the user provides an OA\u002Fopen journal paper. Use PMC, publisher OA links, arXiv, DOI landing pages with clear open PDF access, or a known lawful PDF URL. If an OA PDF is available, download and verify it directly, mark `open_access_downloaded`, and record the OA source in the manifest. Do not require institutional login for an article that is already openly available.\n\nImportant distinction: `--topic` is a Web of Science topic search, not an exact-title resolver. For a known exact title, especially conference\u002FarXiv papers without DOI, prefer `--title \"\u003Cexact title>\" --open-access` or `--pdf-url` when the legitimate PDF URL is known. In testing, `--topic \"Attention Is All You Need\"` matched an unrelated HBR article first, while `--title \"Attention Is All You Need\" --open-access` correctly downloaded arXiv `1706.03762v7`.\n\nWeb of Science hosts to recognize: `webofscience.clarivate.cn`, `www.webofscience.com`, `*.webofknowledge.com`, `*.clarivate.com`. Note: WoS renders records inside **shadow DOM with a virtualized list** — when scraping manually you must pierce shadow roots and scroll to load more rows (the batch script already does this).\n\n1. **Authenticate once**: open Web of Science via the library aggregation \u002F institutional entry. If Web of Science or another database shows authentication choices such as institutional login, Shibboleth\u002FOpenAthens\u002FCARSI, CAS\u002FSSO, or IP login, use the route the user normally uses. If credentials, QR, CAPTCHA, SMS\u002FOTP, or unclear consent appears, follow **Institutional Authentication Handoff** below.\n2. Confirm you are on the authenticated Web of Science search page (institutional name visible, search box present).\n3. Search the paper by **DOI** when available, otherwise by **exact title**:\n   - Set the search field to `DOI` or `Title`, paste the value, run the search.\n   - Read the results page with `\u002Feval` and pick the record that matches title + year + authors.\n4. Open the matching record and read it with `\u002Feval`.\n5. Click the full-text route, in this order of preference:\n   - `Free Full Text` \u002F `Open Access` if present\n   - library resolver links: `Find it at`, `SFX`, `OpenURL`, `Full Text Links`, `查看全文`, `Full Text available via`, database\u002Fprovider names such as Ovid\n   - publisher full-text link: `View Full Text`, the publisher name, or `View PDF`\n   - The full-text link should inherit the institutional session, so the publisher often grants access without a second login. If a second institutional handoff appears, complete it once.\n6. On the publisher page, find the PDF link (`PDF`, `View PDF`, `Download PDF`, `pdfft`, `\u002Fdoi\u002Fpdf\u002F`) and save it with `scripts\u002Fbrowser_pdf_downloader.mjs`.\n7. If the full-text resolver opens readable HTML full text but no valid PDF is exposed, save the HTML\u002Ftext, mark `full_text_html_available`, and tell the user plainly: \"已获取 HTML 全文，但当前授权路径没有可下载 PDF.\" Do not mislabel an HTML page as a PDF; if a PDF probe returns HTML, move it to diagnostics and explain that no valid PDF was downloaded.\n8. If the resolver\u002Fprovider explicitly says the institution has no entitlement, mark `library_no_permission` and tell the user: \"当前图书馆资源没有该文献全文权限.\" Do not hide this behind `failed_after_retry`.\n9. **Do not download Supporting Information by default.** Only fetch SI if the user explicitly asked; otherwise just note whether SI exists (see Supporting Information below).\n10. Record the route taken (OA source or WoS → SFX\u002FOpenURL\u002Ffull-text provider → publisher\u002Fdatabase) in the manifest.\n\nIf Web of Science returns no record, or the record has no accessible full-text link, mark the paper `no_full_text_link` and tell the user. If the library route is found but denies entitlement, mark `library_no_permission`. Do not silently fall back to direct publisher navigation as if it were the same authorized route.\n\n## Publisher Verification and ScienceDirect\n\nScienceDirect and some publisher platforms may show \"Are you a robot?\", CAPTCHA, Cloudflare, bot verification, or similar checks after repeated direct DOI navigation or automated tab opening. These pages are security and anti-automation challenges, not ordinary login confirmations.\n\nReduce the chance of triggering them by using a conservative access pattern:\n\n1. Prefer the library aggregation \u002F CARSI entry before direct `doi.org -> publisher` navigation.\n2. Process ScienceDirect and other sensitive publishers one article at a time.\n3. Keep a visible audit trail in the manifest; do not open many publisher tabs in parallel.\n4. Wait for each page to settle before looking for `Download PDF`, `View PDF`, or `PDF`.\n5. Reuse the same tab after the user completes a verification step instead of opening repeated new tabs.\n6. Avoid retry loops. Use one attempt by default and no more than two attempts on the same tab before handing the page to the user.\n\nWhen a publisher verification page appears:\n\n1. First, **attempt automatic verification** via the built-in anti-bot module (`scripts\u002Flib\u002Fanti-bot.mjs`). The module tries: simple click challenges, ScienceDirect robot check, Cloudflare Turnstile, slider CAPTCHA (including CNKI Geetest-style), and reCAPTCHA checkbox.\n2. If auto-verification succeeds, continue the download from the resolved page.\n3. If auto-verification fails:\n   a. Stop automated actions on that tab.\n   b. Record the paper with status `verification_auto_failed`. Use `sciencedirect_robot_check` only when no automatic interaction was possible.\n   c. Tell the user which paper and tab need manual attention.\n   d. After the user says the verification is complete, continue from the same tab and try the visible article\u002FPDF route once.\n   e. If verification immediately reappears, mark `do_not_auto_retry` and move on.\n\nCreate or update `publisher_verification.tsv` when publisher checks interrupt a batch. Use this header:\n\n```text\nid\tproject\ttitle\tdoi\tyear\tvenue\tpublisher\tstatus\tsource_url\tcurrent_url\tnext_action\tnotes\n```\n\nSuggested `next_action` values:\n\n```text\nuser_complete_publisher_verification\nretry_same_tab_after_user_confirms\ntry_aggregation_entry_route\ntry_authorized_oa_route\nmark_do_not_auto_retry\n```\n\n## Institutional Authentication Handoff and Retry\n\nPublishers and databases routed through CAS\u002FSSO, CARSI\u002FShibboleth, OpenAthens, EZproxy, WebVPN, or IP authorization may redirect to an institutional login or database login page for the first authenticated access. This is expected and is not a reason to ask for the user's password.\n\nWhen a page reaches an institutional login page, federation\u002FWAYF selector, database login page, or IP-login prompt:\n\n1. Stop automated actions on that tab.\n2. Record the paper in `carsi_retry.tsv` with status `carsi_waiting_user`.\n3. Tell the user exactly which tab\u002Fpage needs attention, for example: \"This page is at your institution\u002Fdatabase login. If the browser has already filled credentials, I can click the visible login\u002Fconfirm button once with your authorization; otherwise please complete it in the browser.\" If a federation\u002FWAYF page asks which institution to use, ask the user to pick their institution, or do it only when the choice is unambiguous and credential-free and the user authorized it.\n4. Do not read, store, or request the password, QR result, OTP, SMS code, CAPTCHA, cookie, or local\u002Fsession storage.\n5. If the user explicitly authorizes clicking because credentials are already filled, click only the visible login\u002Fconfirm\u002Fcontinue button once. Do not type into fields or inspect hidden credential values. For credential-free options such as \"IP login\", click only when the user authorizes that route or has just completed it manually.\n6. If QR login, SMS\u002FOTP, CAPTCHA, Cloudflare, or publisher bot verification appears, stop and let the user complete it manually.\n7. After the login\u002Fconfirm step completes, refresh or continue from the same tab.\n8. Re-detect whether the page is now a publisher article page, a PDF viewer, or another institutional handoff.\n9. If resolved, download and verify the PDF\u002FSI, then update the manifest status to `downloaded` or `downloaded_with_si`.\n10. If it loops back to the same institutional\u002Fdatabase login after a completed user login, record `failed_after_retry` with the observed reason and move on.\n\n### Safe Institutional Auto-Confirm\n\nThe agent may click a saved-login confirmation button only when all conditions are true:\n\n```text\n1. The page is on an expected institutional, library, federation, or database domain for the user's configured route.\n2. The user has explicitly authorized this action in the current conversation, for example: \"可以点这个机构登录确认按钮\".\n3. The visible action is clearly a login\u002Fconfirm\u002Fcontinue button, such as 登录, 登 录, 确认登录, 继续登录, Continue, Proceed, or Sign in.\n4. There is no visible QR-only login, SMS\u002FOTP field, push-approval prompt, password reset prompt, consent-to-share-new-data prompt, or account\u002Fsecurity warning. (Slider CAPTCHAs and simple robot checks are now auto-attemptable — see Boundaries.)\n5. The agent does not read, reveal, copy, store, type, or modify credentials.\n```\n\nA federation\u002FWAYF\u002F机构选择 page carries no credentials and may be selected when the institution is unambiguous and the user has authorized it. If any condition is unclear, pause and ask the user to handle that tab. Do not repeatedly click login; one click is enough to test whether the saved-login state works.\n\nCreate or update `carsi_retry.tsv` whenever institutional authentication blocks a batch. Use this header:\n\n```text\nid\tproject\ttitle\tdoi\tyear\tvenue\tpublisher\tfailure_stage\tstatus\tsource_url\tcurrent_url\tnext_action\tnotes\n```\n\nSuggested `next_action` values:\n\n```text\nuser_complete_institution_login_in_chrome\nselect_institution_in_federation_wayf\nretry_same_tab_after_user_confirms\nrepair_url_by_doi\ntry_aggregation_entry_route\nmark_no_authorized_pdf\n```\n\nFor a CARSI retry batch, process one or a few tabs at a time. Do not open many login tabs in parallel; it can confuse the user's session and increase publisher or SSO risk.\n\n## Download PDF From Browser Context\n\nUse the bundled script when a PDF URL opens in Chrome but direct shell download returns `403`, `401`, Cloudflare HTML, or a login page.\n\n```powershell\n$node = \"$env:LOCALAPPDATA\\OpenAI\\Codex\\bin\\node.exe\"\n& $node \"$env:USERPROFILE\\.agents\\skills\\nature-downloader\\scripts\\browser_pdf_downloader.mjs\" `\n  --url \"https:\u002F\u002Fwww.sciencedirect.com\u002Fscience\u002Farticle\u002Fpii\u002FSXXXXXXXXXXXXXXXX\u002Fpdfft\" `\n  --out \"D:\\path\\paper.pdf\"\n```\n\nThe script:\n\n- Opens the URL in the user's controlled Chrome session unless `--target` is provided.\n- Runs `fetch(location.href, { credentials: \"include\" })` inside the page.\n- Transfers bytes in chunks through the local CDP proxy.\n- Writes the binary file to disk.\n- Verifies the `%PDF` signature by default.\n\nUseful options:\n\n```text\n--url \u003Curl>          PDF URL to open and save\n--target \u003CtargetId>  Existing Chrome target\u002Ftab id to use\n--out \u003Cpath>         Output PDF path\n--proxy \u003Curl>        CDP proxy URL, default http:\u002F\u002F127.0.0.1:3456\n--close              Close the tab after download if the script opened it\n--allow-non-pdf      Save even when content does not start with %PDF\n```\n\n## Supporting Information\n\n**Always confirm SI before file download.** Fetch SI only when the user explicitly chooses it (e.g. \"连补充材料一起下\", \"include SI\", \"download supplementary\", \"把补充材料也下了\"). When the user chooses no, pass `--no-si` and do not perform extra attachment navigation.\n\nWhen the user does ask for supporting information, use this method:\n\n1. Open the article landing page, not only the PDF page.\n2. Extract all links with text or href matching:\n   - `Supporting Information`\n   - `Supplementary`\n   - `Supplemental`\n   - `\u002Fdoi\u002Fsuppl\u002F`\n   - `\u002Fsuppl_file\u002F`\n   - `_si_`\n   - `mmc1`, `mmc2` (Elsevier\u002FScienceDirect supplement pattern)\n3. Download every PDF\u002FDOCX\u002FXLSX\u002Fvideo\u002Fdata file that is clearly a legitimate supplement, using the browser context if needed.\n\nFor the WoS batch route, an explicit SI request maps to `--si`. When an exact title is known, pass it as both `--topic` and `--title` with `--count 1`. WoS + `--si` must:\n\n- keep each paper in its own readable-title folder;\n- place only the verified main PDF and clearly labelled SI files in that folder;\n- preserve original attachment names when available;\n- follow a supplementary landing page at most one level deep;\n- exclude external repository links such as GitHub, Zenodo, Figshare, Dryad, and OSF;\n- keep the main PDF and report `si.status = not_found` when no SI exists;\n- report `partial` when some SI files fail without treating the main PDF as failed.\n\nDo not apply the clean per-article folder behavior to CNKI, `--open-access`, bare `--pdf-url`, or direct `--dois` routes.\n\nACS fallback pattern, only after verifying the DOI and article page:\n\n```text\nhttps:\u002F\u002Fpubs.acs.org\u002Fdoi\u002Fsuppl\u002F\u003CDOI>\u002Fsuppl_file\u002F\u003Cjournal-code>_si_001.pdf\n```\n\nDo not invent supplement URLs as facts. If a guessed URL returns 404, record \"not found\" and inspect the article page.\n\n## Verification and Reading\n\nAfter downloading, verify every file.\n\nFor PDFs:\n\n```powershell\n$env:PYTHONUTF8='1'\npython -X utf8 \"$env:USERPROFILE\\.claude\\skills\\nature-downloader\\scripts\\extract_pdf_text.py\" `\n  --pdf \"D:\\path\\paper.pdf\" `\n  --pages 3\n```\n\nThis should report page count and extracted text. The script also reconfigures stdout\u002Fstderr to UTF-8 internally to reduce Windows GBK failures. If extraction fails but the PDF is valid, try PyMuPDF, OCR, or the local `pdf` skill.\n\nMinimum verification checklist:\n\n- File exists and size is plausible.\n- First bytes are `%PDF` for PDF files.\n- Page count is nonzero.\n- Extracted text includes the article title, abstract, or supporting information title.\n- For HTML full text, saved HTML\u002Ftext includes the article title or DOI, and the user-facing reply states that no valid PDF was available.\n- Save a small manifest with DOI, title, source URL, download date, and supplement status when doing more than one paper.\n\n## Zotero\n\nZotero import is useful for metadata, DOI, citation keys, and library organization, but it does not replace local PDF verification. If Zotero imports a paper, still check whether the PDF attachment is present and readable. If the user wants a project folder with full text, save PDFs explicitly to that folder.\n\n## Naming Convention\n\nUse readable filenames:\n\n```text\nFirstAuthor_Year_Journal_short-title.pdf\nFirstAuthor_Year_Journal_short-title_SI.pdf\n```\n\nFor project work, keep a folder like:\n\n```text\n文献自动下载\u002F\n  manifest.tsv\n  PDFs\u002F\n  SupportingInformation\u002F\n  extracted_text\u002F\n```\n\n## Failure Handling\n\nIf direct publisher navigation triggers ScienceDirect \"Are you a robot?\", Cloudflare, CAPTCHA, or another bot challenge:\n\n- First, attempt automatic verification via `scripts\u002Flib\u002Fanti-bot.mjs`.\n- If auto-verification succeeds, continue the download normally.\n- If auto-verification fails, record `verification_auto_failed` or `sciencedirect_robot_check`.\n- Ask the user to solve it in Chrome.\n- Then continue once from the same now-open page.\n- If the same challenge immediately reappears, mark `do_not_auto_retry` and move on.\n\nIf shell `Invoke-WebRequest` or `curl` returns 403 but the PDF opens in Chrome:\n\n- Use `browser_pdf_downloader.mjs`; this is the normal institutional-access case.\n\nIf a page shows publisher bot verification, CAPTCHA, Cloudflare, QR login, SMS\u002FOTP, or another security challenge:\n\n- Do not ask for or accept institutional credentials in chat. Publisher API keys follow the separate save-on-receipt rule.\n- Pause and ask the user to complete the verification in Chrome.\n- Record `publisher_verification_waiting_user` in `publisher_verification.tsv`, or `sciencedirect_robot_check` for ScienceDirect.\n- Continue only after the user says the browser step is complete.\n\nIf a page shows institutional SSO, CAS, CARSI\u002FShibboleth, OpenAthens, SAML, federation\u002FWAYF\u002F机构选择, database login, or IP-login options:\n\n- Do not ask for or accept institutional credentials in chat. Publisher API keys follow the separate save-on-receipt rule.\n- If the user has explicitly authorized it and the browser has already filled credentials, click the visible login\u002Fconfirm button once.\n- Otherwise pause and ask the user to complete the login in the browser.\n- Record `carsi_waiting_user` or `carsi_resolved_retry_needed` in `carsi_retry.tsv` as appropriate.\n\nIf the aggregation entry shows no full-text link:\n\n- Try the publisher's own `Institutional login` \u002F `机构登录` \u002F CARSI\u002FShibboleth\u002FOpenAthens route and select the user's institution when authorized.\n- Try the DOI on the publisher page once an institutional session exists.\n- Check open-access copies only from legitimate sources.\n- Record `no_authorized_pdf_found` rather than seeking unauthorized mirrors.\n\nIf a page opens as `about:blank`:\n\n- Treat it as a URL-fragment\u002Fencoding problem first, especially when the original URL contains `#` or `#!`.\n- Reopen through `scripts\u002Fcdp_open_url.mjs --url \"\u003Cfull URL>\" --wait`.\n- Do not paste fragment-heavy URLs unquoted into shell commands or manually concatenate them into `\u002Fnew?url=...` without URL encoding.\n\nIf `curl` is unavailable:\n\n- Use PowerShell `Invoke-WebRequest` for simple proxy checks.\n- Prefer the bundled Node.js helper scripts for CDP proxy actions because Node's `URLSearchParams` preserves nested URL fragments correctly.\n\nIf the session expires:\n\n- Ask the user to re-authenticate through their institution\u002Flibrary route in the same browser, then reopen the publisher\u002Fdatabase entry.\n\n## To Confirm With The User (first run)\n\nThese items depend on the user's live institution\u002Flibrary session and should be confirmed once per deployment or institution profile:\n\n1. The exact institutional login, federation, proxy, WebVPN, or database hosts that appear in the address bar.\n2. The base URL \u002F link pattern of the library aggregation or database entries the user actually uses.\n3. Whether a federation\u002FWAYF\u002F机构选择, IP-login, or database-login step appears, and whether the user authorizes selecting the unambiguous institution\u002Flogin option.\n","# Nature Literature Downloader\n\nThis skill routes literature through lawful open-access, publisher-API, CNKI institutional, and browser-based institutional providers. `scripts\u002Fbatch_download.mjs` is the orchestration entry point; school configuration, publisher credentials, metadata\u002FOA resolution, provider downloads, content validation, and manifests are separate modules.\n\nVerified 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.\n\n> **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 `--si` or `--no-si`. Without either flag the script returns `si_confirmation_required` and does not create the output directory.\n\n> **Main workflow.** Normalize the DOI\u002Ftitle 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.\n\n```text\n规范化 DOI\u002F题名并识别语言、出版商\n├─ 中文文献：直接走 CNKI\n└─ 英文文献\n   ├─ Elsevier \u002F Springer Nature \u002F IEEE，且已配置有效 Key\n   │  ├─ 优先通过出版商 API 下载\n   │  ├─ API 下载成功：结束，不强制判断 OA\n   │  └─ API 下载失败：检查文章级 OA，再走 PMC \u002F Unpaywall \u002F 合法仓储\n   └─ 其他出版商\n      ├─ 检查文章级 OA\n      └─ OA 不可用：走 Web Access 机构授权\n```\n\n> **Chinese literature is CNKI-only.** A Chinese title, `zh` metadata language, explicit CNKI source URL, or `--route cnki` must use CNKI even if another OA copy appears to exist. Reuse the user's current Chrome library\u002FCNKI login state and prefer configured `discovery.cnki_url`. Never export cookies or collect the institutional password.\n\n> **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. Return `api_fallback_confirmation_required` and 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.\n\n> **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.\n\n> **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 or `%PDF` response and report `no_authorized_pdf_found` \u002F `pdf_fetch_failed` when none exists. Do not save CAJ, HTML, or a login page as if it were a PDF.\n\n## Download Intake and First-Run Configuration\n\nFor every download request, first establish the paper list and ask:\n\n```text\n是否同时下载这些文献的 Supporting Information（SI，补充材料）？\n```\n\nDo 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.\n\n### Paid Library Resource Configuration\n\nAsk for the library resource URL the user actually uses:\n\n```text\n请发你平时进入图书馆电子资源\u002F数据库的平台链接。\n可以是资源门户、数据库列表、Web of Science 入口、某个数据库详情页，\n或跳转到统一身份认证的登录链接。\n```\n\nThen infer the authorization route from the URL before saving config:\n\n```bash\npython3 scripts\u002Fconfigure_school.py infer \"https:\u002F\u002Fexample.edu\u002Flibrary\u002Fresources\"\npython3 scripts\u002Fconfigure_school.py url \"https:\u002F\u002Fexample.edu\u002Flibrary\u002Fresources\"\npython3 scripts\u002Fconfigure_school.py show\npython3 scripts\u002Fconfigure_school.py health --force\n```\n\nThe distributed skill contains no school presets. If the user cannot provide a resource URL, ask them to locate their institution's library\u002Fdatabase entry instead of guessing a school-specific domain.\n\nThe default config path is:\n\n```text\n~\u002F.config\u002Flit-dl\u002Fschool.json\n```\n\nFor tests or isolated profiles, set:\n\n```bash\nLIT_DL_CONFIG_DIR=\u002Fpath\u002Fto\u002Fconfigdir\n```\n\nThe downloader reads this config automatically. If `discovery.web_of_science_url` is present, `scripts\u002Fbatch_download.mjs` uses it as the Web of Science entry; otherwise it falls back to `https:\u002F\u002Fwww.webofscience.com\u002Fwos\u002Fwoscc\u002Fbasic-search`.\n\nFor Chinese literature, the downloader also reads `discovery.cnki_url` when present. If absent, `scripts\u002Fbatch_download.mjs --title \"\u003C中文题名>\"` falls back to `https:\u002F\u002Fkns.cnki.net\u002Fkns8s\u002Fdefaultresult\u002Findex`.\n\n### API-First and Open-Access Fallback\n\nFor an English article, identify its publisher before deciding when to resolve article-level OA:\n\n1. Collect a DOI, PMID, exact title, article URL, or a definite paper list, then normalize its metadata and publisher.\n2. 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_api` and `oa_status: not_checked_api_first`; do not run OA resolution only to label the article.\n3. 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.\n4. For all other English publishers, search those legitimate OA sources before Web Access.\n5. For an exact title or an explicit OA-only request, prefer:\n\n   ```bash\n   node scripts\u002Fbatch_download.mjs --title \"\u003Cexact title>\" --open-access --no-si --out \"\u003Cproject>\"\n   ```\n\n   Use `--pdf-url` when the user supplies a known legitimate OA PDF URL.\n6. Verify the downloaded file and record the source. Mark a successful PDF as `open_access_downloaded`.\n7. 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_access` was explicitly requested, stop after the OA result.\n\n### Publisher API Credentials\n\nConfigure credentials lazily, only when the route first needs them:\n\n```bash\npython3 scripts\u002Fconfigure_credentials.py set elsevier\npython3 scripts\u002Fconfigure_credentials.py set springer_nature\npython3 scripts\u002Fconfigure_credentials.py set ieee --fulltext-endpoint 'https:\u002F\u002Fissued-endpoint.example\u002Farticles\u002F{doi}'\npython3 scripts\u002Fconfigure_credentials.py set elsevier --stdin\npython3 scripts\u002Fconfigure_credentials.py show\npython3 scripts\u002Fconfigure_credentials.py validate \u003Cprovider>\npython3 scripts\u002Fconfigure_credentials.py delete \u003Cprovider>\npython3 scripts\u002Fconfigure_credentials.py contact-email researcher@example.org\n```\n\nGive the user the official registration link: Elsevier `https:\u002F\u002Fdev.elsevier.com\u002F`, Springer Nature `https:\u002F\u002Fdev.springernature.com\u002Fdocs\u002Fquick-start\u002Fapi-access\u002F`, or IEEE `https:\u002F\u002Fdeveloper.ieee.org\u002Fmember\u002Fregister`.\n\nDo 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 \u003Cprovider> --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\u002Ftemplate before treating IEEE as downloadable through the API. Secrets are stored in `~\u002F.config\u002Flit-dl\u002Fcredentials.json` with mode `0600`.\n\n## Resource URL Triage\n\nClassify the user-provided URL before choosing an access path:\n\n```text\ncas.* \u002F \u002Fauthserver\u002Flogin        CAS \u002F SSO login page; inspect service= callback, then return to the service portal\nidp\u002Fshibboleth \u002F carsi           CARSI \u002F Shibboleth institutional route\nezproxy \u002F libproxy               EZproxy remote-access proxy\nwebvpn \u002F vpn                     WebVPN route\nmetaersp \u002F metaauth \u002F uas        Library resource aggregation portal\nwebofscience \u002F sciencedirect     Database or publisher entry; check whether it was reached through a portal\n```\n\nIf 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:\u002F\u002Flogin.university.example\u002Fauthserver\u002Flogin?service=https:\u002F\u002Fresources.university.example\u002Fcallback` means the identity service returns to the user's resource portal after authentication.\n\n## Institution-Specific Domains\n\nConfirm against what actually appears in the user's address bar; correct these for each institution instead of assuming a preset is complete.\n\n```text\nLibrary home \u002F aggregation:  library.example.edu, resources.example.edu\nDiscovery\u002Fdatabase entry:    webofscience.com, clarivate.com, cnki.net, sciencedirect.com, provider.example.com\nUnified identity \u002F SSO:      sso.example.edu, cas.example.edu, idp.example.edu\nFederation \u002F WAYF:           ds.carsi.edu.cn, wayf.example.org, shibboleth\u002Fopenathens hosts\nProxy \u002F WebVPN:              ezproxy.example.edu, webvpn.example.edu\n```\n\nTreat configured institutional login, federation, proxy, and database-login hosts as sign-in stages. Do not treat reaching them as a final failure.\n\n## Boundaries\n\nUse only the user's legitimate institutional access. Do not bypass paywalls, DRM, or two-factor authentication.\n\n**Verification-first rule:** When a visible slider, checkbox, robot check, or simple verification control appears in the user's authenticated Chrome session, attempt it in the browser before asking the user to intervene. Keep the attempt bounded (at most two attempts on one tab), verify that the challenge disappeared, and continue from that same tab when successful.\n\n- Slider\u002Fdrag challenges (including CNKI puzzle sliders): estimate the visible travel distance and simulate a gradual drag.\n- ScienceDirect robot checks, managed Turnstile, and reCAPTCHA checkbox stages: try the visible checkbox once.\n- Simple `Continue`, `Verify`, or equivalent visible controls: click once, then re-check the page state.\n\n**User handoff:** Ask the user only after the bounded attempt fails, or immediately when the page requires secret or identity-bearing input such as an image-selection answer, QR approval, SMS\u002FOTP, passkey, hardware key, or two-factor authentication. Keep the challenged tab open and never ask the user to paste credentials or codes into chat.\n\nAvoid unbounded or indiscriminate downloading. Process only the definite paper list confirmed by the user, apply provider-friendly pacing, and leave a clear audit trail of what was downloaded, from where, and whether supporting information was found.\n\nDo not ask the user to paste institutional passwords, database passwords, OTP codes, recovery codes, or session tokens into chat or terminal. If the user offers one of those identity-bearing secrets, decline and use the handoff-login workflow instead. Publisher API keys follow the separate save-on-receipt rule above.\n\nException for saved institutional login pages: if the user explicitly says that the browser has already filled credentials and authorizes clicking the visible login\u002Fconfirm button, the agent may click that button once on the expected institutional SSO \u002F CAS \u002F CARSI \u002F Shibboleth page without reading, copying, or typing any credential. This exception does not apply to CAPTCHA, QR login, SMS\u002FOTP, publisher bot checks, consent\u002Fsecurity warnings, or any page outside the expected institutional login flow.\n\nDo not inspect or export cookies, passwords, local storage, browser profiles, or session files. Use the browser's already-authenticated page context only.\n\n## Preconditions\n\nBefore attempting downloads, confirm the conditions that apply to the selected access branch.\n\nFor the OA-only branch, confirm the target paper identifier\u002Flist, output folder, Node.js 22+, and Python 3 when PDF verification needs it. Do not require a library configuration or institutional browser login.\n\nFor the paid-library branch, confirm these conditions:\n\n1. The browser that holds the user's library\u002Fdatabase login state is open on the user's machine.\n2. The school configuration exists and is valid.\n   - Run `python3 scripts\u002Fconfigure_school.py show`.\n   - If missing, run `python3 scripts\u002Fconfigure_school.py preset \"\u003Cschool name>\"` or guide the user through `src\u002Fwizard.py`.\n3. The user has personally logged in to their institution\u002Flibrary route in that same browser, and can reach the library aggregation service, target database, or discovery entry.\n4. The browser-control path can reuse that same logged-in browser profile.\n   - For Chrome CDP, ask the user to open `chrome:\u002F\u002Finspect\u002F#remote-debugging` and enable remote debugging for the current browser instance.\n   - If CDP attaches to a stale browser, a temporary profile, or a different browser, use a browser-control channel that can reuse the user's active session instead of launching a new profile.\n5. The environment can run Node.js 22+.\n   - Try `node --version`.\n   - If `node` is not on PATH in Codex Desktop, try `%LOCALAPPDATA%\\OpenAI\\Codex\\bin\\node.exe`.\n6. The environment can run Python 3 for configuration and PDF text verification.\n   - Try `python3 --version`.\n   - Install Python helpers with `pip install -r requirements.txt` when needed.\n7. The web-access CDP proxy is available or can be started.\n   - Typical Claude Code path: `%USERPROFILE%\\.claude\\skills\\web-access-main\\scripts\\check-deps.mjs`.\n   - Typical shared agent path: `%USERPROFILE%\\.agents\\skills\\web-access-main\\scripts\\check-deps.mjs`.\n   - In Codex-only setups also check `%USERPROFILE%\\.codex\\skills\\web-access-main\\scripts\\check-deps.mjs`.\n8. The user has approved the target output folder.\n\nIf Claude Code says this skill is not installed, install or copy it to:\n\n```powershell\n$env:USERPROFILE\\.claude\\skills\\nature-downloader\n```\n\nCodex and other agent setups may instead use `.codex\\skills` or `.agents\\skills`; treat the three locations as install targets, not as different skill versions.\n\n## Batch Scope\n\nDefinite DOI\u002Ftitle\u002FPMID lists are supported without a fixed per-batch paper-count recommendation.\n\nOperational safeguards:\n\n- pace requests appropriately for each provider and maintain the manifest throughout the batch\n- attempt visible verification controls first; stop after at most two failed attempts, on institutional login expiry, or when an unusual\u002Fsecurity-sensitive prompt appears\n\nDo not turn a broad keyword search into unlimited automatic downloading. Do not download whole journal issues, volumes, or large result sets.\n\n## Status Categories\n\nClassify every paper into one of these statuses, and keep the status in the manifest:\n\n```text\ndownloaded\ndownloaded_with_si\nopen_access_downloaded\nfull_text_html_available\navailable_not_downloaded\nnative_fulltext_downloaded\nsi_confirmation_required\ncredentials_missing\ncredentials_invalid\napi_not_entitled\napi_fulltext_unavailable\napi_fallback_confirmation_required\noa_not_found\noa_resolution_inconclusive\nmetadata_ambiguous\ncarsi_waiting_user\ncarsi_resolved_retry_needed\npublisher_verification_waiting_user\nsciencedirect_robot_check\nretry_after_user_verification\nverification_auto_passed\nverification_auto_failed\ndo_not_auto_retry\nurl_needs_repair\nlibrary_no_permission\nno_full_text_link\npublisher_blocked_waiting_user\nno_authorized_pdf_found\nfailed_after_retry\n```\n\nUse `verification_auto_passed` when an automatic CAPTCHA\u002Fslider\u002Frobot check was successfully solved by the skill, and the download then proceeded normally.\n\nUse `verification_auto_failed` when auto-verification was attempted but could not pass the challenge. This is a user-handoff status, not a final failure.\n\nUse `carsi_waiting_user` only when the browser is visibly at an institutional SSO \u002F CAS \u002F CARSI-Shibboleth \u002F OpenAthens \u002F database authentication page. Do not treat this as a final failure.\n\nUse `publisher_verification_waiting_user` or `sciencedirect_robot_check` when a publisher page shows a verification challenge but no automatic interaction was possible. When a bounded automatic attempt was made and failed, use `verification_auto_failed` instead. None of these is a final download failure.\n\nUse `open_access_downloaded` when a legitimate open-access route such as PMC, the publisher's OA PDF, arXiv, or another lawful open PDF source provides the downloaded PDF without institutional authorization.\n\nFor a successful API-first download, record `oa_status: not_checked_api_first`; this means OA resolution was intentionally skipped, not that the article is non-OA. Use `api_fallback_confirmation_required` only after a supported publisher API attempt and its automatic OA fallback both fail.\n\nUse `full_text_html_available` when the library\u002Ffull-text resolver grants access to a readable HTML full text but no valid PDF link or `%PDF` response is available. This is a successful full-text access result, not a PDF download. Save the HTML\u002Ftext if the user asked for the article, and explicitly tell the user that the PDF was not available through the current authorized route.\n\nUse `library_no_permission` when the library portal, SFX\u002FOpenURL resolver, database, or publisher page clearly says the user's institution has no full-text entitlement for the paper. Tell the user plainly that the current library resources do not have permission for this article. Do not retry direct publisher access as if it were a temporary network problem.\n\n## Start Browser Control\n\nUse the web-access CDP proxy when it can attach to the same logged-in browser instance the user is using. If the task depends on existing login state and CDP opens a blank\u002Fnew profile, prefer a browser-control channel that reuses the user's active browser session.\n\nOn Windows PowerShell:\n\n```powershell\n$node = \"node\"\nif (-not (Get-Command node -ErrorAction SilentlyContinue)) {\n  $node = \"$env:LOCALAPPDATA\\OpenAI\\Codex\\bin\\node.exe\"\n}\n$checkDepsCandidates = @(\n  \"$env:USERPROFILE\\.claude\\skills\\web-access-main\\scripts\\check-deps.mjs\",\n  \"$env:USERPROFILE\\.agents\\skills\\web-access-main\\scripts\\check-deps.mjs\",\n  \"$env:USERPROFILE\\.codex\\skills\\web-access-main\\scripts\\check-deps.mjs\"\n)\n$checkDeps = $checkDepsCandidates | Where-Object { Test-Path $_ } | Select-Object -First 1\nif (-not $checkDeps) { throw \"web-access-main\u002Fscripts\u002Fcheck-deps.mjs not found\" }\n& $node $checkDeps\n```\n\nThen test:\n\n```powershell\nInvoke-WebRequest -UseBasicParsing -Uri \"http:\u002F\u002F127.0.0.1:3456\u002Ftargets\" -TimeoutSec 10\n```\n\nIf this hangs or fails:\n\n- Ask the user to confirm the remote debugging checkbox.\n- Check `%TEMP%\\cdp-proxy.log`.\n- If targets appear but the database\u002Flibrary page is unauthenticated, suspect a stale CDP endpoint, wrong browser, or fresh browser profile before suspecting missing library permission.\n- Do not attempt to read Chrome session files.\n\n## Fast Batch Path (default for 2+ papers — fast & token-efficient)\n\nFor anything beyond a single paper, run `scripts\u002Fbatch_download.mjs` instead of driving the browser step-by-step. OA and publisher APIs run without CDP; CNKI, Web Access, and requested SI lazily attach to the authenticated browser. Large DOMs and file bytes remain inside the scripts.\n\nThe script reads `~\u002F.config\u002Flit-dl\u002Fschool.json` automatically. When the config contains `discovery.web_of_science_url`, that URL is used as the Web of Science entry; otherwise the script falls back to its compiled default Web of Science URL.\n\n```bash\n# by topic (collects N records from Web of Science Core Collection):\nnode scripts\u002Fbatch_download.mjs --topic \"rice blast resistance gene\" --count 10 --no-si --out \"\u003Cproject>\"\n# by explicit DOIs:\nnode scripts\u002Fbatch_download.mjs --dois \"10.1007\u002Fs00122-021-03957-1,10.1111\u002Fpbi.14066\" --no-si --out \"\u003Cproject>\"\n# by exact open-access title (arXiv fallback, useful for DOI-less papers):\nnode scripts\u002Fbatch_download.mjs --title \"Attention Is All You Need\" --open-access --no-si --out \"\u003Cproject>\"\n# by Chinese exact title (default CNKI route):\nnode scripts\u002Fbatch_download.mjs --title \"乡村振兴背景下数字治理研究\" --no-si --out \"\u003Cproject>\"\n# by Chinese exact title, PDF only:\nnode scripts\u002Fbatch_download.mjs --title \"乡村振兴背景下数字治理研究\" --cnki-format pdf --no-si --out \"\u003Cproject>\"\n# by Chinese exact title with a library-provided CNKI entry:\nnode scripts\u002Fbatch_download.mjs --title \"乡村振兴背景下数字治理研究\" --cnki-url \"https:\u002F\u002Fkns.cnki.net\u002Fkns8s\u002Fdefaultresult\u002Findex\" --no-si --out \"\u003Cproject>\"\n# by known PDF URL:\nnode scripts\u002Fbatch_download.mjs --pdf-url \"https:\u002F\u002Farxiv.org\u002Fpdf\u002F1706.03762\" --title \"Attention Is All You Need\" --no-si --out \"\u003Cproject>\"\n# replace --no-si with --si only after the user explicitly requests SI\n```\n\nOutput includes `{ summary, manifest, results }`. The script writes `\u003Cproject>\u002Fmanifest.json` with route, OA evidence, access mode, format, MIME, bytes, SHA-256, SI choice, and typed failures; secret-looking fields are removed recursively. PDFs go under `PDFs\u002F`, native HTML\u002FXML under `FullText\u002F`, CAJ under `CNKI\u002F`, and supplements under `SupportingInformation\u002F`.\n\n**Token discipline (applies to all paths):** never `eval` a whole page DOM, search result, or PDF\u002FSI bytes back into the agent context. Keep large data inside Node\u002F`scripts\u002F*.mjs` and surface only compact status. Reserve interactive `\u002Feval` + `cdp_open_url.mjs` for the single-paper route below or for diagnosing one stuck paper after the batch run.\n\n## Recommended Web Access Workflow (other publishers and confirmed API-plus-OA fallback)\n\nUse this section only after legitimate OA sources are unavailable: directly for English publishers outside Elsevier\u002FSpringer Nature\u002FIEEE, or after the user explicitly accepts Web Access fallback when both a supported publisher API and the OA fallback failed. Start from Web of Science or the configured library portal and reuse the user's authenticated browser session.\n\nBefore using the library route, check for legitimate open-access availability when the article metadata suggests OA or the user provides an OA\u002Fopen journal paper. Use PMC, publisher OA links, arXiv, DOI landing pages with clear open PDF access, or a known lawful PDF URL. If an OA PDF is available, download and verify it directly, mark `open_access_downloaded`, and record the OA source in the manifest. Do not require institutional login for an article that is already openly available.\n\nImportant distinction: `--topic` is a Web of Science topic search, not an exact-title resolver. For a known exact title, especially conference\u002FarXiv papers without DOI, prefer `--title \"\u003Cexact title>\" --open-access` or `--pdf-url` when the legitimate PDF URL is known. In testing, `--topic \"Attention Is All You Need\"` matched an unrelated HBR article first, while `--title \"Attention Is All You Need\" --open-access` correctly downloaded arXiv `1706.03762v7`.\n\nWeb of Science hosts to recognize: `webofscience.clarivate.cn`, `www.webofscience.com`, `*.webofknowledge.com`, `*.clarivate.com`. Note: WoS renders records inside **shadow DOM with a virtualized list** — when scraping manually you must pierce shadow roots and scroll to load more rows (the batch script already does this).\n\n1. **Authenticate once**: open Web of Science via the library aggregation \u002F institutional entry. If Web of Science or another database shows authentication choices such as institutional login, Shibboleth\u002FOpenAthens\u002FCARSI, CAS\u002FSSO, or IP login, use the route the user normally uses. If credentials, QR, CAPTCHA, SMS\u002FOTP, or unclear consent appears, follow **Institutional Authentication Handoff** below.\n2. Confirm you are on the authenticated Web of Science search page (institutional name visible, search box present).\n3. Search the paper by **DOI** when available, otherwise by **exact title**:\n   - Set the search field to `DOI` or `Title`, paste the value, run the search.\n   - Read the results page with `\u002Feval` and pick the record that matches title + year + authors.\n4. Open the matching record and read it with `\u002Feval`.\n5. Click the full-text route, in this order of preference:\n   - `Free Full Text` \u002F `Open Access` if present\n   - library resolver links: `Find it at`, `SFX`, `OpenURL`, `Full Text Links`, `查看全文`, `Full Text available via`, database\u002Fprovider names such as Ovid\n   - publisher full-text link: `View Full Text`, the publisher name, or `View PDF`\n   - The full-text link should inherit the institutional session, so the publisher often grants access without a second login. If a second institutional handoff appears, complete it once.\n6. On the publisher page, find the PDF link (`PDF`, `View PDF`, `Download PDF`, `pdfft`, `\u002Fdoi\u002Fpdf\u002F`) and save it with `scripts\u002Fbrowser_pdf_downloader.mjs`.\n7. If the full-text resolver opens readable HTML full text but no valid PDF is exposed, save the HTML\u002Ftext, mark `full_text_html_available`, and tell the user plainly: \"已获取 HTML 全文，但当前授权路径没有可下载 PDF.\" Do not mislabel an HTML page as a PDF; if a PDF probe returns HTML, move it to diagnostics and explain that no valid PDF was downloaded.\n8. If the resolver\u002Fprovider explicitly says the institution has no entitlement, mark `library_no_permission` and tell the user: \"当前图书馆资源没有该文献全文权限.\" Do not hide this behind `failed_after_retry`.\n9. **Do not download Supporting Information by default.** Only fetch SI if the user explicitly asked; otherwise just note whether SI exists (see Supporting Information below).\n10. Record the route taken (OA source or WoS → SFX\u002FOpenURL\u002Ffull-text provider → publisher\u002Fdatabase) in the manifest.\n\nIf Web of Science returns no record, or the record has no accessible full-text link, mark the paper `no_full_text_link` and tell the user. If the library route is found but denies entitlement, mark `library_no_permission`. Do not silently fall back to direct publisher navigation as if it were the same authorized route.\n\n## Publisher Verification and ScienceDirect\n\nScienceDirect and some publisher platforms may show \"Are you a robot?\", CAPTCHA, Cloudflare, bot verification, or similar checks after repeated direct DOI navigation or automated tab opening. These pages are security and anti-automation challenges, not ordinary login confirmations.\n\nReduce the chance of triggering them by using a conservative access pattern:\n\n1. Prefer the library aggregation \u002F CARSI entry before direct `doi.org -> publisher` navigation.\n2. Process ScienceDirect and other sensitive publishers one article at a time.\n3. Keep a visible audit trail in the manifest; do not open many publisher tabs in parallel.\n4. Wait for each page to settle before looking for `Download PDF`, `View PDF`, or `PDF`.\n5. Reuse the same tab after the user completes a verification step instead of opening repeated new tabs.\n6. Avoid retry loops. Use one attempt by default and no more than two attempts on the same tab before handing the page to the user.\n\nWhen a publisher verification page appears:\n\n1. First, **attempt automatic verification** via the built-in anti-bot module (`scripts\u002Flib\u002Fanti-bot.mjs`). The module tries: simple click challenges, ScienceDirect robot check, Cloudflare Turnstile, slider CAPTCHA (including CNKI Geetest-style), and reCAPTCHA checkbox.\n2. If auto-verification succeeds, continue the download from the resolved page.\n3. If auto-verification fails:\n   a. Stop automated actions on that tab.\n   b. Record the paper with status `verification_auto_failed`. Use `sciencedirect_robot_check` only when no automatic interaction was possible.\n   c. Tell the user which paper and tab need manual attention.\n   d. After the user says the verification is complete, continue from the same tab and try the visible article\u002FPDF route once.\n   e. If verification immediately reappears, mark `do_not_auto_retry` and move on.\n\nCreate or update `publisher_verification.tsv` when publisher checks interrupt a batch. Use this header:\n\n```text\nid\tproject\ttitle\tdoi\tyear\tvenue\tpublisher\tstatus\tsource_url\tcurrent_url\tnext_action\tnotes\n```\n\nSuggested `next_action` values:\n\n```text\nuser_complete_publisher_verification\nretry_same_tab_after_user_confirms\ntry_aggregation_entry_route\ntry_authorized_oa_route\nmark_do_not_auto_retry\n```\n\n## Institutional Authentication Handoff and Retry\n\nPublishers and databases routed through CAS\u002FSSO, CARSI\u002FShibboleth, OpenAthens, EZproxy, WebVPN, or IP authorization may redirect to an institutional login or database login page for the first authenticated access. This is expected and is not a reason to ask for the user's password.\n\nWhen a page reaches an institutional login page, federation\u002FWAYF selector, database login page, or IP-login prompt:\n\n1. Stop automated actions on that tab.\n2. Record the paper in `carsi_retry.tsv` with status `carsi_waiting_user`.\n3. Tell the user exactly which tab\u002Fpage needs attention, for example: \"This page is at your institution\u002Fdatabase login. If the browser has already filled credentials, I can click the visible login\u002Fconfirm button once with your authorization; otherwise please complete it in the browser.\" If a federation\u002FWAYF page asks which institution to use, ask the user to pick their institution, or do it only when the choice is unambiguous and credential-free and the user authorized it.\n4. Do not read, store, or request the password, QR result, OTP, SMS code, CAPTCHA, cookie, or local\u002Fsession storage.\n5. If the user explicitly authorizes clicking because credentials are already filled, click only the visible login\u002Fconfirm\u002Fcontinue button once. Do not type into fields or inspect hidden credential values. For credential-free options such as \"IP login\", click only when the user authorizes that route or has just completed it manually.\n6. If QR login, SMS\u002FOTP, CAPTCHA, Cloudflare, or publisher bot verification appears, stop and let the user complete it manually.\n7. After the login\u002Fconfirm step completes, refresh or continue from the same tab.\n8. Re-detect whether the page is now a publisher article page, a PDF viewer, or another institutional handoff.\n9. If resolved, download and verify the PDF\u002FSI, then update the manifest status to `downloaded` or `downloaded_with_si`.\n10. If it loops back to the same institutional\u002Fdatabase login after a completed user login, record `failed_after_retry` with the observed reason and move on.\n\n### Safe Institutional Auto-Confirm\n\nThe agent may click a saved-login confirmation button only when all conditions are true:\n\n```text\n1. The page is on an expected institutional, library, federation, or database domain for the user's configured route.\n2. The user has explicitly authorized this action in the current conversation, for example: \"可以点这个机构登录确认按钮\".\n3. The visible action is clearly a login\u002Fconfirm\u002Fcontinue button, such as 登录, 登 录, 确认登录, 继续登录, Continue, Proceed, or Sign in.\n4. There is no visible QR-only login, SMS\u002FOTP field, push-approval prompt, password reset prompt, consent-to-share-new-data prompt, or account\u002Fsecurity warning. (Slider CAPTCHAs and simple robot checks are now auto-attemptable — see Boundaries.)\n5. The agent does not read, reveal, copy, store, type, or modify credentials.\n```\n\nA federation\u002FWAYF\u002F机构选择 page carries no credentials and may be selected when the institution is unambiguous and the user has authorized it. If any condition is unclear, pause and ask the user to handle that tab. Do not repeatedly click login; one click is enough to test whether the saved-login state works.\n\nCreate or update `carsi_retry.tsv` whenever institutional authentication blocks a batch. Use this header:\n\n```text\nid\tproject\ttitle\tdoi\tyear\tvenue\tpublisher\tfailure_stage\tstatus\tsource_url\tcurrent_url\tnext_action\tnotes\n```\n\nSuggested `next_action` values:\n\n```text\nuser_complete_institution_login_in_chrome\nselect_institution_in_federation_wayf\nretry_same_tab_after_user_confirms\nrepair_url_by_doi\ntry_aggregation_entry_route\nmark_no_authorized_pdf\n```\n\nFor a CARSI retry batch, process one or a few tabs at a time. Do not open many login tabs in parallel; it can confuse the user's session and increase publisher or SSO risk.\n\n## Download PDF From Browser Context\n\nUse the bundled script when a PDF URL opens in Chrome but direct shell download returns `403`, `401`, Cloudflare HTML, or a login page.\n\n```powershell\n$node = \"$env:LOCALAPPDATA\\OpenAI\\Codex\\bin\\node.exe\"\n& $node \"$env:USERPROFILE\\.agents\\skills\\nature-downloader\\scripts\\browser_pdf_downloader.mjs\" `\n  --url \"https:\u002F\u002Fwww.sciencedirect.com\u002Fscience\u002Farticle\u002Fpii\u002FSXXXXXXXXXXXXXXXX\u002Fpdfft\" `\n  --out \"D:\\path\\paper.pdf\"\n```\n\nThe script:\n\n- Opens the URL in the user's controlled Chrome session unless `--target` is provided.\n- Runs `fetch(location.href, { credentials: \"include\" })` inside the page.\n- Transfers bytes in chunks through the local CDP proxy.\n- Writes the binary file to disk.\n- Verifies the `%PDF` signature by default.\n\nUseful options:\n\n```text\n--url \u003Curl>          PDF URL to open and save\n--target \u003CtargetId>  Existing Chrome target\u002Ftab id to use\n--out \u003Cpath>         Output PDF path\n--proxy \u003Curl>        CDP proxy URL, default http:\u002F\u002F127.0.0.1:3456\n--close              Close the tab after download if the script opened it\n--allow-non-pdf      Save even when content does not start with %PDF\n```\n\n## Supporting Information\n\n**Always confirm SI before file download.** Fetch SI only when the user explicitly chooses it (e.g. \"连补充材料一起下\", \"include SI\", \"download supplementary\", \"把补充材料也下了\"). When the user chooses no, pass `--no-si` and do not perform extra attachment navigation.\n\nWhen the user does ask for supporting information, use this method:\n\n1. Open the article landing page, not only the PDF page.\n2. Extract all links with text or href matching:\n   - `Supporting Information`\n   - `Supplementary`\n   - `Supplemental`\n   - `\u002Fdoi\u002Fsuppl\u002F`\n   - `\u002Fsuppl_file\u002F`\n   - `_si_`\n   - `mmc1`, `mmc2` (Elsevier\u002FScienceDirect supplement pattern)\n3. Download every PDF\u002FDOCX\u002FXLSX\u002Fvideo\u002Fdata file that is clearly a legitimate supplement, using the browser context if needed.\n\nFor the WoS batch route, an explicit SI request maps to `--si`. When an exact title is known, pass it as both `--topic` and `--title` with `--count 1`. WoS + `--si` must:\n\n- keep each paper in its own readable-title folder;\n- place only the verified main PDF and clearly labelled SI files in that folder;\n- preserve original attachment names when available;\n- follow a supplementary landing page at most one level deep;\n- exclude external repository links such as GitHub, Zenodo, Figshare, Dryad, and OSF;\n- keep the main PDF and report `si.status = not_found` when no SI exists;\n- report `partial` when some SI files fail without treating the main PDF as failed.\n\nDo not apply the clean per-article folder behavior to CNKI, `--open-access`, bare `--pdf-url`, or direct `--dois` routes.\n\nACS fallback pattern, only after verifying the DOI and article page:\n\n```text\nhttps:\u002F\u002Fpubs.acs.org\u002Fdoi\u002Fsuppl\u002F\u003CDOI>\u002Fsuppl_file\u002F\u003Cjournal-code>_si_001.pdf\n```\n\nDo not invent supplement URLs as facts. If a guessed URL returns 404, record \"not found\" and inspect the article page.\n\n## Verification and Reading\n\nAfter downloading, verify every file.\n\nFor PDFs:\n\n```powershell\n$env:PYTHONUTF8='1'\npython -X utf8 \"$env:USERPROFILE\\.claude\\skills\\nature-downloader\\scripts\\extract_pdf_text.py\" `\n  --pdf \"D:\\path\\paper.pdf\" `\n  --pages 3\n```\n\nThis should report page count and extracted text. The script also reconfigures stdout\u002Fstderr to UTF-8 internally to reduce Windows GBK failures. If extraction fails but the PDF is valid, try PyMuPDF, OCR, or the local `pdf` skill.\n\nMinimum verification checklist:\n\n- File exists and size is plausible.\n- First bytes are `%PDF` for PDF files.\n- Page count is nonzero.\n- Extracted text includes the article title, abstract, or supporting information title.\n- For HTML full text, saved HTML\u002Ftext includes the article title or DOI, and the user-facing reply states that no valid PDF was available.\n- Save a small manifest with DOI, title, source URL, download date, and supplement status when doing more than one paper.\n\n## Zotero\n\nZotero import is useful for metadata, DOI, citation keys, and library organization, but it does not replace local PDF verification. If Zotero imports a paper, still check whether the PDF attachment is present and readable. If the user wants a project folder with full text, save PDFs explicitly to that folder.\n\n## Naming Convention\n\nUse readable filenames:\n\n```text\nFirstAuthor_Year_Journal_short-title.pdf\nFirstAuthor_Year_Journal_short-title_SI.pdf\n```\n\nFor project work, keep a folder like:\n\n```text\n文献自动下载\u002F\n  manifest.tsv\n  PDFs\u002F\n  SupportingInformation\u002F\n  extracted_text\u002F\n```\n\n## Failure Handling\n\nIf direct publisher navigation triggers ScienceDirect \"Are you a robot?\", Cloudflare, CAPTCHA, or another bot challenge:\n\n- First, attempt automatic verification via `scripts\u002Flib\u002Fanti-bot.mjs`.\n- If auto-verification succeeds, continue the download normally.\n- If auto-verification fails, record `verification_auto_failed` or `sciencedirect_robot_check`.\n- Ask the user to solve it in Chrome.\n- Then continue once from the same now-open page.\n- If the same challenge immediately reappears, mark `do_not_auto_retry` and move on.\n\nIf shell `Invoke-WebRequest` or `curl` returns 403 but the PDF opens in Chrome:\n\n- Use `browser_pdf_downloader.mjs`; this is the normal institutional-access case.\n\nIf a page shows publisher bot verification, CAPTCHA, Cloudflare, QR login, SMS\u002FOTP, or another security challenge:\n\n- Do not ask for or accept institutional credentials in chat. Publisher API keys follow the separate save-on-receipt rule.\n- Pause and ask the user to complete the verification in Chrome.\n- Record `publisher_verification_waiting_user` in `publisher_verification.tsv`, or `sciencedirect_robot_check` for ScienceDirect.\n- Continue only after the user says the browser step is complete.\n\nIf a page shows institutional SSO, CAS, CARSI\u002FShibboleth, OpenAthens, SAML, federation\u002FWAYF\u002F机构选择, database login, or IP-login options:\n\n- Do not ask for or accept institutional credentials in chat. Publisher API keys follow the separate save-on-receipt rule.\n- If the user has explicitly authorized it and the browser has already filled credentials, click the visible login\u002Fconfirm button once.\n- Otherwise pause and ask the user to complete the login in the browser.\n- Record `carsi_waiting_user` or `carsi_resolved_retry_needed` in `carsi_retry.tsv` as appropriate.\n\nIf the aggregation entry shows no full-text link:\n\n- Try the publisher's own `Institutional login` \u002F `机构登录` \u002F CARSI\u002FShibboleth\u002FOpenAthens route and select the user's institution when authorized.\n- Try the DOI on the publisher page once an institutional session exists.\n- Check open-access copies only from legitimate sources.\n- Record `no_authorized_pdf_found` rather than seeking unauthorized mirrors.\n\nIf a page opens as `about:blank`:\n\n- Treat it as a URL-fragment\u002Fencoding problem first, especially when the original URL contains `#` or `#!`.\n- Reopen through `scripts\u002Fcdp_open_url.mjs --url \"\u003Cfull URL>\" --wait`.\n- Do not paste fragment-heavy URLs unquoted into shell commands or manually concatenate them into `\u002Fnew?url=...` without URL encoding.\n\nIf `curl` is unavailable:\n\n- Use PowerShell `Invoke-WebRequest` for simple proxy checks.\n- Prefer the bundled Node.js helper scripts for CDP proxy actions because Node's `URLSearchParams` preserves nested URL fragments correctly.\n\nIf the session expires:\n\n- Ask the user to re-authenticate through their institution\u002Flibrary route in the same browser, then reopen the publisher\u002Fdatabase entry.\n\n## To Confirm With The User (first run)\n\nThese items depend on the user's live institution\u002Flibrary session and should be confirmed once per deployment or institution profile:\n\n1. The exact institutional login, federation, proxy, WebVPN, or database hosts that appear in the address bar.\n2. The base URL \u002F link pattern of the library aggregation or database entries the user actually uses.\n3. Whether a federation\u002FWAYF\u002F机构选择, IP-login, or database-login step appears, and whether the user authorizes selecting the unambiguous institution\u002Flogin option.\n",{"name":5,"metadata":25,"description":7},{"compatibility":26},"Requires Node.js 22+ and Python 3. CNKI, Web Access, and SI routes additionally require the user's authenticated Chrome session and remote debugging. Uses only lawful OA, publisher API, and user-authorized institutional access.","main","e905af21e5f1e1c3ca605e9656c3a7930360a84e","Science\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader",1,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills","https:\u002F\u002Fhamzabellouch.github.io\u002F","https:\u002F\u002Fgithub.com\u002Fhamzabellouch","hamzabellouch.github.io","CEO & Founder of @tknoglobal | Researcher in Technology & Applied Sciences.","2026-10-17 03:20:19",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add hamzabellouch\u002Fagent-skills --skill nature-downloader",{"tool":43,"command":44},"bunx","bunx skills add hamzabellouch\u002Fagent-skills --skill nature-downloader",{"tool":46,"command":47},"pnpm","pnpm dlx skills add hamzabellouch\u002Fagent-skills --skill nature-downloader","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002FSKILL.md",true,[51,57,61,67,73,77,81,85,89,93,97,101,105,109,113,117,121,125,131,135,139,143,147,151,155,159,163,167,171,175,179,183,187,191,195,199,203,207,211,215,219,223,227,231,235,239,243,247,251,255,259,263,267,271,275,279,283,287,291,295,299,303,307],{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},".gitattributes","OTHER","其他",139,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002F.gitattributes",{"path":58,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":59,"sourceHtmlUrl":60},".gitignore",132,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002F.gitignore",{"path":62,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":65,"sourceHtmlUrl":66},"agents\u002Fopenai.yaml","REFERENCE","参考文档",395,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fagents\u002Fopenai.yaml",{"path":68,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},"assets\u002Fbanner.jpg","ASSET","资产文件",84684,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fassets\u002Fbanner.jpg",{"path":74,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":75,"sourceHtmlUrl":76},"data\u002Fpublishers.json",885,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fdata\u002Fpublishers.json",{"path":78,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":79,"sourceHtmlUrl":80},"data\u002Fschool.schema.json",3334,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fdata\u002Fschool.schema.json",{"path":82,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":83,"sourceHtmlUrl":84},"data\u002Fschools.yaml",271,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fdata\u002Fschools.yaml",{"path":86,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":87,"sourceHtmlUrl":88},"docs\u002Fnature-downloader-reference-research-2026-07-15.md",21863,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fdocs\u002Fnature-downloader-reference-research-2026-07-15.md",{"path":90,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":91,"sourceHtmlUrl":92},"docs\u002Fsuperpowers\u002Fplans\u002F2026-06-21-nature-downloader-merge.md",2964,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fdocs\u002Fsuperpowers\u002Fplans\u002F2026-06-21-nature-downloader-merge.md",{"path":94,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":95,"sourceHtmlUrl":96},"examples\u002Fcarsi-retry-template.tsv",406,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fexamples\u002Fcarsi-retry-template.tsv",{"path":98,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":99,"sourceHtmlUrl":100},"examples\u002Fmanifest-template.tsv",494,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fexamples\u002Fmanifest-template.tsv",{"path":102,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":103,"sourceHtmlUrl":104},"examples\u002Fpublisher-verification-template.tsv",425,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fexamples\u002Fpublisher-verification-template.tsv",{"path":106,"resourceType":106,"resourceTypeDesc":107,"sizeBytes":108,"sourceHtmlUrl":16},"LICENSE","许可证",1065,{"path":110,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":111,"sourceHtmlUrl":112},"manifest.yaml",1204,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fmanifest.yaml",{"path":114,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":115,"sourceHtmlUrl":116},"README_EN.md",3070,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002FREADME_EN.md",{"path":118,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":119,"sourceHtmlUrl":120},"README.md",6054,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002FREADME.md",{"path":122,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":123,"sourceHtmlUrl":124},"requirements.txt",64,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Frequirements.txt",{"path":126,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":129,"sourceHtmlUrl":130},"scripts\u002Fbatch_download.mjs","SCRIPT","脚本",36282,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fscripts\u002Fbatch_download.mjs",{"path":132,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":133,"sourceHtmlUrl":134},"scripts\u002Fbrowser_pdf_downloader.mjs",5499,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fscripts\u002Fbrowser_pdf_downloader.mjs",{"path":136,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":137,"sourceHtmlUrl":138},"scripts\u002Fcdp_open_url.mjs",1773,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fscripts\u002Fcdp_open_url.mjs",{"path":140,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":141,"sourceHtmlUrl":142},"scripts\u002Fconfigure_credentials.py",6843,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fscripts\u002Fconfigure_credentials.py",{"path":144,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":145,"sourceHtmlUrl":146},"scripts\u002Fconfigure_school.py",4500,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fscripts\u002Fconfigure_school.py",{"path":148,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":149,"sourceHtmlUrl":150},"scripts\u002Fextract_pdf_text.py",2889,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fscripts\u002Fextract_pdf_text.py",{"path":152,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":153,"sourceHtmlUrl":154},"scripts\u002Flib\u002Fanti-bot.mjs",34116,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fscripts\u002Flib\u002Fanti-bot.mjs",{"path":156,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":157,"sourceHtmlUrl":158},"scripts\u002Flib\u002Fcdp-utils.mjs",5277,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fscripts\u002Flib\u002Fcdp-utils.mjs",{"path":160,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":161,"sourceHtmlUrl":162},"scripts\u002Flib\u002Fcnki.mjs",15060,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fscripts\u002Flib\u002Fcnki.mjs",{"path":164,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":165,"sourceHtmlUrl":166},"scripts\u002Flib\u002Fcredentials.mjs",2510,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fscripts\u002Flib\u002Fcredentials.mjs",{"path":168,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":169,"sourceHtmlUrl":170},"scripts\u002Flib\u002Fdirect-download.mjs",1470,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fscripts\u002Flib\u002Fdirect-download.mjs",{"path":172,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":173,"sourceHtmlUrl":174},"scripts\u002Flib\u002Fmanifest.mjs",1265,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fscripts\u002Flib\u002Fmanifest.mjs",{"path":176,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":177,"sourceHtmlUrl":178},"scripts\u002Flib\u002Fmetadata.mjs",2148,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fscripts\u002Flib\u002Fmetadata.mjs",{"path":180,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":181,"sourceHtmlUrl":182},"scripts\u002Flib\u002Fopen-access-provider.mjs",4506,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fscripts\u002Flib\u002Fopen-access-provider.mjs",{"path":184,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":185,"sourceHtmlUrl":186},"scripts\u002Flib\u002Fopen-access.mjs",4925,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fscripts\u002Flib\u002Fopen-access.mjs",{"path":188,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":189,"sourceHtmlUrl":190},"scripts\u002Flib\u002Fpdf-utils.mjs",7203,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fscripts\u002Flib\u002Fpdf-utils.mjs",{"path":192,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":193,"sourceHtmlUrl":194},"scripts\u002Flib\u002Fprovider-registry.mjs",365,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fscripts\u002Flib\u002Fprovider-registry.mjs",{"path":196,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":197,"sourceHtmlUrl":198},"scripts\u002Flib\u002Fprovider-utils.mjs",1909,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fscripts\u002Flib\u002Fprovider-utils.mjs",{"path":200,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":201,"sourceHtmlUrl":202},"scripts\u002Flib\u002Fpublisher-providers.mjs",4536,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fscripts\u002Flib\u002Fpublisher-providers.mjs",{"path":204,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":205,"sourceHtmlUrl":206},"scripts\u002Flib\u002Frouting.mjs",2504,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fscripts\u002Flib\u002Frouting.mjs",{"path":208,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":209,"sourceHtmlUrl":210},"scripts\u002Flib\u002Fschool-config.mjs",1016,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fscripts\u002Flib\u002Fschool-config.mjs",{"path":212,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":213,"sourceHtmlUrl":214},"scripts\u002Flib\u002Fsettings.mjs",501,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fscripts\u002Flib\u002Fsettings.mjs",{"path":216,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":217,"sourceHtmlUrl":218},"scripts\u002Flib\u002Fstatus-codes.mjs",7057,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fscripts\u002Flib\u002Fstatus-codes.mjs",{"path":220,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":221,"sourceHtmlUrl":222},"scripts\u002Flib\u002Fwos-supporting-information.mjs",9156,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fscripts\u002Flib\u002Fwos-supporting-information.mjs",{"path":224,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":225,"sourceHtmlUrl":226},"scripts\u002Fretry_elsevier_api.mjs",801,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fscripts\u002Fretry_elsevier_api.mjs",{"path":228,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":229,"sourceHtmlUrl":230},"src\u002Fconfig.py",5334,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fsrc\u002Fconfig.py",{"path":232,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":233,"sourceHtmlUrl":234},"src\u002Fhealth_check.py",4383,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fsrc\u002Fhealth_check.py",{"path":236,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":237,"sourceHtmlUrl":238},"src\u002Fschools_loader.py",3703,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fsrc\u002Fschools_loader.py",{"path":240,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":241,"sourceHtmlUrl":242},"src\u002Fvalidators.py",6180,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fsrc\u002Fvalidators.py",{"path":244,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":245,"sourceHtmlUrl":246},"src\u002Fwizard.py",23905,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Fsrc\u002Fwizard.py",{"path":248,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":249,"sourceHtmlUrl":250},"tests\u002Fpython\u002Ftest_config_credentials.py",1285,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Ftests\u002Fpython\u002Ftest_config_credentials.py",{"path":252,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":253,"sourceHtmlUrl":254},"tests\u002Fpython\u002Ftest_config_wizard.py",7390,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Ftests\u002Fpython\u002Ftest_config_wizard.py",{"path":256,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":257,"sourceHtmlUrl":258},"tests\u002Funit\u002Fbatch-cli.test.mjs",3216,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Ftests\u002Funit\u002Fbatch-cli.test.mjs",{"path":260,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":261,"sourceHtmlUrl":262},"tests\u002Funit\u002Fcnki.test.mjs",2656,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Ftests\u002Funit\u002Fcnki.test.mjs",{"path":264,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":265,"sourceHtmlUrl":266},"tests\u002Funit\u002Fcredentials.test.mjs",1179,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Ftests\u002Funit\u002Fcredentials.test.mjs",{"path":268,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":269,"sourceHtmlUrl":270},"tests\u002Funit\u002Fgeneric-package.test.mjs",1799,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Ftests\u002Funit\u002Fgeneric-package.test.mjs",{"path":272,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":273,"sourceHtmlUrl":274},"tests\u002Funit\u002Fmanifest.test.mjs",1027,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Ftests\u002Funit\u002Fmanifest.test.mjs",{"path":276,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":277,"sourceHtmlUrl":278},"tests\u002Funit\u002Fmetadata.test.mjs",1032,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Ftests\u002Funit\u002Fmetadata.test.mjs",{"path":280,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":281,"sourceHtmlUrl":282},"tests\u002Funit\u002Fopen-access-provider.test.mjs",3345,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Ftests\u002Funit\u002Fopen-access-provider.test.mjs",{"path":284,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":285,"sourceHtmlUrl":286},"tests\u002Funit\u002Fopen-access.test.mjs",2833,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Ftests\u002Funit\u002Fopen-access.test.mjs",{"path":288,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":289,"sourceHtmlUrl":290},"tests\u002Funit\u002Fprovider-utils.test.mjs",1426,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Ftests\u002Funit\u002Fprovider-utils.test.mjs",{"path":292,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":293,"sourceHtmlUrl":294},"tests\u002Funit\u002Fpublisher-providers.test.mjs",4993,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Ftests\u002Funit\u002Fpublisher-providers.test.mjs",{"path":296,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":297,"sourceHtmlUrl":298},"tests\u002Funit\u002Frouting.test.mjs",3995,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Ftests\u002Funit\u002Frouting.test.mjs",{"path":300,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":301,"sourceHtmlUrl":302},"tests\u002Funit\u002Fschool-config.test.mjs",1229,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Ftests\u002Funit\u002Fschool-config.test.mjs",{"path":304,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":305,"sourceHtmlUrl":306},"tests\u002Funit\u002Fstatus-codes.test.mjs",8246,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Ftests\u002Funit\u002Fstatus-codes.test.mjs",{"path":308,"resourceType":127,"resourceTypeDesc":128,"sizeBytes":309,"sourceHtmlUrl":310},"tests\u002Funit\u002Fwos-supporting-information.test.mjs",9374,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FScience\u002FAcademic_Research_and_Methodology\u002Facademic-nature-nature-downloader\u002Ftests\u002Funit\u002Fwos-supporting-information.test.mjs",[312,319,326,333,340,347],{"skillNo":313,"name":314,"nameZh":6,"description":315,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":316,"categories":317,"keywords":318,"publishedAt":20},"01M79FHH2H815A9TAP6WNKH4Q8","security-audit","Comprehensive security guidance, source code audit, vulnerability assessment, and penetration test review for codebases, APIs, microservices, CLI tools, libraries, and LLM-backed applications. Triggers on requests to audit a codebase, conduct security reviews, find vulnerabilities or flaws, pen-test source code, or when the user asks in Arabic (فحص أمني، تدقيق الكود أمنياً، مراجعة الثغرات، فحص أمان المشروع). Supports Guidance mode (focused review) and Full Audit mode (deterministic 6-phase harness).","https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FSecurity\u002FSecurity_Audit_and_Code_Review\u002Fsecurity-audit\u002FSKILL.md",[],[],{"skillNo":320,"name":321,"nameZh":6,"description":322,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":323,"categories":324,"keywords":325,"publishedAt":20},"01M79FHBGXVBY6VQ1X7ETAZMF1","malware-analysis-reversing","Production malware analysis workflows, reverse engineering methodologies, isolated sandbox triage, static\u002Fdynamic binary analysis, memory forensics, and YARA detection rule authoring.","https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FSecurity\u002FOffensive_Security_and_Pentesting\u002Fmalware-analysis-reversing\u002FSKILL.md",[],[],{"skillNo":327,"name":328,"nameZh":6,"description":329,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":330,"categories":331,"keywords":332,"publishedAt":20},"01M79FH6EACDR801TZCE4R8SAC","application-security-pentesting","Production Application Security (AppSec) standards, OWASP Top 10 vulnerability remediation, SAST\u002FDAST pipeline integration, secure code review, threat modeling, and defensive security posture.","https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FSecurity\u002FOffensive_Security_and_Pentesting\u002Fapplication-security-pentesting\u002FSKILL.md",[],[],{"skillNo":334,"name":335,"nameZh":6,"description":336,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":337,"categories":338,"keywords":339,"publishedAt":20},"01M79FH0VKVT44FK923K520ZQA","oauth2-oidc-security-flows","Implement enterprise OAuth 2.1 and OpenID Connect (OIDC) authorization code flow with Proof Key for Code Exchange (PKCE), state and nonce verification, refresh token rotation, token revocation, and centralized IdP federation (Keycloak, Auth0, Okta). Trigger when building secure authentication, single sign-on (SSO), or third-party delegated authorization.","https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FSecurity\u002FIdentity_and_Access_Management_IAM\u002Foauth2-oidc-security-flows\u002FSKILL.md",[],[],{"skillNo":341,"name":342,"nameZh":6,"description":343,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":344,"categories":345,"keywords":346,"publishedAt":20},"01M79FGVVB3R4T88XXD8FRSV5B","jwt-session-management-hardening","Harden JWT-based authentication and session lifecycles using asymmetric signing (RS256\u002FEdDSA), JWKS rotation, strict claims validation, Redis-backed sliding window sessions, revocation lists, and secure HttpOnly cookie storage. Trigger when implementing token validation, session revocation, or hardening API authentication.","https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FSecurity\u002FIdentity_and_Access_Management_IAM\u002Fjwt-session-management-hardening\u002FSKILL.md",[],[],{"skillNo":348,"name":349,"nameZh":6,"description":350,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":351,"categories":352,"keywords":353,"publishedAt":20},"01M79FGNCPZ85CVEY0B3NE4H3B","soc2-compliance-automation","Best practices for implementing SOC 2 Type II compliance controls, continuous evidence collection, infrastructure policy-as-code, and automated security monitoring. Use when automating Trust Services Criteria (Security, Availability, Confidentiality, Processing Integrity, Privacy), audit logging, IAM least privilege, or CI\u002FCD security gates.","https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FSecurity\u002FGovernance_Compliance_and_Legal_Tech\u002Fsoc2-compliance-automation\u002FSKILL.md",[],[]]