# Cnki Paper Detail

Extract full paper details from a CNKI paper page including title, authors...

- Repository: https://github.com/cookjohn/cnki-skills (1031 stars)
- Category: Engineering
- License: see repository
- Last updated: 2026-03-13
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add cookjohn/cnki-skills --skill cnki-paper-detail -g -a claude-code -y`
Codex: `npx skills add cookjohn/cnki-skills --skill cnki-paper-detail -g -a codex -y`
Cursor: `npx skills add cookjohn/cnki-skills --skill cnki-paper-detail -g -a cursor -y`
Gemini CLI: `npx skills add cookjohn/cnki-skills --skill cnki-paper-detail -g -a gemini-cli -y`

## Description

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.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# CNKI Paper Detail Extraction

Extract complete metadata from a CNKI paper detail page.

## Arguments

`$ARGUMENTS` is optionally a CNKI paper detail URL (containing `kcms2/article/abstract`). If not provided, assumes the current page is already a paper detail page.

## Steps

### 1. Navigate to the paper page (if URL provided)

If `$ARGUMENTS` contains a URL:
- Use `mcp__chrome-devtools__navigate_page` with the URL.
- Use `mcp__chrome-devtools__wait_for` with text `["摘要"]` and timeout 15000.

### 2. Check for captcha

Use `mcp__chrome-devtools__take_snapshot`. If "拖动下方拼图完成验证" found, notify user:

> CNKI 正在显示滑块验证码。请在 Chrome 浏览器中手动完成拼图验证，完成后告诉我继续。

### 3. Extract paper metadata via JavaScript

Use `mcp__chrome-devtools__evaluate_script` with this function:

```javascript
() => {
  const brief = document.querySelector('.brief');
  if (!brief) return { error: 'Paper detail section (.brief) not found' };

  // Title
  const title = brief.querySelector('h1')?.innerText?.trim()
    ?.replace(/\s*附视频\s*$/, '')  // remove "附视频" suffix
    ?.replace(/\s*网络首发\s*$/, ''); // remove "网络首发" suffix

  // Authors - first h3.author contains author links with sup tags
  const authorH3s = brief.querySelectorAll('h3.author');
  const authorSection = authorH3s[0];
  const authors = [];
  if (authorSection) {
    const authorLinks = authorSection.querySelectorAll('a');
    authorLinks.forEach(a => {
      const name = a.innerText?.replace(/\d+$/, '').trim();
      const supMatch = a.innerText?.match(/(\d+)$/);
      const affiliationNum = supMatch ? supMatch[1] : '';
      authors.push({ name, affiliationNum });
    });
  }

  // Affiliations - second h3.author contains org links
  const affiliations = [];
  if (authorH3s.length > 1) {
    const orgLinks = authorH3s[1].querySelectorAll('a');
    orgLinks.forEach(a => {
      affiliations.push(a.innerText?.trim());
    });
  }

The rest: https://github.com/cookjohn/cnki-skills/blob/HEAD/skills/cnki-paper-detail/SKILL.md
