cnki-advanced-search
Perform advanced search on CNKI with field filters like author, title, journal, date range, source category (SCI/EI/CSSCI/北大核心).…
Download a paper PDF/CAJ from CNKI. Requires user to be logged in. Use when user wants to download a specific paper.
Claude Code
$ npx -y skills add cookjohn/cnki-skills --skill cnki-download --agent claude-code
Codex
$ npx skills add cookjohn/cnki-skills --skill cnki-download -a codex -y
Cursor
$ npx skills add cookjohn/cnki-skills --skill cnki-download -a cursor -y
Gemini CLI
$ npx skills add cookjohn/cnki-skills --skill cnki-download -a gemini-cli -y
GitHub Copilot
$ npx skills add cookjohn/cnki-skills --skill cnki-download -a github-copilot -y
OpenCode
$ npx skills add cookjohn/cnki-skills --skill cnki-download -a opencode -y
Windsurf
$ npx skills add cookjohn/cnki-skills --skill cnki-download -a windsurf -y
name: cnki-download description: Download a paper PDF/CAJ from CNKI. Requires user to be logged in. Use when user wants to download a specific paper. argument-hint: "[paper URL or blank if already on detail page]"
User **must be logged in** to CNKI with download permissions.
`$ARGUMENTS` is optionally a paper detail URL. If blank, uses current page.
If URL provided: use `navigate_page` to go to the URL directly (no wait_for needed — Step 2 handles waiting).
**Important**: Always use `navigate_page` instead of clicking links on the search results page. Clicking opens a new tab and wastes 3 extra tool calls (`list_pages` + `select_page` + `take_snapshot`).
Replace `FORMAT` with `"pdf"` or `"caj"`:
async () => {
// Wait for page load
await new Promise((r, j) => {
let n = 0;
const c = () => {
if (document.querySelector('.brief h1')) r();
else if (++n > 30) j('timeout');
else setTimeout(c, 500);
};
c();
});
// Captcha check
const cap = document.querySelector('#tcaptcha_transform_dy');
if (cap && cap.getBoundingClientRect().top >= 0) {
return { error: 'captcha', message: 'CNKI 正在显示滑块验证码。请在 Chrome 中手动完成拼图验证。' };
}
const format = "FORMAT"; // "pdf" or "caj"
// Check download links
const pdfLink = document.querySelector('#pdfDown') || document.querySelector('.btn-dlpdf a');
const cajLink = document.querySelector('#cajDown') || document.querySelector('.btn-dlcaj a');
// Check login status
const notLogged = document.querySelector('.downloadlink.icon-notlogged')
|| document.querySelector('[class*="notlogged"]');
if (notLogged) {
return { error: 'not_logged_in', message: '下载需要登录。请先在 Chrome 中登录知网账号。' };
}
const title = document.querySelector('.brief h1')?.innerText?.trim()?.replace(/\s*网络首发\s*$/, '') || '';
if (format === 'pdf' && pdfLink) {
pdfLink.click();
return { status: 'downloading', format: 'PDF', title };
} else if (format === 'caj' && cajLink) {
cajLink.click();
return { status: 'downloading', format: 'CAJ', title };
} else if (pdfLink) {
pdfLink.click();
return { status: 'downloading', format: 'PDF', title };
} else if (cajLink) {
cajLink.click();
return { status: 'downloading', format: 'CAJ', title };
}
return { error: 'no_download', message: '未找到下载链接', hasPDF: !!pdfLink, hasCAJ: !!cajLink };
}Based on JS result:
| Element | Selector | Notes | |---------|----------|-------| | PDF download | `#pdfDown` | `<a>` inside `li.btn-dlpdf` | | CAJ download | `#cajDown` | `<a>` inside `li.btn-dlcaj` | | Download area | `.download-btns` | parent `<div>` | | Not logged in | `.downloadlink.icon-notlogged` | | | Title | `.brief h1` | strip trailing "网络首发" |
Check `#tcaptcha_transform_dy` element's `getBoundingClientRect().top >= 0`. Only active when `top >= 0` (visible). Pre-loaded SDK sits at `top: -1000000px`.
CNKI (中国知网) skills for Claude Code — search, browse journals, download PDFs, export to Zotero via Chrome DevTools MCP
Perform advanced search on CNKI with field filters like author, title, journal, date range, source category (SCI/EI/CSSCI/北大核心).…
Export paper from CNKI and push to Zotero, or save as RIS file. Use when user wants to save a paper to Zotero or export citation…
Query journal indexing/inclusion status on CNKI - check which databases include a journal (北大核心, CSSCI, CSCD, SCI, EI, etc.), get…
Search for journals/publications on CNKI by name, ISSN, CN, or sponsor. Use when the user wants to find a specific journal or…
Browse journal issues, view table of contents, and download original TOC PDF from CNKI. Use when user wants to see papers in a…
Navigate CNKI search result pages (next/previous/specific page) or change sort order. Use when user wants to see more results or…
Use this skill when the user requests to review, analyze, critique, or summarize academic papers, research articles, preprints,…
Research what people actually say about any topic in the last 30 days. Pulls posts and engagement from Reddit, X, YouTube,…
Estimates intracellular metabolic fluxes from steady-state carbon-13 isotope-tracing measurements using validated atom maps,…
Search literature across sources, verify or manage citations, and build MeSH strategies or citation-impact audits. Use for…