Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
cookjohn avatar

Cnki Advanced Search

  • 615 installs
  • 811 repo stars
  • Updated March 13, 2026
  • cookjohn/cnki-skills

cnki-advanced-search is an agent skill that runs precise, field-filtered searches on the CNKI academic database for Chinese-language papers, theses, and journal articles.

About

cnki-advanced-search is a cookjohn/cnki-skills agent skill that parses natural-language search criteria and executes filtered queries on CNKI's advanced search interface. It supports subject, title, keyword, and author fields plus date ranges and source category filters such as SCI, EI, CSSCI, and 北大核心. The skill targets developers and researchers gathering Chinese-language academic literature who need precision beyond simple keyword search. It uses CNKI's old-style advanced search interface because that is the only UI exposing source category checkboxes. Invoke it when an agent must retrieve theses, journal articles, or conference papers with explicit bibliographic constraints.

  • Performs advanced CNKI search using the legacy interface that supports source category checkboxes (SCI/EI/CSSCI/北大核心).
  • Parses natural language search criteria into 8 targeted fields including author, title, journal, date range and subject
  • Automates browser navigation to https://kns.cnki.net/kns/AdvSearch?classid=7NS01R8M followed by a single async evaluate_
  • Supports multi-row Boolean logic and specific field selectors such as #au_1_value1, #magazine_value1, #startYear and #en

Cnki Advanced Search by the numbers

  • 615 all-time installs (skills.sh)
  • Ranked #1,567 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/cookjohn/cnki-skills --skill cnki-advanced-search

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs615
repo stars811
Last updatedMarch 13, 2026
Repositorycookjohn/cnki-skills

How do you run advanced filtered searches on CNKI?

Run precise, field-filtered searches on the CNKI academic database when gathering Chinese-language research papers, theses, and journal articles.

Who is it for?

Developers and researchers who need precise CNKI literature searches with author, journal, and source-category filters.

Skip if: English-only PubMed or Google Scholar searches unrelated to the CNKI Chinese academic database.

When should I use this skill?

A developer needs filtered CNKI results by author, journal, date range, or SCI/EI/CSSCI source category.

What you get

Filtered CNKI search results for Chinese-language papers, theses, and journal articles matching bibliographic criteria.

  • filtered CNKI paper results
  • bibliographic search queries

By the numbers

  • Supports 4 bibliographic search fields: subject, title, keyword, author
  • Filters across 4 source categories: SCI, EI, CSSCI, 北大核心

Files

SKILL.mdMarkdownGitHub ↗

CNKI Advanced Search (高级检索)

Perform a filtered search on CNKI using the old-style advanced search interface (only interface with source category checkboxes).

Arguments

$ARGUMENTS describes the search criteria in natural language. Parse it to identify:

  • Subject keywords (主题) — default field
  • Title keywords (篇名)
  • Keywords (关键词)
  • Author name (作者) — separate field #au_1_value1
  • Journal/source (文献来源) — separate field #magazine_value1
  • Date range (时间范围) — #startYear / #endYear
  • Source category (来源类别:SCI, EI, 北大核心, CSSCI, CSCD)

Steps

1. Navigate

Use mcp__chrome-devtools__navigate_pagehttps://kns.cnki.net/kns/AdvSearch?classid=7NS01R8M

2. Search + get results (single async evaluate_script)

Replace placeholder values with actual search criteria:

async () => {
  // --- Config: fill in actual values ---
  const query = "KEYWORDS";          // row 1 search keywords
  const fieldType = "SU";           // SU=主题, TI=篇名, KY=关键词, TKA=篇关摘, AB=摘要
  const query2 = "";                // row 2 keywords (optional, "" to skip)
  const fieldType2 = "KY";          // row 2 field type
  const rowLogic = "AND";           // AND=并且, OR=或者, NOT=不含 (between row 1 and 2)
  const sourceTypes = ["CSSCI"];    // any of: "SCI", "EI", "hx", "CSSCI", "CSCD" ([] = all)
  const startYear = "";             // e.g. "2020" or "" for no limit
  const endYear = "";               // e.g. "2025" or "" for no limit
  const author = "";                // author name or ""
  const journal = "";               // journal name or ""

  // --- Wait for form ---
  await new Promise((r, j) => {
    let n = 0;
    const c = () => { if (document.querySelector('#txt_1_value1')) 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' };

  const selects = Array.from(document.querySelectorAll('select')).filter(s => s.offsetParent !== null);

  // --- Source type: uncheck 全部, check targets ---
  if (sourceTypes.length > 0) {
    const gjAll = document.querySelector('#gjAll');
    if (gjAll && gjAll.checked) gjAll.click();
    for (const st of sourceTypes) {
      const cb = document.querySelector('#' + st);
      if (cb && !cb.checked) cb.click();
    }
  }

  // --- Row 1: field type + keyword ---
  selects[0].value = fieldType;
  selects[0].dispatchEvent(new Event('change', { bubbles: true }));
  const input = document.querySelector('#txt_1_value1');
  input.value = query;
  input.dispatchEvent(new Event('input', { bubbles: true }));

  // --- Row 2: field type + keyword (optional) ---
  if (query2) {
    selects[5].value = rowLogic; // row logic: AND/OR/NOT
    selects[5].dispatchEvent(new Event('change', { bubbles: true }));
    selects[6].value = fieldType2;
    selects[6].dispatchEvent(new Event('change', { bubbles: true }));
    const input2 = document.querySelector('#txt_2_value1');
    input2.value = query2;
    input2.dispatchEvent(new Event('input', { bubbles: true }));
  }

  // --- Author (optional) ---
  if (author) {
    const auInput = document.querySelector('#au_1_value1');
    if (auInput) { auInput.value = author; auInput.dispatchEvent(new Event('input', { bubbles: true })); }
  }

  // --- Journal (optional) ---
  if (journal) {
    const magInput = document.querySelector('#magazine_value1');
    if (magInput) { magInput.value = journal; magInput.dispatchEvent(new Event('input', { bubbles: true })); }
  }

  // --- Date range (optional) ---
  if (startYear) { selects[14].value = startYear; selects[14].dispatchEvent(new Event('change', { bubbles: true })); }
  if (endYear) { selects[15].value = endYear; selects[15].dispatchEvent(new Event('change', { bubbles: true })); }

  // --- Submit ---
  document.querySelector('div.search')?.click();

  // Wait for results
  await new Promise((r, j) => {
    let n = 0;
    const c = () => {
      if (document.body.innerText.includes('条结果')) r();
      else if (n++ > 40) j('timeout');
      else setTimeout(c, 500);
    };
    setTimeout(c, 2000);
  });

  // Captcha check again
  const cap2 = document.querySelector('#tcaptcha_transform_dy');
  if (cap2 && cap2.getBoundingClientRect().top >= 0) return { error: 'captcha' };

  return {
    query, fieldType, query2, fieldType2, rowLogic,
    sourceTypes, startYear, endYear, author, journal,
    total: document.querySelector('.pagerTitleCell')?.innerText?.match(/([\d,]+)/)?.[1] || '0',
    page: document.querySelector('.countPageMark')?.innerText || '1/1',
    url: location.href
  };
}

3. Report

Advanced search: "{query}" ({fieldType}) + source: {sourceTypes} → {total} results.

Tool calls: 2 (navigate + evaluate_script)

Verified selectors (old-style interface)

Form fields

ElementSelector / Select indexNotes
行1 字段类型selects[0]SU=主题, TI=篇名, KY=关键词, TKA=篇关摘, AB=摘要
行1 关键词#txt_1_value1main keyword input
行1 行内第二词#txt_1_value2same-row AND/OR/NOT with first keyword
行1 行内逻辑selects[2]AND=并含, OR=或含, NOT=不含
行间逻辑selects[5]AND=并且, OR=或者, NOT=不含
行2 字段类型selects[6]same options as row 1
行2 关键词#txt_2_value1second row keyword
行2 行内第二词#txt_2_value2
作者#au_1_value1placeholder "中文名/英文名/拼音"
作者单位#au_1_value2placeholder "全称/简称/曾用名"
文献来源#magazine_value1placeholder "期刊名称/ISSN/CN"
基金#base_value1
起始年selects[14] / #startYear<select> 1915-2026
结束年selects[15] / #endYear<select> 2026-1915
检索按钮div.searchNOT input/button

Source type checkboxes (来源类型)

来源Checkbox IDNotes
全部期刊#gjAll默认勾选,选其他前需取消
SCI来源期刊#SCIvalue="Y"
EI来源期刊#EIvalue="Y"
北大核心期刊#hxvalue="Y"
CSSCI#CSSCIvalue="Y"
CSCD#CSCDvalue="Y"

Multiple source types can be checked simultaneously (OR logic).

Results

ElementSelectorNotes
Result count.pagerTitleCelltext "共找到 X 条结果"
Page indicator.countPageMarktext "1/300"

Captcha detection

Check #tcaptcha_transform_dy element's getBoundingClientRect().top >= 0.

Important Notes

  • Must use old-style URL (kns.cnki.net/kns/AdvSearch). New interface (kns8s/AdvSearch) has NO source category checkboxes.
  • The classid=7NS01R8M parameter ensures the correct form layout loads.
  • Results page is compatible with cnki-parse-results and cnki-navigate-pages skills.

Related skills

How it compares

Use cnki-advanced-search when CNKI field filters and Chinese source categories matter instead of generic web search skills.

FAQ

Which CNKI search fields does cnki-advanced-search support?

The cnki-advanced-search skill supports subject, title, keyword, and author fields, plus date ranges and source category filters including SCI, EI, CSSCI, and 北大核心 on CNKI's advanced search interface.

Why does cnki-advanced-search use the old CNKI interface?

The cnki-advanced-search skill uses CNKI's old-style advanced search interface because it is the only CNKI UI that exposes source category checkboxes needed for SCI, EI, CSSCI, and 北大核心 filtering.

AI & Agent Buildingresearchautomation

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.