MCPInstall

cnki-download

Download a paper PDF/CAJ from CNKI. Requires user to be logged in. Use when user wants to download a specific paper.

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

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/cookjohn/cnki-skills --skill cnki-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 cnki-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.

CNKI Paper Download (文献下载)

Prerequisites

User must be logged in to CNKI with download permissions.

Arguments

$ARGUMENTS is optionally a paper detail URL. If blank, uses current page.

Steps

1. Navigate (if URL provided)

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).

2. Check status and download (single async evaluate_script)

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 };
}

3. Report

Based on JS result:

  • status: downloading → "PDF 下载已触发:{title}。请在 Chrome 下载管理器中查看。"
  • error: not_logged_in → tell user to log in
  • error: captcha → tell user to solve captcha

Tool calls: 1–2 (navigate_page if URL + evaluate_script)

Verified selectors

ElementSelectorNotes
PDF download#pdfDown<a> inside li.btn-dlpdf
CAJ download#cajDown<a> inside li.btn-dlcaj
Download area.download-btnsparent <div>
Not logged in.downloadlink.icon-notlogged
Title.brief h1strip trailing "网络首发"

Captcha detection

Check #tcaptcha_transform_dy element's getBoundingClientRect().top >= 0. Only active when top >= 0 (visible). Pre-loaded SDK sits at top: -1000000px.

FAQ

What does the cnki-download skill do?

Download a paper PDF/CAJ from CNKI. Requires user to be logged in. Use when user wants to download a specific paper.

How do I install cnki-download?

Run npx skills add https://github.com/cookjohn/cnki-skills --skill cnki-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/cnki-download/ (personal) or .claude/skills/cnki-download/ (project).

Which AI agents can use cnki-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 cnki-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 cnki-download?

It is published by cookjohn in cookjohn/cnki-skills. It has 757 recorded installs.

More from cookjohn/cnki-skills

View all →

cnki-search

cookjohn/cnki-skills

Search CNKI (中国知网) for papers by keyword. Use when the user wants to find academic papers on a topic.

Education & Science1.1K installs

cnki-advanced-search

cookjohn/cnki-skills

Perform advanced search on CNKI with field filters like author, title, journal, date range, source category (SCI/EI/CSSCI/北大核心). Use when user needs precise filtered search beyond simple keywords.

737 installs

cnki-paper-detail

cookjohn/cnki-skills

Extract full paper details from a CNKI paper page including title, authors, affiliations, abstract, keywords, fund, classification. Use when the user needs detailed information about a specific paper.

cnki-journal-search

cookjohn/cnki-skills

Search for journals/publications on CNKI by name, ISSN, CN, or sponsor. Use when the user wants to find a specific journal or browse publications.

578 installs

cnki-journal-index

cookjohn/cnki-skills

Query journal indexing/inclusion status on CNKI - check which databases include a journal (北大核心, CSSCI, CSCD, SCI, EI, etc.), get impact factors and evaluation data. Use when user asks about a journal's level, indexing, or ranking.

530 installs

cnki-export

cookjohn/cnki-skills

Open the skill to read its SKILL.md instructions.

413 installs

Popular education & science skills

View category →

teach

mattpocock/skills

Teach the user a new skill or concept, within this workspace.

Education & Science874K installs

scaffold-exercises

mattpocock/skills

Create exercise directory structures with sections, problems, solutions, and explainers that pass linting. Use when user wants to scaffold exercises, create exercise stubs, or set up a new course section.

Education & Science488.2K installs

paper-context-resolver

lllllllama/rigorpilot-skills

Rigor Paper Context helper for README-first deep learning repo reproduction. Use only when the README and repository files leave a narrow reproduction-critical gap and the task is to resolve a specific paper detail such as dataset split, preprocessing, evaluation protocol, checkpoint mapping, or runtime assumption from primary paper sources while recording conflicts. Do not use for general paper summary, repo scanning, environment setup, command execution, title-only paper lookup, or replacing README guidance by default.

Education & Science478.3K installs

caveman-learn

juliusbrussee/caveman

Act on a Caveman learn report - review the ranked token sinks, apply cost-lowering fixes with per-edit consent, and report what those fixes returned. Use when asked to lower an agent's token cost, what caveman has saved, to trim a heavy CLAUDE.md, or to offload re-pasted context into cavemem.

Education & Science107.9K installs

gsap-plugins

greensock/gsap-skills

Official GSAP skill for GSAP plugins — registration, ScrollToPlugin, ScrollSmoother, Flip, Draggable, Inertia, Observer, SplitText, ScrambleText, SVG and physics plugins, CustomEase, EasePack, CustomWiggle, CustomBounce, GSDevTools. Use when the user asks about a GSAP plugin, scroll-to, flip animations, draggable, SVG drawing, or plugin registration.

Education & Science67.9K installs

teach-impeccable

pbakaus/impeccable

DEPRECATED: Use /impeccable teach instead. This command has been folded into the impeccable skill.