MCPInstall

wos-download

Download PDF full text for a WoS paper via publisher links.

Installs
92
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/cookjohn/wos-skills --skill wos-download
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads wos-download automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

WoS Download

Download PDF full text for a paper from Web of Science.

Important Limitations

  • PDF access depends on institutional subscription. Even Open Access papers may require authentication on the publisher site.
  • Cross-origin download: The a.download trick only works when the browser is on the same-origin page displaying the PDF. It does NOT work for cross-origin redirects (e.g., WoS → Wiley).
  • Publisher login walls: Wiley, Elsevier, Springer, etc. may redirect to a login page even for OA papers when accessed without institutional proxy.

Steps

Step 1: Navigate to Full Record

If not already on the full record page:

navigate_page({
  url: "{BASE_URL}/wos/woscc/full-record/{WOS_ID}",
  initScript: "Object.defineProperty(navigator, 'webdriver', {get: () => undefined})"
})

Step 2: Find Full Text Links

async () => {
  for (let i = 0; i < 20; i++) {
    if (document.querySelector('[data-ta="FullRTa-fullRecordtitle-0"]')) break;
    await new Promise(r => setTimeout(r, 500));
  }
  await new Promise(r => setTimeout(r, 1000));

  const title = document.querySelector('[data-ta="FullRTa-fullRecordtitle-0"]')?.textContent?.trim() || '';

  const links = [...document.querySelectorAll('a[data-ta^="FRLinkTa"]')].map(a => ({
    text: a.textContent?.trim()?.replace(/open_in_new/g, '').trim(),
    href: a.href,
    dataTa: a.getAttribute('data-ta')
  }));

  const doiEl = document.querySelector('a[href*="doi.org"]');
  const doi = doiEl?.href || '';

  return { title, links, doi };
}

Step 3: Follow Full Text Link

Navigate to the publisher link:

navigate_page({
  url: "{CHOSEN_LINK}",
  initScript: "Object.defineProperty(navigator, 'webdriver', {get: () => undefined})"
})

Step 4: Check PDF Status & Attempt Download

async () => {
  await new Promise(r => setTimeout(r, 5000));

  const url = window.location.href;
  const contentType = document.contentType;

  // Direct PDF — trigger download immediately
  if (contentType === 'application/pdf') {
    const a = document.createElement('a');
    a.href = url;
    a.download = '{FILENAME}';
    document.body.appendChild(a);
    a.click();
    document.body.removeChild(a);
    return { status: 'downloaded', url };
  }

  // Publisher HTML page — look for PDF links
  const pdfLinks = [...document.querySelectorAll('a')].filter(a => {
    const href = a.href || '';
    const text = a.textContent || '';
    return href.includes('/pdf/') || href.includes('.pdf') ||
           text.toLowerCase().includes('download pdf') || text.toLowerCase() === 'pdf';
  }).map(a => ({
    text: a.textContent?.trim()?.substring(0, 50),
    href: a.href?.substring(0, 120)
  }));

  // Check for access denial
  const bodyText = document.body.innerText?.substring(0, 1000) || '';
  const loginRequired = bodyText.includes('Sign in') || bodyText.includes('Log in') ||
                         bodyText.includes('Individual login') || bodyText.includes('Institutional login');
  const paywall = bodyText.includes('Purchase') || bodyText.includes('Subscribe') ||
                  bodyText.includes('Access Denied');

  return {
    status: loginRequired ? 'login_required' : paywall ? 'paywall' : pdfLinks.length > 0 ? 'pdf_links_found' : 'publisher_page',
    url: url.substring(0, 100),
    pdfLinks: pdfLinks.slice(0, 5),
    pageTitle: document.title
  };
}

Step 5: Handle Result

StatusAction
downloadedReport success, file saved to default download folder
pdf_links_foundClick the "Download PDF" link on the publisher page
login_requiredInform user: "Publisher requires login. Try accessing via institutional VPN/WebVPN or download manually."
paywallInform user: "This paper requires a subscription."
publisher_pageInform user: "On publisher page but no direct PDF link found."

Clicking Publisher's Download PDF Button

If pdf_links_found, use take_snapshot to find the Download PDF button, then click it:

1. take_snapshot → find "Download PDF" link uid
2. click(uid)
3. evaluate_script → wait 5s, check if PDF loaded (contentType === 'application/pdf')
4. If PDF loaded → trigger download with a.download

Filename Convention

{FirstAuthor}_{Year}_{ShortTitle}.pdf

Example: Johnson_2025_Citizen-Centric_AI_Government.pdf

Known Issues

  • WoS gateway links (/api/gateway?...DestURL=...) redirect through GetFTR to publisher. The final destination depends on institutional access.
  • Wiley: Even OA papers show login page without institutional cookie. The ePDF viewer (/doi/epdf/...) is an iframe-based reader, not a downloadable PDF.
  • Elsevier/ScienceDirect: May serve PDF directly if institution has access, otherwise shows abstract page.
  • After download attempt, SID is lost: Navigating to an external publisher site clears WoS performance entries. When returning to WoS, use URL-based search or navigate to any WoS page first to re-establish SID.

Notes

  • This skill uses 3-4 tool calls: navigate to record + extract links + navigate to publisher + download
  • PDF access depends on institutional subscriptions
  • Always use initScript on every navigation
  • If download fails, suggest user try via institutional VPN or manual browser download

FAQ

What does the wos-download skill do?

Download PDF full text for a WoS paper via publisher links.

How do I install wos-download?

Run npx skills add https://github.com/cookjohn/wos-skills --skill wos-download in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/wos-download/ (personal) or .claude/skills/wos-download/ (project).

Which AI agents can use wos-download?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is wos-download safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains wos-download?

It is published by cookjohn in cookjohn/wos-skills. It has 92 recorded installs.

More from cookjohn/wos-skills

View all →

wos-search

cookjohn/wos-skills

Open the skill to read its SKILL.md instructions.

125 installs

wos-paper-detail

cookjohn/wos-skills

Open the skill to read its SKILL.md instructions.

wos-export

cookjohn/wos-skills

Open the skill to read its SKILL.md instructions.

54 installs

wos-navigate-pages

cookjohn/wos-skills

Open the skill to read its SKILL.md instructions.

51 installs

wos-parse-results

cookjohn/wos-skills

Parse search results from the current WoS results page or API response. Internal skill used by other skills.

Backend & APIs50 installs

Popular docs & writing skills

View category →

grill-with-docs

mattpocock/skills

A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.

Docs & Writing1.2M installs

lark-markdown

open.feishu.cn

飞书 Markdown:查看、创建、上传、编辑和比较飞书中的原生 Markdown 文件。当用户要操作飞书 Markdown 文件,或比较其远端版本及本地草稿时使用。纯本地 Markdown 文件操作不触发本 skill。不负责将 Markdown 导入为飞书在线文档,也不负责文件搜索、权限、评论、移动、删除等云空间管理操作。

Docs & Writing778.7K installs

writing-beats

mattpocock/skills

Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.

Docs & Writing490.7K installs

writing-shape

mattpocock/skills

Writing, exploit: shape raw material into an article, paragraph by paragraph.

Docs & Writing490.2K installs

writing-fragments

mattpocock/skills

Writing, explore: mine raw fragments, no structure yet.

Docs & Writing489.6K installs

writing-for-agents

mattpocock/skills

Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.

Docs & Writing479.3K installs