Cnki Search
Search CNKI (中国知网) for papers by keyword.
Install
npx skills add cookjohn/cnki-skills --skill cnki-search -g -a claude-code -y- Repository
- cookjohn/cnki-skills1k
- Category
- Engineering
- Updated
- 8mo ago
- License
- See repository
- Context cost
- Lightabout 1,197 tokens
- Runs scripts
- No, instructions only
What it does
Search CNKI (中国知网) for papers by keyword. Use when the user wants to find academic papers on a topic.
CNKI Basic Search
Search CNKI for papers using keyword(s). Returns result count and structured result list (titles, URLs, authors, journal, date) in a single call.
Arguments
$ARGUMENTS contains the search keyword(s) in Chinese or English.
Steps
1. Navigate
Use mcp__chrome-devtools__navigate_page → https://kns.cnki.net/kns8s/search
2. Search + extract results (single evaluate_script, NO wait_for)
Replace YOUR_KEYWORDS with actual search terms:
async () => {
const query = "YOUR_KEYWORDS";
// Wait for search input (replaces wait_for)
await new Promise((r, j) => {
let n = 0;
const c = () => { if (document.querySelector('input.search-input')) r(); else if (++n > 30) j('timeout'); else setTimeout(c, 500); };
c();
});
// Check captcha (only if visible on screen, not hidden SDK at top:-1000000)
const outer = document.querySelector('#tcaptcha_transform_dy');
if (outer && outer.getBoundingClientRect().top >= 0) return { error: 'captcha' };
// Fill and submit (verified selectors: input.search-input, input.search-btn)
const input = document.querySelector('input.search-input');
input.value = query;
input.dispatchEvent(new Event('input', { bubbles: true }));
document.querySelector('input.search-btn')?.click();
// Wait for results
await new Promise((r, j) => {
let n = 0;
const c = () => { if (document.body.innerText.includes('条结果')) r(); else if (++n > 30) j('timeout'); else setTimeout(c, 500); };
c();
});
// Check captcha again
const outer2 = document.querySelector('#tcaptcha_transform_dy');
if (outer2 && outer2.getBoundingClientRect().top >= 0) return { error: 'captcha' };
