literature-curator-skill
Skill1 starsChanged 2 months agoApache-2.0View on GitHub
面向文献检索与文献库建设的技能:根据研究方向/研究内容/零散检索词自动提炼关键词与概念块,为 PubMed、Europe PMC、arXiv、OpenAlex、Crossref、Semantic Scholar、bioRxiv/medRxiv、Google Scholar 生成各自的高级检索式并并行检索,再把结果去重合并、核验 DOI、补齐元数据、获取全文线索并保存成可复用的文献库(library.json / library.md / library.bib + fulltext/)。当用户要求查文献、找文献、生成检索式、多库检索、去重查重、核对 DOI、下载全文、建立/更新文献库、为后续阅读总结写作准备文献集合时使用。不负责把文献写成综述/论文/申请书(交给写作类技能),也不负责选刊投稿(交给选刊类技能)。
- Reads credentials
In this repository4 other files it gives its agents.
- match-journal-skillSkill
- nature-polishingSkill
- paper-reader-skillSkill
- scholar-skillSkill
The file
Files
literature-curator-skill
把"一个研究方向"变成"一份可复用、可审计、可继续增值的文献库"。技能固定为五步,按顺序执行;每一步都有确定性脚本支撑,避免每次重写同样的代码。
1. 明确检索需求(先问清范围)
开始检索前确认四件事,缺失的用合理默认值并在交付说明中写明:
| 项 | 默认 | 说明 |
| 研究问题/方向 | 用户给出 | 一句话问题 + 关键概念 |
| 时间范围 | 近 6 年 | 综述类可放宽到 10 年 |
| 语言/文献类型 | 不限 | 加类型过滤会显著降低命中数,初筛通常留空 |
| 规模与数据库 | 每库 50 条 | 精读用小规模,调研用大规模 |
2. 关键词分析 → 概念块
读 references/keyword-analysis.md,把研究方向拆成 2~4 个概念块(块内 OR、块间 AND),逐块扩受控词、自由词、同义词、缩写、拼写变体、中英译法。
# MeSH 受控词与入口词 + 本地词形变体(--offline 时不联网)
python scripts/expand_terms.py --mesh "machine learning" --mesh "colorectal neoplasms" --out candidates.json
python scripts/expand_terms.py --terms "gut microbiome, 16S rRNA" --offline脚本给的是候选,最终词表由你判断后写入 assets/search_plan.template.json 结构的 search_plan.json。同时按 assets/keyword-matrix.template.md 产出关键词矩阵。
3. 生成各库高级检索式并校准命中量
构造某个数据库的检索式前,必须先读它对应的语法说明,按其中的字段标签、布尔运算符与陷阱编写:
| 数据库 | 配置键 | 何时使用 | 语法说明 |
| PubMed | pubmed | 生物医学首选,题录精确 | references/databases/pubmed.md |
| Europe PMC | europepmc | 全字段检索、PMC 全文、预印本 | references/databases/europepmc.md |
| arXiv | arxiv | 计算机/物理/数学/定量生物预印本 | references/databases/arxiv.md |
| OpenAlex | openalex | 跨学科补全、被引与 OA 状态 | references/databases/openalex.md |
| Crossref | crossref | DOI 核验与书目补全(非精确检索源) | references/databases/crossref.md |
| Semantic Scholar | semantic_scholar | 引用网络与 OA PDF 补充 | references/databases/semantic_scholar.md |
| bioRxiv / medRxiv | biorxiv | 生命科学、临床预印本(本地关键词过滤) | references/databases/biorxiv.md |
| Google Scholar | google_scholar | 灰色文献补充(不稳定,失败不阻塞) | references/databases/google_scholar.md |
python scripts/build_queries.py --plan search_plan.json --outdir runs/<slug> --probebuild_queries.py 依据 assets/query-templates.json 组装各库语法(PubMed 的 [tiab]/[mh]、Europe PMC 的 TITLE_ABS:、arXiv 的 abs: 与 ANDNOT、OpenAlex 的 filter=title_and_abstract.search:(...)、Crossref/S2 的关键词形式),产出 search_config.json 与 strategy.md。--probe 会给出各库命中数并按"过宽/合适/偏窄/过窄"给判断,据此调整后再执行正式检索。
4. 并行检索
python scripts/search_literature.py --config runs/<slug>/search_config.json \
--plan runs/<slug>/search_plan.json --outdir runs/<slug> --parallel 4
python scripts/search_literature.py --config ... --refresh # 忽略缓存重跑- 逐库并发、按主机限速、单库失败不阻塞整体(失败原因写入
raw/<db>.json与retrieval_log.md)。 - 结果按"库 + 检索式 + 年份 + 条数"缓存,中断后可续跑。
- 产物:
raw/<database>.json、all_records.json、retrieval_log.md。
5. 整理、核验与入库
python scripts/curate_library.py --indir runs/<slug> --topic "<主题>"
python scripts/curate_library.py --indir runs/<slug> --no-network # 完全离线整理
python scripts/curate_library.py --indir runs/<slug> --merge-existing runs/old/library.json
python scripts/fetch_fulltext.py --library runs/<slug>/library.json --limit 20整理规则(去重判定、DOI 核验阈值、全文获取阶梯、质量标记)见 references/curation-pipeline.md,产物字段见 references/library-format.md。
产物:merged.json、library.json、library.md、library.bib、curation_report.md、fulltext/。curate_library.py --download 也可一步完成下载。
所有产物默认落在当前工作目录的 runs/<slug>/ 下(用户指定目录时以用户指定为准),目录结构见 references/library-format.md。
硬性约束
- DOI 必须核验,绝不臆造。核验不通过就标记
mismatch/unresolved并保留原文,绝不填写猜测值。 - 不绕过付费墙,不使用文献海盗站镜像;拿不到全文时如实标为
abstract_only/unavailable并保留链接。 - 检索式必须按对应数据库语法生成,改写
assets/query-templates.json或search_config.json后要重新--probe。 - 每个库的失败、限流、未扫描范围(如 bioRxiv 只扫了前若干页)都要写进
curation_report.md,不得静默省略。 - 首次使用批量接口前设置环境变量(见
scripts/requirements.txt注释):NCBI_API_KEY、S2_API_KEY、CURATOR_MAILTO、UNPAYWALL_EMAIL;缺失时脚本自动降级并在报告中说明。 - 只依赖 Python 标准库(仅 Google Scholar 需可选安装
scholarly),不需要额外环境即可运行其余全部功能。
交付与下游衔接
交付时给出:检索了哪些库、各库命中数、去重后条数、DOI 核验结果、全文可得率、产物路径、以及需要人工确认的条目(疑似重复、mismatch、撤稿标记)。
后续任务直接读 library.json:精读/翻译用 fulltext.path(PDF 或 Europe PMC 全文 XML),写作/综述用 doi/venue/year/authors 与 tags,投刊匹配用题录与摘要。同一主题再次检索时用 --merge-existing 增量更新,保留已有 tags/notes/fulltext。
资源索引
literature-curator-skill/
├── SKILL.md
├── references/
│ ├── keyword-analysis.md 概念块、扩词顺序、命中量校准
│ ├── curation-pipeline.md 去重、DOI 核验、全文阶梯、质量标记
│ ├── library-format.md library.json 字段契约与下游消费
│ └── databases/ 8 个数据库的高级检索语法说明
│ ├── pubmed.md europepmc.md arxiv.md openalex.md
│ └── crossref.md semantic_scholar.md biorxiv.md google_scholar.md
├── assets/
│ ├── query-templates.json 各库检索式组装模板(可改,无需改代码)
│ ├── search_plan.template.json 检索计划模板(build_queries.py 的输入)
│ ├── keyword-matrix.template.md 关键词矩阵交付物模板
│ ├── curation-report.template.md 整理报告模板
│ └── library.template.json 文献库单条记录模板
└── scripts/
├── expand_terms.py MeSH 与词形变体扩展
├── build_queries.py 生成各库检索式 + 命中量探针
├── search_literature.py 并行检索(含缓存、断点续跑)
├── curate_library.py 合并去重、DOI 核验、元数据补全、全文线索、导出
├── fetch_fulltext.py 下载 OA 全文(PDF 或 Europe PMC 全文 XML)
├── _common.py / _sources.py 共享工具与各数据库后端
└── requirements.txt 可选依赖与环境变量说明Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

