Token导航 LogoToken导航TokenDH.com
研究检索external-servicegithub未标认证来源可访问许可证需确认审计提醒

cnki-export中国知网导出

Agent Skill

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

总安装

1,283

周安装

54

GitHub Stars

245

下载量

449
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:cnki-export(中国知网导出)
来源仓库:https://github.com/cookjohn/cnki-skills
仓库路径:skills/cnki-export
安装命令:
npx skills add https://github.com/cookjohn/cnki-skills --skill cnki-export
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/cookjohn/cnki-skills --skill cnki-export

简介

cnki-export 支持将中国知网的论文引用信息导出为 RIS 文件或推送至 Zotero,便于文献管理。

  • 适用于学术研究中的引用整理与文献库维护,兼容主流文献管理工具。
  • 可在搜索结果页批量导出,也支持单篇处理,输出格式包括 GB/T 7714 标准文本。
  • 使用前请确认是否具备 CNKI 访问权限及 Zotero API 配置,避免因认证问题导致失败。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

CNKI Export & Zotero Integration

Export paper citation data from CNKI and push directly to Zotero, or save as RIS file.

Arguments

  • zotero (default) — push to Zotero desktop via local API
  • ris — save as.ris file
  • gb — output GB/T 7714 citation text
  • Optionally include a paper URL

Mode Selection

Choose the right mode based on context:

ContextModeTool calls
On a paper detail pageSingle export (Step 1A)1 evaluate + 1 bash = 2
On a search results page, save all/selectedBatch export (Step 1B)1 evaluate + 1 bash = 2
Need to search then saveUse cnki-search first, then batch export4 total

Always prefer batch export (1B) when multiple papers need saving. It avoids navigating to each detail page (saves ~3 calls per paper).

Steps

1A. Single export: from paper detail page

Use mcp__chrome-devtools__evaluate_script:

async () => {
  const url = document.querySelector('#export-url')?.value;
  const params = document.querySelector('#export-id')?.value;
  const uniplatform = new URLSearchParams(window.location.search).get('uniplatform') || 'NZKPT';
  if (!url || !params) return { error: 'Not on a paper detail page' };

  const resp = await fetch(url, {
    method: 'POST',
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
    body: new URLSearchParams({ filename: params, displaymode: 'GBTREFER,elearning,EndNote', uniplatform })
  });
  const data = await resp.json();
  if (data.code !== 1) return { error: data.msg };

  const result = {};
  for (const item of data.data) {
    result[item.mode] = item.value[0];
  }

  const body = document.body.innerText;
  result.pageUrl = window.location.href;
  result.issn = body.match(/ISSN[::]\s*(\S+)/)?.[1] || '';
  result.dbcode = document.querySelector('#paramdbcode')?.value || '';
  result.dbname = document.querySelector('#paramdbname')?.value || '';
  result.filename = document.querySelector('#paramfilename')?.value || '';

  return result;
}

1B. Batch export: from search results page (PREFERRED for multiple papers)

On any CNKI search results page, extract checkbox values and call the export API directly — no need to navigate to detail pages.

Key discovery: input.cbItem checkbox value === detail page #export-id (same encrypted ID).

Use mcp__chrome-devtools__evaluate_script:

async () => {
  const API_URL = 'https://kns.cnki.net/dm8/API/GetExport';

  // Get all checkbox values (= export encrypted IDs)
  const checkboxes = document.querySelectorAll('.result-table-list tbody input.cbItem');
  const rows = document.querySelectorAll('.result-table-list tbody tr');

  if (checkboxes.length === 0) return { error: 'No results on page' };

  const allPapers = [];
  for (let i = 0; i < checkboxes.length; i++) {
    const exportId = checkboxes[i].value;
    const paperUrl = rows[i]?.querySelector('td.name a.fz14')?.href || '';

    const resp = await fetch(API_URL, {
      method: 'POST',
      headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
      body: new URLSearchParams({ filename: exportId, displaymode: 'GBTREFER,elearning,EndNote', uniplatform: 'NZKPT' })
    });
    const data = await resp.json();
    if (data.code === 1) {
      const result = {};
      for (const item of data.data) { result[item.mode] = item.value[0]; }
      result.pageUrl = paperUrl;
      // Extract ISSN from ENDNOTE %@ field
      const issnMatch = result.ENDNOTE?.match(/%@\s*([^\s<]+)/);
      result.issn = issnMatch ? issnMatch[1] : '';
      result.dbcode = 'CJFQ';
      result.dbname = '';
      result.filename = '';
      allPapers.push(result);
    }
  }

  return allPapers; // JSON array, directly writable to file for Python script
}

To export only specific papers (e.g. #1, #3, #5), filter by index:

// Replace the for loop condition:
const indices = [0, 2, 4]; // 0-indexed: papers #1, #3, #5
for (let i = 0; i < checkboxes.length; i++) {
  if (!indices.includes(i)) continue;
  // ... rest same
}

2. Push to Zotero

Save the export data (single object or JSON array) to a temp file, then run the Python script:

python "e:/cnki/.claude/skills/cnki-export/scripts/push_to_zotero.py" /tmp/papers.json

The Python script handles both single paper {} and batch [{}, {},...] JSON input.

  • UTF-8 encoding (avoids Windows encoding issues)
  • Parsing ELEARNING format into Zotero item fields
  • Calling POST http://127.0.0.1:23119/connector/saveItems
  • Returns: 201 = success, 500 = error, 0 = Zotero not running

3. Report result

Single:

已将论文添加到 Zotero:
  标题: {title}
  作者: {authors}
  期刊: {journal}

GB/T 7714 引用: {gbt_citation}

Batch:

已批量添加 {count} 篇论文到 Zotero:
  1. {title1} ({journal1})
  2. {title2} ({journal2})
  ...

Export API Reference

ParameterValueSource
API URLhttps://kns.cnki.net/dm8/API/GetExportFixed, works from any page
filenameEncrypted IDDetail page: #export-id; Results page: input.cbItem value
displaymodeGBTREFER,elearning,EndNoteComma-separated modes
uniplatformNZKPTRequired

Verified selectors

ElementSelectorPage
Export URL#export-urlDetail page only
Export ID#export-idDetail page only
Checkbox (= export ID)input.cbItemSearch results page
Result rows.result-table-list tbody trSearch results page
Title linktd.name a.fz14Search results page

Zotero API Reference

POST http://127.0.0.1:23119/connector/saveItems
Content-Type: application/json
X-Zotero-Connector-API-Version: 3

Response: 201 = created, 500 = error Collection: Saves to Zotero's currently selected collection.

Query collections:

python "e:/cnki/.claude/skills/cnki-export/scripts/push_to_zotero.py" --list

Important Notes

  • Windows encoding: Must use Python script, cannot pass Chinese JSON via bash/curl directly
  • Zotero must be running: localhost:23119 requires Zotero desktop in background
  • Chinese authors: Use name field (single field, not split), creatorType: "author"
  • Batch export saves ~90% tool calls: 9 papers: 33 calls → 3 calls
  • CNKI Export API: filename must be encrypted ID (#export-id or input.cbItem value), NOT #paramfilename

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.28%
按下载量换算149

Claude

32.68%
按下载量换算147

Cursor

17.66%
按下载量换算79

Gemini CLI

10.5%
按下载量换算47

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

可疑

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills