How this skill is triggered — by the user, by Claude, or both
Slash command
/wos-download:wos-download [WoS ID or DOI][WoS ID or DOI]The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Download PDF full text for a paper from Web of Science.
Download PDF full text for a paper from Web of Science.
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).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})"
})
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 };
}
Navigate to the publisher link:
navigate_page({
url: "{CHOSEN_LINK}",
initScript: "Object.defineProperty(navigator, 'webdriver', {get: () => undefined})"
})
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
};
}
| Status | Action |
|---|---|
downloaded | Report success, file saved to default download folder |
pdf_links_found | Click the "Download PDF" link on the publisher page |
login_required | Inform user: "Publisher requires login. Try accessing via institutional VPN/WebVPN or download manually." |
paywall | Inform user: "This paper requires a subscription." |
publisher_page | Inform user: "On publisher page but no direct PDF link found." |
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
{FirstAuthor}_{Year}_{ShortTitle}.pdf
Example: Johnson_2025_Citizen-Centric_AI_Government.pdf
/api/gateway?...DestURL=...) redirect through GetFTR to publisher. The final destination depends on institutional access./doi/epdf/...) is an iframe-based reader, not a downloadable PDF.initScript on every navigationProvides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
npx claudepluginhub yuanyuanma03/academic-research-skills --plugin wos-download