一键导入
cnki-export
Export paper from CNKI and push to Zotero, or save as RIS file. Use when user wants to save a paper to Zotero or export citation data.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Export paper from CNKI and push to Zotero, or save as RIS file. Use when user wants to save a paper to Zotero or export citation data.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Multi-source literature search, citation verification, MeSH search strategy, citation file management (.nbib/.ris/.bib conversion), and reference management (BibTeX, related articles, ID conversion) via MCP tools (PubMed, CrossRef, arXiv). Use when the user needs coordinated multi-step literature workflows beyond a single MCP call.
Add strict Nature/CNS citations to manuscript text by splitting long passages into citable segments, searching only accepted flagship and subjournal titles from Nature Portfolio, the AAAS Science family, and Cell Press, filtering by publication time range, and exporting one reference-manager-ready output by default. Use this skill whenever the user asks to input text and automatically get references, add citations to a paragraph/manuscript, find Nature-series or CNS support for statements, create text-to-reference correspondence, "分段引用", "自动给出引用", "Nature系列引用", "CNS及子刊", "支撑文献", "补引用", "找引用", or export EndNote/RIS/ENW/Zotero RDF.
Prepare, audit, or revise Nature-ready Data Availability statements, data repository plans, dataset citations, and FAIR metadata checklists for manuscripts. Use when the user asks about Nature data availability, research data sharing, repository selection, accession numbers, restricted or sensitive data, source data, supplementary datasets, DataCite-style dataset references, FAIR metadata for academic publication, or Chinese-to-English data availability wording for Chinese-speaking authors preparing Nature-family submissions.
Submission-grade Nature/high-impact journal figure workflow for Python or R. Use whenever the user asks to create, revise, audit, or polish manuscript figures, multi-panel scientific plots, figures4papers-style matplotlib plots, or journal-ready SVG/PDF/TIFF outputs, especially for Nature-family or other high-impact journals. Before plotting, define the figure's conclusion, evidence logic, export needs, and review risks. If the user has not chosen Python or R, ask "Python or R?" and stop. Use only the selected backend for figure generation, previewing, exporting, and QA. Supports matplotlib/seaborn and ggplot2/patchwork/ComplexHeatmap. Not for dashboards or Illustrator/Figma-first infographics.
Build a complete but efficient Nature-style Chinese PPTX presentation from a scientific paper, preprint, PDF, article text, abstract, figure legends, or reading notes. Use this skill whenever the user asks to make slides/PPT/PPTX for journal club, group meeting, paper sharing, thesis seminar, lab meeting, department report, or academic presentation from a research paper, not only medical papers. It identifies the paper type and argument, selects only the figures needed for the story, writes Chinese slide content and speaker notes, creates the actual .pptx deck, and runs an explicit self-review/corrective revision loop focused on figure quality, text overflow prevention, and non-template visual design before delivery.
Polish, restructure, or translate academic prose into Nature-leaning English using writing-strategy principles, curated Nature/Nature Communications article patterns, and phrase-level support from Academic Phrasebank. Use whenever the user asks to polish a manuscript paragraph, abstract, introduction, results, discussion, conclusion, title, methods section, or Chinese academic draft for publication-quality English.
| name | cnki-export |
| description | Export paper from CNKI and push to Zotero, or save as RIS file. Use when user wants to save a paper to Zotero or export citation data. |
| argument-hint | [zotero|ris|gb] [paper URL or blank if on detail page] |
| version | 0.1.0 |
Export paper citation data from CNKI and push directly to Zotero, or save as RIS file.
zotero (default) — push to Zotero desktop via local APIris — save as .ris filegb — output GB/T 7714 citation textChoose the right mode based on context:
| Context | Mode | Tool calls |
|---|---|---|
| On a paper detail page | Single export (Step 1A) | 1 evaluate + 1 bash = 2 |
| On a search results page, save all/selected | Batch export (Step 1B) | 1 evaluate + 1 bash = 2 |
| Need to search then save | Use cnki-search first, then batch export | 4 total |
Always prefer batch export (1B) when multiple papers need saving. It avoids navigating to each detail page (saves ~3 calls per paper).
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;
}
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
}
Save the export data (single object or JSON array) to a temp file, then run the Python script:
python scripts/push_to_zotero.py /tmp/papers.json
The Python script handles both single paper {} and batch [{}, {}, ...] JSON input.
POST http://127.0.0.1:23119/connector/saveItemsSingle:
已将论文添加到 Zotero:
标题: {title}
作者: {authors}
期刊: {journal}
GB/T 7714 引用: {gbt_citation}
Batch:
已批量添加 {count} 篇论文到 Zotero:
1. {title1} ({journal1})
2. {title2} ({journal2})
...
| Parameter | Value | Source |
|---|---|---|
| API URL | https://kns.cnki.net/dm8/API/GetExport | Fixed, works from any page |
| filename | Encrypted ID | Detail page: #export-id; Results page: input.cbItem value |
| displaymode | GBTREFER,elearning,EndNote | Comma-separated modes |
| uniplatform | NZKPT | Required |
| Element | Selector | Page |
|---|---|---|
| Export URL | #export-url | Detail page only |
| Export ID | #export-id | Detail page only |
| Checkbox (= export ID) | input.cbItem | Search results page |
| Result rows | .result-table-list tbody tr | Search results page |
| Title link | td.name a.fz14 | Search results page |
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 scripts/push_to_zotero.py --list
localhost:23119 requires Zotero desktop in backgroundname field (single field, not split), creatorType: "author"filename must be encrypted ID (#export-id or input.cbItem value), NOT #paramfilename