Install any skill in seconds. Free to start, no credit card required.
Get Started Free →多源文献聚合检索:PubMed + PMC + 预印本(bioRxiv / medRxiv / ChemRxiv / Research Square)+ NCBI Bookshelf + 专利 一次调用,自动 PMID/PMCID/DOI 三级去重。用于医学 RAG 知识库广召回、全文 OA 链接发现、资助信息检索。返回完整元数据(OA 链接、citations、grants)。定位:广召回 · 多源 · RAG 友好。与 pubmed-eutils 互补 —— 本 skill 做"撒网"式多源聚合,后者做单源精准 + Clinical Queries。不做:单源精准检索(→ pubmed-eutils)、全文 XML 抽取(→ bioc-fulltext-fetch)、实体识别(→ pubtator-entity-search)、证据分级(→ medical-evidence-grading)。
.claude/skills/ethanyoq-europepmc-search/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-05 | ✗→✓ | ▲ Improved | 174% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 134% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 101% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 151% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 234% | 0% |
Europe PMC RESTful Web Service 的薄封装。一次请求 = 多源召回:PubMed(MED)、PubMed Central(PMC)、AGRICOLA(AGR)、CABI(CBA)、预印本(PPR,涵盖 bioRxiv/medRxiv/ChemRxiv/arXiv 生命科学子集/Research Square/SSRN/Preprints.org)、专利(PAT)、NCBI Bookshelf(NBK)、ETHOS 论文集等。
跨平台 Python(Windows / macOS / Linux 均可),无需 Anaconda 锁定环境。
| 场景 | 用本 skill | 应改用 | |------|-----------|------| | RAG 知识库构建,需"撒网"式广召回 | ✅ | — | | 同时要 PubMed + 预印本 | ✅ | — | | 拿 DOI 反查全文 OA 链接 | ✅ | — | | 找特定基金(NIH/NSFC/Wellcome)资助的研究 | ✅(grant_id) | — | | 只要 PubMed 官方源 + Clinical Queries | ❌ | pubmed-eutils | | 抽取已知 PMCID 的全文 XML / 段落 | ❌ | bioc-fulltext-fetch | | 临床试验注册号检索 | ❌ | clinical-trials-v2 | | 实体(基因/疾病/化合物)关联 | ❌ | pubtator-entity-search | | 给文献排 GRADE 等级 | ❌ | medical-evidence-grading | | 报告 Appendix C 终态参考文献 | ❌ | evidence-appendix-sync |
与 pubmed-eutils 的差异化(必读):
pubmed-eutils 精准复核 → bioc-fulltext-fetch 取 OA 全文 → pubtator-entity-search 实体抽取 → medical-evidence-grading 分级 → evidence-appendix-sync 写入报告Europe PMC RESTful 是完全开放 API,无需 API key,但服务条款要求传 email 联系方式。
配置加载顺序(高到低):
.config/europepmc.local.yaml~/.config/europepmc.yamlEUROPEPMC_EMAILanonymous@example.org 并打印 ⚠️ 警告yaml# ~/.config/europepmc.yaml email: yong.qi.gpt@gmail.com default_page_size: 100 default_result_type: core # lite | core | idlist default_format: json timeout_seconds: 30 max_retries: 3
基础 URL:https://www.ebi.ac.uk/europepmc/webservices/rest/
| 端点 | 用途 | |------|------| | search | 通用检索(本 skill 主力) | | article/{source}/{id} | 单篇详情 | | {source}/{id}/fullTextXML | 全文 XML(仅 OA PMC 子集) | | {source}/{id}/references | 参考文献 | | {source}/{id}/citations | 被引列表 | | {source}/{id}/supplementaryFiles | 补充材料 | | grant/search | 资助检索 |
search_articlespythonfrom typing import Literal def search_articles( query: str, source_filter: list[str] | None = None, max_results: int = 200, sort: Literal["date", "cited"] | None = None, ) -> list[dict]: """通用多源检索,自动 cursorMark 分页拉满到 max_results。"""
source_filter:["MED","PMC","PPR"] 限定来源;None = 全部。详细来源代码见 references/source-filters.mdpmid / pmcid / doi / title / authors / journal / pub_year / abstract / source / is_preprint / preprint_server / has_full_text / oa_status / cited_by_count 等(完整 schema 见 §11)get_article_detailspythondef get_article_details(identifier: str) -> dict: """单篇完整元数据。identifier 自动识别: - 纯数字 → PMID(查 MED) - PMC 前缀 → PMCID(查 PMC) - 10. 开头 → DOI(用 query=DOI:"..." 反查) - PPR 前缀 → 预印本 ID(查 PPR) """
get_full_text_linkspythondef get_full_text_links(pmid_or_pmcid: str) -> dict[str, str | list[str] | None]: """返回所有可用全文链接,按类型分类: { "oa_xml": "...", # OA 子集才有 "oa_pdf": "...", "publisher_html": "...", "subscription": [...], # SUBSCRIPTION 类型 "text_mining": [...], # TM 类型 "preprint_server": "..." # 仅预印本 }"""
search_with_grantspythondef search_with_grants( query: str, grant_id: str | None = None, funder: str | None = None, ) -> list[dict]: """资助检索。Europe PMC 有专门的 GRANT_ID / FUNDER 字段。 例:search_with_grants(query="cancer", grant_id="R01-CA123456") search_with_grants(query="cardiology", funder="Wellcome Trust") """
find_similar_articlespythondef find_similar_articles(pmid_or_pmcid: str, limit: int = 20) -> list[dict]: """调用 Europe PMC 内置 'Similar Articles' 算法(MeSH + 文本相似度)。 比 PubMed elink neighbor 召回略广,适合 RAG 邻域扩展。"""
| 用户 prompt 示例 | 应否触发本 skill | |------------------|----------------| | "找血液 IFI 相关的 PubMed + PMC + 预印本聚合检索" | ✅ 触发 | | "给我所有支持论文的全文链接,包括 OA 状态" | ✅ 触发(get_full_text_links) | | "查特定 NIH grant R01CA255621 资助的肿瘤研究" | ✅ 触发(search_with_grants) | | "我做 RAG 知识库,需要广撒网召回 1000 条" | ✅ 触发 | | "DOI 10.1038/... 反查全文链接" | ✅ 触发(get_article_details + get_full_text_links) | | "我只要 PubMed 官方源的高精准查询 + Clinical Queries 过滤" | ❌ 改用 pubmed-eutils | | "查 PMC 文章 PMC10987654 的全文段落" | 部分:本 skill get_full_text_links 给链接 → 全文取用交 bioc-fulltext-fetch | | "给 200 篇文献排 GRADE 等级" | ❌ 改用 medical-evidence-grading(可链式接本 skill 输出) | | "找 NCT12345678 临床试验招募信息" | ❌ 改用 clinical-trials-v2 |
最常用字段速查(完整 cheatsheet 见 references/query-syntax.md):
| 字段 | 示例 | |------|------| | TITLE / TITLE_ABS | TITLE_ABS:"acute myeloid leukemia" | | AUTH | AUTH:"Smith J" | | JOURNAL | JOURNAL:"Nature" | | PUB_YEAR | PUB_YEAR:[2020 TO 2024] | | PUB_TYPE | PUB_TYPE:"Review" | | SRC | SRC:MED / SRC:PPR | | HAS_FT / OPEN_ACCESS | HAS_FT:Y AND OPEN_ACCESS:Y | | MESH | MESH:"Hematologic Neoplasms" | | GRANT_ID / FUNDER | GRANT_ID:"R01CA12345" | | DOI | DOI:"10.1038/s41586-020-2196-x" |
⚠️ 字段名 必须大写,title:foo 会被当成普通短语。
同一篇文章常在 MED + PMC + PPR 同时出现。去重规则按优先级:
superseded_by_pmid: <发表版 PMID>,下游 medical-evidence-grading 据此自动丢弃。每条 PPR 结果显式标注:
python{ "source": "PPR", "is_preprint": True, "preprint_server": "bioRxiv", # 或 medRxiv / ChemRxiv / Research Square / SSRN "preprint_doi": "10.1101/2024.03.15.123456", "posted_date": "2024-03-15", "version": 2 }
下游 medical-evidence-grading 看到 is_preprint=True 自动降权(GRADE 中作为 "very low" 起点)。本 skill 自身不做证据分级,只如实标注。
| ID | 故障 | 现象 | 处理 / 抛出 | |----|------|------|------------| | F1 | API 速率限制(429) | HTTP 429 + Retry-After | 指数退避 2^n + jitter,最多 max_retries=3;仍失败抛 EuropePMCRateLimitError | | F2 | 多源去重失败 | 同 DOI/PMID 出现多条未合并 | 走 _dedupe_three_tier() 强制去重;若三级 ID 都缺,按 (title 前 80 字 + first_author + pub_year) MD5 哈希再合并;无法合并则保留并标 dedup_warning=True | | F3 | 预印本未标记 | 结果里 source=="PPR" 但 is_preprint=False | 检测到 source==PPR 强制设 is_preprint=True,补 preprint_server 字段(从 publisher 字段映射);写 WARN log | | F4 | cursorMark 分页失败 | nextCursorMark 与上次相同但 hitCount 未取完 / 连续两次空响应 | 第一种正常终止;第二种抛 EuropePMCPaginationError,附最后一次 cursor 值便于断点续抓。详见 references/cursormark-pagination.md | | F5 | email 未配置警告 | 配置链 4 级全空 | 退化用 anonymous@example.org,首次请求前打印 ⚠️ WARN,提示用户配置 ~/.config/europepmc.yaml | | F6 | 查询语法错误 | HTTP 400 + errMsg | 抛 EuropePMCQueryError(errMsg),不静默吞;常见原因:字段名小写、引号未配对、AND/OR 未大写 | | F7 | 命中为 0 | HTTP 200 + hitCount=0 | 返回空列表 + WARN"无命中,建议放宽 query / 移除 source_filter / 检查字段大小写" | | F8 | 服务端 5xx / 超时 | HTTP 5xx 或 requests.Timeout | 指数退避重试 max_retries 次;仍失败抛 EuropePMCServerError | | F9 | 结果超 max_results | hitCount > max_results | 截断并在返回 dict 顶层设 truncated=True,附 last_cursor_mark 便于续抓 |
致命错误一律抛异常,不静默吞(遵循 coding-style.md 错误处理原则)。
pageSize=1000cursorMark(从 * 起),不要用 page= 偏移分页(>1000 条时官方不保证一致性)references/cursormark-pagination.md每篇文章返回的标准 schema(本 skill 是契约源 — bioc-fulltext-fetch / pubtator-entity-search / medical-evidence-grading / evidence-appendix-sync 都按此消费):
python{ "primary_id": "PMID:38123456" | "PMCID:PMC10987654" | "DOI:10.xxx/...", "all_ids": {"pmid": str|None, "pmcid": str|None, "doi": str|None, "ppr_id": str|None}, "title": str, "authors": [{"full_name": str, "affiliation": str|None, "orcid": str|None}], "journal": {"name": str, "iso_abbr": str|None, "issn": str|None}, "pub_year": int, "pub_date": "YYYY-MM-DD", "abstract": str|None, "mesh_terms": list[str], "keywords": list[str], "source": "MED" | "PMC" | "PPR" | "AGR" | "CBA" | "PAT" | "NBK", "sources_merged": list[str], # 去重前出现的所有源 "is_preprint": bool, "preprint_server": str|None, "preprint_doi": str|None, "version": int|None, "superseded_by_pmid": str|None, "has_full_text": bool, "oa_status": "OA" | "SUBSCRIPTION" | "UNKNOWN", "full_text_links": {"oa_xml": str|None, "oa_pdf": str|None, "publisher_html": str|None}, "cited_by_count": int, "grants": [{"grant_id": str, "agency": str, "country": str|None}], "fetched_at": "ISO-8601 UTC", "europepmc_url": "https://europepmc.org/article/MED/38123456" }
字段缺失用 None,不省略 key(下游解构稳定性)。
[用户问题]
│
├─→ europepmc-search ← 本 skill (广召回 200~1000 条 + 多源去重)
│ │
│ ├─→ pubmed-eutils ← 拿 PMID 子集精准复核 + Clinical Queries
│ │ │
│ │ └─→ bioc-fulltext-fetch ← OA PMC 全文 XML
│ │ │
│ │ └─→ pubtator-entity-search ← 实体识别
│ │ │
│ │ └─→ medical-evidence-grading ← GRADE 分级
│ │ (依据 is_preprint 自动降权)
│ │ │
│ │ └─→ evidence-appendix-sync ← 终下游(写 Appendix C)
│ │
│ └─→ medical-evidence-grading 也可直接消费本 skill 输出(跳过精准复核)
│
└─→ clinical-trials-v2 / aact-bulk-trials ← 试验注册号另走专线pythonfrom europepmc_search import EuropePMCClient cli = EuropePMCClient() # 自动加载 ~/.config/europepmc.yaml # 1) 广召回:急性髓系白血病近 5 年 PubMed + 预印本 hits = cli.search_articles( query='(TITLE:"acute myeloid leukemia" OR ABSTRACT:"AML") AND PUB_YEAR:[2020 TO 2025]', source_filter=["MED", "PPR"], max_results=500, sort="date", ) print(f"去重后 {len(hits)} 条,预印本 {sum(h['is_preprint'] for h in hits)} 条") # 2) DOI 反查全文链接 links = cli.get_full_text_links("10.1056/NEJMoa2024850") # 3) NIH R01 资助的 CAR-T 研究 ft = cli.search_with_grants(query="CAR-T", grant_id="R01CA255621") # 4) 邻域扩展(RAG) similar = cli.find_similar_articles("38123456", limit=30)
| 文件 | 内容 | |------|------| | references/query-syntax.md | 完整字段表 + 布尔/通配/邻近搜索 + 5 个常用查询配方 + 排序参数 | | references/source-filters.md | 全部 SRC 来源代码 + 量级 + 预印本子源(bioRxiv/medRxiv/...) + 选择策略 | | references/cursormark-pagination.md | cursorMark 流程伪代码 + 终止条件 + 退避策略 + 5 个常见坑 |
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-03 | pass→pass | 12,110 | 11,473 | -5% | 1 | 1 | 0% | 2,578 | 7,010 | +172% | 0 | 0 | — |
case-01 | pass→pass | 21,701 | 17,187 | -21% | 1 | 1 | 0% | 4,308 | 8,097 | +88% | 0 | 0 | — |
case-02 | pass→pass | 16,583 | 13,628 | -18% | 1 | 1 | 0% | 3,234 | 7,432 | +130% | 0 | 0 | — |
case-04 | fail→fail | 25,753 | 19,290 | -25% | 1 | 1 | 0% | 4,719 | 8,786 | +86% | 0 | 0 | — |
case-05 | fail→pass | 11,985 | 12,452 | +4% | 1 | 1 | 0% | 2,730 | 7,490 | +174% | 0 | 0 | — |
case-06 | fail→fail | 12,613 | 12,114 | -4% | 1 | 1 | 0% | 2,156 | 6,991 | +224% | 0 | 0 | — |
case-07 | fail→pass | 12,388 | 4,497 | -64% | 1 | 1 | 0% | 2,388 | 5,593 | +134% | 0 | 0 | — |
case-08 | fail→pass | 17,375 | 8,836 | -49% | 1 | 1 | 0% | 3,178 | 6,385 | +101% | 0 | 0 | — |
case-09 | fail→pass | 11,921 | 5,554 | -53% | 1 | 1 | 0% | 2,310 | 5,798 | +151% | 0 | 0 | — |
case-10 | pass→pass | 12,861 | 8,547 | -34% | 1 | 1 | 0% | 2,649 | 6,572 | +148% | 0 | 0 | — |
case-11 | fail→pass | 8,111 | 2,674 | -67% | 1 | 1 | 0% | 1,564 | 5,222 | +234% | 0 | 0 | — |
case-12 | fail→pass | 12,802 | 3,824 | -70% | 1 | 1 | 0% | 2,606 | 5,452 | +109% | 0 | 0 | — |
case-13 | fail→pass | 14,618 | 5,780 | -60% | 1 | 1 | 0% | 2,892 | 5,897 | +104% | 0 | 0 | — |
case-14 | fail→pass | 12,109 | 7,506 | -38% | 1 | 1 | 0% | 2,227 | 6,274 | +182% | 0 | 0 | — |
case-15 | fail→pass | 10,379 | 4,968 | -52% | 1 | 1 | 0% | 2,133 | 5,655 | +165% | 0 | 0 | — |
case-16 | pass→pass | 12,323 | 6,068 | -51% | 1 | 1 | 0% | 2,714 | 5,986 | +121% | 0 | 0 | — |
case-17 | fail→pass | 13,188 | 7,535 | -43% | 1 | 1 | 0% | 2,602 | 6,266 | +141% | 0 | 0 | — |
case-18 | fail→pass | 12,390 | 11,904 | -4% | 1 | 1 | 0% | 2,442 | 6,939 | +184% | 0 | 0 | — |
case-19 | fail→pass | 15,658 | 11,748 | -25% | 1 | 1 | 0% | 3,149 | 7,213 | +129% | 0 | 0 | — |
case-20 | fail→pass | 7,206 | 6,382 | -11% | 1 | 1 | 0% | 1,749 | 6,225 | +256% | 0 | 0 | — |
case-21 | fail→pass | 8,863 | 2,749 | -69% | 1 | 1 | 0% | 2,026 | 5,280 | +161% | 0 | 0 | — |
case-22 | fail→pass | 13,059 | 13,316 | +2% | 1 | 1 | 0% | 3,007 | 8,249 | +174% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +68 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.