Introduction¶
PDFs downloaded in bulk from CNKI often have random filenames, only containing year and month, or are inconsistent with local library rules. Manually checking and renaming hundreds of files against the search page is slow and prone to errors regarding the publication date. If you want to trigger batch renaming with a single sentence in an Agent, unify dates to YYYYMMDD, and ensure filenames correspond to titles, here is an introduction to the community Skill cnki-batch-rename on SkillHub.
What is this¶
cnki-batch-rename is an office-efficiency-oriented Agent Skill, located at @user_28a3fa40/cnki-batch-rename, current version 1.0.0, source community, published by user_28a3fa40 (the page indicates the author is Zhenbin Huang). It does not replace the CNKI client itself but, given you already have a “CNKI downloaded PDF folder,” verifies information via browser automation in CNKI search results and then batch-renames local files. The tag indicates requires_api_key=false, meaning installation and usage do not rely on an extra API Key.
Core Capabilities¶
The following capabilities come from the public description of this Skill on SkillHub / skillhub search and can be verified against the official entry:
- Unified Naming Format: Renames CNKI downloaded PDFs to
YYYYMMDD_Title.pdf. - Complete Precise Date: Extracts the Online Publication Date from CNKI search results and writes it as
YYYYMMDD; suitable for cases where the original file or metadata only has year and month precision. - Thesis Type: Identifies thesis types (Master’s/PhD, etc.) to serve the context of search and naming.
- Implementation: Uses Playwright for browser automation to obtain date and other information from the page during the CNKI search process, rather than guessing solely based on the local filename.
Installation and Activation¶
Before installation, confirm that skillhub CLI is available on your machine; if not, install it using the official script as per the SkillHub installation documentation:
command -v skillhub && skillhub --version
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash
The Skill must be installed into the skills directory recognized by the current Agent; otherwise, if it defaults to ./skills/, it may not be loaded. Refer to the official prompt from the search results for the installation command:
skillhub install cnki-batch-rename --namespace user_28a3fa40 --dir <your Agent skills directory>
Examples of skills directories for common Agents (extracted from SkillHub installation instructions, choose one based on your actual environment):
| Agent | Skills Directory Example |
|---|---|
| Cursor | ~/.cursor/skills/ |
| Claude Code | ~/.claude/skills/ |
| Codex | ~/.codex/skills/ or .agents/skills/ under the project |
The SkillHub skill page also states: Please refer to SkillHub Installation and Priority Source Configuration to install @user_28a3fa40/cnki-batch-rename. After installation, the Agent usually needs to reload skills (depending on the instructions for the client you are using).
Typical Usage¶
- Place the CNKI downloaded PDFs in the same folder (or a path easily accessible to the Agent).
- Explain the goal in the conversation: for example, changing all to
YYYYMMDD_Title.pdf, with dates based on the CNKI Online Publication Date. - The Agent calls Playwright to access CNKI, search for the corresponding literature, and batch rename them according to the Skill’s instructions.
The built-in usage tip for the Skill is: use it when you have a batch of CNKI papers that need to be unified to the “Date + Title” format, or when existing files only have year and month and need to be completed to a specific publication date.
Suitable Scenarios and Notes¶
Suitable for:
- Organizing literature and unifying local PDF naming before writing a review;
- Downloaded filenames are unreadable, but the title is roughly known, and the publication date needs to be verified on the CNKI side;
- Not wanting to write scripts manually to maintain the interaction logic between Playwright and the CNKI pages.
Notes:
- Relies on browser automation to access CNKI, requiring Playwright and the corresponding browser environment to run locally; network and site structure changes may affect automation steps.
- Batch searching and renaming takes time proportional to the number of documents; it is advisable to verify the naming rules against your collection naming conventions on a small sample first.
- Community Skill (
source: community), behavior is based onSKILL.mdinside the Skill package and version 1.0.0; before upgrading, you can check on SkillHub if there is a newer version. - Please comply with the CNKI and user agreements, and only rename locally for literature you have the right to save.
Conclusion¶
cnki-batch-rename encapsulates the task of “CNKI publication date + unified filename” into an Agent-callable Skill, saving the cost of writing Playwright scripts and renaming files one by one. Official entry points:
- API:
https://api.skillhub.cn/user_28a3fa40/cnki-batch-rename - SkillHub Page:
https://www.skillhub.cn/skills/user_28a3fa40/cnki-batch-rename