Automates PDF and CAJ downloads from CNKI (China National Knowledge Infrastructure) by navigating to paper detail pages and triggering the download buttons. You need to be logged in to CNKI first with proper download permissions. The skill handles both direct URL navigation and current page downloads, detects captchas and login walls, and uses a single async script to wait for page load and click the right download button. Saves you from manually clicking through CNKI's interface when you're batch downloading academic papers. The implementation is smart about avoiding unnecessary tab switches that would waste API calls.

skills.sh installs
777
GitHub stars
1.1K
last updated
Aug 21, 2026

Install

$ npx -y skills add cookjohn/cnki-skills --skill cnki-download --agent claude-code

Installs into .claude/skills of the current project.

Files

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 中手动完成拼图验证。' };
  }

Sponsors

Details

Repository
github.com/cookjohn/cnki-skills
Category
Office & Documents
First seen
Jun 3, 2026

More from cookjohn/cnki-skills

All 10
1inference-sh avatarelevenlabs-sttinference-sh/skillsElevenLabs speech-to-text with Scribe models and forced alignment via inference.sh CLI. Models: Scribe v1/v2 (98%+ accuracy, 90+ languages). Capabilities: trans776skills.sh installs
2alirezarezvani avatarcontract-and-proposal-writeralirezarezvani/claude-skillsGenerate professional, jurisdiction-aware business documents: freelance contracts, project proposals, SOWs, NDAs, and MSAs. Structured Markdown output with docx772skills.sh installs
3joellewis avatarfinancial-planning-workflowjoellewis/finance_skillsOrchestrate the advisor workflow for assembling and delivering a comprehensive financial plan — data gathering, cash flow analysis, retirement modeling, Monte C751skills.sh installs
4product-on-purpose avatarfoundation-stakeholder-updateproduct-on-purpose/pm-skillsProduces async communication to stakeholders, primarily non-attendees and secondarily some attendees who want a reference. Translates meeting outcomes into what742skills.sh installs
5alirezarezvani avatardemo-videoalirezarezvani/claude-skillsUse when the user asks to create a demo video, product walkthrough, feature showcase, animated presentation, marketing video, or GIF from screenshots or scene d736skills.sh installs
6joellewis avataradvertising-compliancejoellewis/finance_skillsEnsure investment advertising and marketing materials comply with SEC Marketing Rule and FINRA Rule 2210. Use when the user asks about performance advertising, 722skills.sh installs