[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M70DDC92M8BQ2BZY2ZH5860Y":3,"skill-same:01M70DDC92M8BQ2BZY2ZH5860Y":69},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":46,"commitSha":47,"skillDirectory":48,"forksCount":49,"repositoryHtmlUrl":50,"repositoryHomepageUrl":6,"ownerHtmlUrl":51,"ownerBlogUrl":52,"ownerDescription":53,"updatedAt":54,"install":55,"resources":68},"01M70DDC92M8BQ2BZY2ZH5860Y","pubtator-entity-search",null,"NLM PubTator3 实体级关系挖掘 — 检索\"疾病-药物-基因-化学品-突变\"在生物医学文献中的标注与关系。当用户问\"哪些研究讨论了 BTK 抑制剂与肺曲霉病\"、\"基因 X 与疾病 Y 的关联\"、\"药物-基因相互作用\"、\"找含某突变的文献\"、\"PubTator \u002F 实体标注 \u002F NER \u002F annotation \u002F biomedical entity \u002F 疾病基因关联 \u002F 药物-基因 \u002F 化学品-疾病 \u002F 突变检索\"时使用。无需 API key。**实体级 · 关系挖掘**定位 — 不做文献综合检索(用 pubmed-eutils \u002F europepmc-search)、不做全文(用 BioC)、不做试验(用 ct-v2)。","EthanYoQ\u002FSkill-hub","EthanYoQ","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F257484394?v=4","01M70C9QKWR1YS0S7V26DNB18H","Ethan","01M70C9QMER047R5ANZZA6KC2P",11,"MIT","https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Farchives\u002Fuser-installed-skills\u002Fpubtator-entity-search\u002F36ed1a3ea059827e\u002Fpubtator-entity-search\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"pubtator entity search","entity","search","CT","drugbank","biomedical","annotation","dbsnp","化学品-疾病","突变检索","疾病基因关联","药物-基因","entity-relation","pubtator3","biomedical-entity","pubtator","pubmed","api","ner","mesh","2026-11-10 10:12:30",false,"---\nname: pubtator-entity-search\ndescription: NLM PubTator3 实体级关系挖掘 — 检索\"疾病-药物-基因-化学品-突变\"在生物医学文献中的标注与关系。当用户问\"哪些研究讨论了 BTK 抑制剂与肺曲霉病\"、\"基因 X 与疾病 Y 的关联\"、\"药物-基因相互作用\"、\"找含某突变的文献\"、\"PubTator \u002F 实体标注 \u002F NER \u002F annotation \u002F biomedical entity \u002F 疾病基因关联 \u002F 药物-基因 \u002F 化学品-疾病 \u002F 突变检索\"时使用。无需 API key。**实体级 · 关系挖掘**定位 — 不做文献综合检索(用 pubmed-eutils \u002F europepmc-search)、不做全文(用 BioC)、不做试验(用 ct-v2)。\nkeywords:\n  - pubtator\n  - pubtator3\n  - biomedical-entity\n  - NER\n  - annotation\n  - entity-relation\n  - 疾病基因关联\n  - 药物-基因\n  - 化学品-疾病\n  - 突变检索\n  - mesh\n  - dbsnp\n  - drugbank\nlicense: MIT\n---\n\n# PubTator3 Entity & Relation Search\n\n封装 NLM PubTator3 RESTful API,用于在 PubMed 文献中做**实体级标注 + 关系挖掘**。\n聚焦\"疾病 - 药物 - 基因 - 化学品 - 突变 - 物种\"的联动检索,适合\"实体 X 与实体 Y 在文献中怎样被讨论\"这类问题。\n\n---\n\n## 1. 何时使用本技能\n\n**适合**:\n- \"哪些文献提到了 BTK 抑制剂用于侵袭性肺曲霉病\" — 实体 + 关系\n- \"基因 EGFR 在非小细胞肺癌中的相关研究\" — 共现 \u002F 关联\n- \"找出讨论 voriconazole 与 CYP2C19 相互作用的文献\" — 药物-基因\n- \"把这一组 PMID 里的疾病\u002F药物\u002F基因都标出来\" — 标注提取\n- \"ibrutinib 在文献中映射到哪个 MeSH\u002FDrugBank ID\" — 实体规范化\n\n**不适合(用其他技能)**:\n- 用 MeSH 树\u002F出版类型\u002FPubDate 做文献检索 → `pubmed-eutils` + Clinical Queries\n- 拿全文 XML\u002F段落 → `BioC` (BioC PubMed\u002FPMC)\n- 临床试验注册信息 → `ct-v2` (ClinicalTrials.gov)\n- 综合性自然语言检索 → `europepmc-search`\n\n---\n\n## 2. API 概览(无需 Key)\n\nBase URL: `https:\u002F\u002Fwww.ncbi.nlm.nih.gov\u002Fresearch\u002Fpubtator3-api\u002F`\n\nPubTator3 是 NLM 开放服务,**不需要 API key**,但请遵守速率限制(建议 ≤ 3 req\u002Fs,失败时退避)。\n\n核心端点:\n\n| 端点 | 用途 |\n|------|------|\n| `GET \u002Fsearch\u002F?text=\u003Cquery>` | 自由文本\u002F实体检索文献 |\n| `GET \u002Fpublications\u002Fexport\u002Fbiocjson?pmids=\u003Ccsv>` | 拉取 PMID 的实体标注 BioC-JSON |\n| `GET \u002Fentity\u002Fautocomplete\u002F?query=\u003Ctext>&concept=\u003Ctype>` | 实体规范化(text → ID) |\n| `GET \u002Frelations?e1=\u003Cid>&e2=\u003Cid>` | 关系\u002F共现挖掘 |\n\n文档: https:\u002F\u002Fwww.ncbi.nlm.nih.gov\u002Fresearch\u002Fpubtator3-api\u002F\n\n---\n\n## 3. 核心能力(5 个函数)\n\n### 3.1 `search_by_entity(entity_text, entity_type=None, max_results=50)`\n检索包含某实体的 PubMed 文献。\n\n```\nGET \u002Fsearch\u002F?text=@\u003CTYPE>_\u003CID> 或 ?text=\u003Cfree text>\n```\n示例:`text=@DISEASE_MESH:D055744` → 侵袭性曲霉病。\n返回 `{pmids:[...], score:[...]}`。\n\n### 3.2 `search_by_relation(entity1_id, relation_type, entity2_id)`\n检索表达\"实体1 — 关系 — 实体2\"的文献。\n\n```\nGET \u002Frelations?e1=\u003Cid1>&e2=\u003Cid2>&type=\u003Crelation>\n```\n返回涉及该关系的 PMID 列表 + 句级证据片段(若有)。\n\n### 3.3 `annotate_pmid(pmid_list)`\n给定 PMID 数组,返回标题 + 摘要内的全部实体标注。\n\n```\nGET \u002Fpublications\u002Fexport\u002Fbiocjson?pmids=12345,67890&full=false\n```\n解析 BioC-JSON `documents[].passages[].annotations[]`。\n\n### 3.4 `entity_normalize(free_text, concept=None)`\n自由文本 → 标准实体 ID。\n\n```\nGET \u002Fentity\u002Fautocomplete\u002F?query=BTK%20inhibitor&concept=chemical\n```\n返回 `[{name, id, type, score}, ...]`,例如 `BTK inhibitor → MeSH:D000077180`。\n\n### 3.5 `find_co_mentions(entity1_id, entity2_id, top_n=20, recent_years=None)`\n共现分析 — 找两实体共同出现最多的文献,可按近 N 年过滤。\n内部组合 `search` + `annotate` 验证两实体确实在同一文献被标注。\n\n---\n\n## 4. 实体类型 Reference\n\n| 类型 (concept) | 标识体系 | 示例 ID | 说明 |\n|---|---|---|---|\n| `Gene` | NCBI Gene | `695` (BTK) | 蛋白编码基因 |\n| `Disease` | MeSH \u002F OMIM | `MESH:D055744` (Invasive Pulmonary Aspergillosis) | 疾病 \u002F 综合征 |\n| `Chemical` | MeSH \u002F DrugBank | `MESH:D000077594` (ibrutinib) | 化学品 \u002F 药物 |\n| `Variant` | dbSNP \u002F ClinVar \u002F tmVar | `rs113488022` | 多态位点 \u002F 变异 |\n| `Mutation` | tmVar | `p.V600E` | 蛋白\u002F核酸级具体突变 |\n| `Species` | NCBI Taxonomy | `9606` (Homo sapiens) | 物种 |\n| `CellLine` | Cellosaurus | `CVCL_0030` (HeLa) | 细胞系 |\n\n> Variant 与 Mutation 在 PubTator3 多被合并为 `Variant`;查询时统一用 `concept=variant`。\n\n---\n\n## 5. 关系类型 Reference\n\nPubTator3 关系标签(在 `\u002Frelations` 端点的 `type` 参数):\n\n| 关系 | 含义 | 典型主语 → 宾语 |\n|---|---|---|\n| `treat` \u002F `treats` | 治疗 | Chemical → Disease |\n| `cause` \u002F `causes` | 致病 \u002F 引发 | Chemical\u002FVariant → Disease |\n| `interact_with` | 相互作用 | Gene ↔ Gene \u002F Chemical ↔ Gene |\n| `associate` \u002F `associated_with` | 关联(弱因果) | Gene ↔ Disease \u002F Variant ↔ Disease |\n| `regulate` \u002F `regulates` | 调控(上下游) | Gene → Gene |\n| `inhibit` \u002F `inhibits` | 抑制 | Chemical → Gene\u002FProtein |\n| `co-occur` | 共现(无方向) | 任意 ↔ 任意 |\n\n> 当不确定关系语义时,优先使用 `co-occur` 做共现挖掘,再人工\u002F二次核对方向。\n\n---\n\n## 6. 输出格式(标准 schema)\n\n每条标注统一输出:\n\n```python\n{\n    \"pmid\": \"12345\",\n    \"entity_text\": \"BTK\",\n    \"entity_type\": \"Gene\",\n    \"identifier\": \"695\",            # NCBI Gene ID \u002F MeSH \u002F dbSNP \u002F ...\n    \"section\": \"Title\",             # Title \u002F Abstract\n    \"offset\": 23,                   # 字符级起点(passage 内)\n    \"length\": 3,\n    \"confidence\": 0.95,             # PubTator3 置信度(若 API 返回)\n}\n```\n\n关系输出:\n\n```python\n{\n    \"pmid\": \"12345\",\n    \"subject\": {\"text\": \"ibrutinib\", \"type\": \"Chemical\", \"id\": \"MESH:D000077594\"},\n    \"predicate\": \"inhibits\",\n    \"object\":  {\"text\": \"BTK\",       \"type\": \"Gene\",     \"id\": \"695\"},\n    \"evidence_sentence\": \"Ibrutinib irreversibly inhibits BTK ...\",\n    \"section\": \"Abstract\",\n}\n```\n\n---\n\n## 7. 典型工作流\n\n### 用例 A:疾病 + 药物联动\n> \"找近 5 年讨论 BTK 抑制剂与侵袭性肺曲霉病关系的文献\"\n\n1. `entity_normalize(\"BTK inhibitor\", \"chemical\")` → `MESH:D000077180`\n2. `entity_normalize(\"invasive pulmonary aspergillosis\", \"disease\")` → `MESH:D055744`\n3. `find_co_mentions(e1, e2, top_n=30, recent_years=5)`\n4. 对返回 PMID 用 `annotate_pmid()` 提取上下文实体 → 输出三元组表\n\n### 用例 B:批量标注\n> \"把这 20 个 PMID 里所有疾病\u002F药物\u002F基因列出来\"\n\n1. `annotate_pmid([...20 PMIDs...])`\n2. 按 `entity_type ∈ {Gene, Disease, Chemical}` 过滤 → 去重计数 → 输出频次表\n\n### 用例 C:实体规范化\n> \"ibrutinib 的 MeSH 是什么?DrugBank 呢?\"\n\n1. `entity_normalize(\"ibrutinib\", \"chemical\")`\n2. 取首条 hit 的 `id` 字段(MeSH);若需 DrugBank 走 cross-ref(PubTator3 主返回 MeSH)\n\n---\n\n## 8. 实现要点\n\n- 使用 `requests` + `tenacity` 做指数退避(429 \u002F 5xx)\n- `concept` 参数小写:`gene | disease | chemical | variant | species | cellline`\n- BioC-JSON 路径:`documents[*].passages[*].annotations[*].infons.{type,identifier}` + `text` + `locations[0].offset\u002Flength`\n- 一次 `annotate_pmid` 上限 100 PMID(超过自动分批)\n- 自由文本 + 实体混合查询语法:`text=ibrutinib AND @DISEASE_MESH:D055744`\n\n---\n\n## 9. 错误处理\n\n| 错误 | 处理 |\n|---|---|\n| 429 Too Many Requests | 退避 2s → 4s → 8s,最多 5 次 |\n| 5xx | 同上退避 |\n| 实体规范化无 hit | 返回空列表 + 建议:换同义词 \u002F 改 concept |\n| BioC-JSON 缺 annotations | 该 PMID 暂未被 PubTator 标注,跳过并记录 |\n| PMID 不存在 | 在响应中按 PMID 标 `status=not_found` |\n\n不要静默吞错;每个失败请求记录 `{pmid, endpoint, status_code, message}`。\n\n---\n\n## 10. 安全 \u002F 合规\n\n- 公共 NLM API,无 PHI\n- 不要把用户上传的非公开文本发给 PubTator3 — 仅检索公开 PMID\n- 输出注明 \"Source: NLM PubTator3, retrieved \u003Cdate>\"\n- PubTator3 标注属机器抽取,**置信度 \u003C 0.8 的关系应人工核对**\n\n---\n\n## 11. 与其他 skill 的协同\n\n| 用户问题 | 路由 |\n|---|---|\n| \"哪些研究讨论 X 与 Y 的关系\" \u002F \"实体级关联\" | **本技能** |\n| \"近 5 年所有 X 的 RCT\" \u002F \"MeSH + 出版类型筛选\" | `pubmed-eutils` + Clinical Queries |\n| \"PMID 12345 全文写了什么\" | `BioC-PubMed\u002FPMC` |\n| \"正在招募的 X 临床试验\" | `ct-v2` (ClinicalTrials.gov) |\n| \"Europe PMC 综合检索 + 引文\" | `europepmc-search` |\n\n本技能输出的 PMID 集合可直接喂给 `pubmed-eutils` \u002F `BioC` 做下游展开。\n\n---\n\n## 12. 快速 cheatsheet\n\n```text\n# 1) 文本 → 实体 ID\nGET \u002Fentity\u002Fautocomplete\u002F?query=ibrutinib&concept=chemical\n\n# 2) 实体检索文献\nGET \u002Fsearch\u002F?text=@CHEMICAL_MESH:D000077594\n\n# 3) 关系挖掘\nGET \u002Frelations?e1=MESH:D000077594&e2=695&type=inhibits\n\n# 4) PMID 批量标注\nGET \u002Fpublications\u002Fexport\u002Fbiocjson?pmids=12345,67890\n\n# 5) 共现:先 search,各拿 PMID 集合 → 求交 → 按引用\u002F年份排序\n```\n\n实体类型缩写(查询前缀):`@GENE_`、`@DISEASE_MESH:`、`@CHEMICAL_MESH:`、`@VARIANT_`、`@SPECIES_`、`@CELLLINE_`。\n\n---\n\n**版本**: v1.0  ·  **维护**: 跟随 NLM PubTator3 API 文档更新(关注 endpoints 变更与新增 concept)。\n","# PubTator3 Entity & Relation Search\n\n封装 NLM PubTator3 RESTful API,用于在 PubMed 文献中做**实体级标注 + 关系挖掘**。\n聚焦\"疾病 - 药物 - 基因 - 化学品 - 突变 - 物种\"的联动检索,适合\"实体 X 与实体 Y 在文献中怎样被讨论\"这类问题。\n\n---\n\n## 1. 何时使用本技能\n\n**适合**:\n- \"哪些文献提到了 BTK 抑制剂用于侵袭性肺曲霉病\" — 实体 + 关系\n- \"基因 EGFR 在非小细胞肺癌中的相关研究\" — 共现 \u002F 关联\n- \"找出讨论 voriconazole 与 CYP2C19 相互作用的文献\" — 药物-基因\n- \"把这一组 PMID 里的疾病\u002F药物\u002F基因都标出来\" — 标注提取\n- \"ibrutinib 在文献中映射到哪个 MeSH\u002FDrugBank ID\" — 实体规范化\n\n**不适合(用其他技能)**:\n- 用 MeSH 树\u002F出版类型\u002FPubDate 做文献检索 → `pubmed-eutils` + Clinical Queries\n- 拿全文 XML\u002F段落 → `BioC` (BioC PubMed\u002FPMC)\n- 临床试验注册信息 → `ct-v2` (ClinicalTrials.gov)\n- 综合性自然语言检索 → `europepmc-search`\n\n---\n\n## 2. API 概览(无需 Key)\n\nBase URL: `https:\u002F\u002Fwww.ncbi.nlm.nih.gov\u002Fresearch\u002Fpubtator3-api\u002F`\n\nPubTator3 是 NLM 开放服务,**不需要 API key**,但请遵守速率限制(建议 ≤ 3 req\u002Fs,失败时退避)。\n\n核心端点:\n\n| 端点 | 用途 |\n|------|------|\n| `GET \u002Fsearch\u002F?text=\u003Cquery>` | 自由文本\u002F实体检索文献 |\n| `GET \u002Fpublications\u002Fexport\u002Fbiocjson?pmids=\u003Ccsv>` | 拉取 PMID 的实体标注 BioC-JSON |\n| `GET \u002Fentity\u002Fautocomplete\u002F?query=\u003Ctext>&concept=\u003Ctype>` | 实体规范化(text → ID) |\n| `GET \u002Frelations?e1=\u003Cid>&e2=\u003Cid>` | 关系\u002F共现挖掘 |\n\n文档: https:\u002F\u002Fwww.ncbi.nlm.nih.gov\u002Fresearch\u002Fpubtator3-api\u002F\n\n---\n\n## 3. 核心能力(5 个函数)\n\n### 3.1 `search_by_entity(entity_text, entity_type=None, max_results=50)`\n检索包含某实体的 PubMed 文献。\n\n```\nGET \u002Fsearch\u002F?text=@\u003CTYPE>_\u003CID> 或 ?text=\u003Cfree text>\n```\n示例:`text=@DISEASE_MESH:D055744` → 侵袭性曲霉病。\n返回 `{pmids:[...], score:[...]}`。\n\n### 3.2 `search_by_relation(entity1_id, relation_type, entity2_id)`\n检索表达\"实体1 — 关系 — 实体2\"的文献。\n\n```\nGET \u002Frelations?e1=\u003Cid1>&e2=\u003Cid2>&type=\u003Crelation>\n```\n返回涉及该关系的 PMID 列表 + 句级证据片段(若有)。\n\n### 3.3 `annotate_pmid(pmid_list)`\n给定 PMID 数组,返回标题 + 摘要内的全部实体标注。\n\n```\nGET \u002Fpublications\u002Fexport\u002Fbiocjson?pmids=12345,67890&full=false\n```\n解析 BioC-JSON `documents[].passages[].annotations[]`。\n\n### 3.4 `entity_normalize(free_text, concept=None)`\n自由文本 → 标准实体 ID。\n\n```\nGET \u002Fentity\u002Fautocomplete\u002F?query=BTK%20inhibitor&concept=chemical\n```\n返回 `[{name, id, type, score}, ...]`,例如 `BTK inhibitor → MeSH:D000077180`。\n\n### 3.5 `find_co_mentions(entity1_id, entity2_id, top_n=20, recent_years=None)`\n共现分析 — 找两实体共同出现最多的文献,可按近 N 年过滤。\n内部组合 `search` + `annotate` 验证两实体确实在同一文献被标注。\n\n---\n\n## 4. 实体类型 Reference\n\n| 类型 (concept) | 标识体系 | 示例 ID | 说明 |\n|---|---|---|---|\n| `Gene` | NCBI Gene | `695` (BTK) | 蛋白编码基因 |\n| `Disease` | MeSH \u002F OMIM | `MESH:D055744` (Invasive Pulmonary Aspergillosis) | 疾病 \u002F 综合征 |\n| `Chemical` | MeSH \u002F DrugBank | `MESH:D000077594` (ibrutinib) | 化学品 \u002F 药物 |\n| `Variant` | dbSNP \u002F ClinVar \u002F tmVar | `rs113488022` | 多态位点 \u002F 变异 |\n| `Mutation` | tmVar | `p.V600E` | 蛋白\u002F核酸级具体突变 |\n| `Species` | NCBI Taxonomy | `9606` (Homo sapiens) | 物种 |\n| `CellLine` | Cellosaurus | `CVCL_0030` (HeLa) | 细胞系 |\n\n> Variant 与 Mutation 在 PubTator3 多被合并为 `Variant`;查询时统一用 `concept=variant`。\n\n---\n\n## 5. 关系类型 Reference\n\nPubTator3 关系标签(在 `\u002Frelations` 端点的 `type` 参数):\n\n| 关系 | 含义 | 典型主语 → 宾语 |\n|---|---|---|\n| `treat` \u002F `treats` | 治疗 | Chemical → Disease |\n| `cause` \u002F `causes` | 致病 \u002F 引发 | Chemical\u002FVariant → Disease |\n| `interact_with` | 相互作用 | Gene ↔ Gene \u002F Chemical ↔ Gene |\n| `associate` \u002F `associated_with` | 关联(弱因果) | Gene ↔ Disease \u002F Variant ↔ Disease |\n| `regulate` \u002F `regulates` | 调控(上下游) | Gene → Gene |\n| `inhibit` \u002F `inhibits` | 抑制 | Chemical → Gene\u002FProtein |\n| `co-occur` | 共现(无方向) | 任意 ↔ 任意 |\n\n> 当不确定关系语义时,优先使用 `co-occur` 做共现挖掘,再人工\u002F二次核对方向。\n\n---\n\n## 6. 输出格式(标准 schema)\n\n每条标注统一输出:\n\n```python\n{\n    \"pmid\": \"12345\",\n    \"entity_text\": \"BTK\",\n    \"entity_type\": \"Gene\",\n    \"identifier\": \"695\",            # NCBI Gene ID \u002F MeSH \u002F dbSNP \u002F ...\n    \"section\": \"Title\",             # Title \u002F Abstract\n    \"offset\": 23,                   # 字符级起点(passage 内)\n    \"length\": 3,\n    \"confidence\": 0.95,             # PubTator3 置信度(若 API 返回)\n}\n```\n\n关系输出:\n\n```python\n{\n    \"pmid\": \"12345\",\n    \"subject\": {\"text\": \"ibrutinib\", \"type\": \"Chemical\", \"id\": \"MESH:D000077594\"},\n    \"predicate\": \"inhibits\",\n    \"object\":  {\"text\": \"BTK\",       \"type\": \"Gene\",     \"id\": \"695\"},\n    \"evidence_sentence\": \"Ibrutinib irreversibly inhibits BTK ...\",\n    \"section\": \"Abstract\",\n}\n```\n\n---\n\n## 7. 典型工作流\n\n### 用例 A:疾病 + 药物联动\n> \"找近 5 年讨论 BTK 抑制剂与侵袭性肺曲霉病关系的文献\"\n\n1. `entity_normalize(\"BTK inhibitor\", \"chemical\")` → `MESH:D000077180`\n2. `entity_normalize(\"invasive pulmonary aspergillosis\", \"disease\")` → `MESH:D055744`\n3. `find_co_mentions(e1, e2, top_n=30, recent_years=5)`\n4. 对返回 PMID 用 `annotate_pmid()` 提取上下文实体 → 输出三元组表\n\n### 用例 B:批量标注\n> \"把这 20 个 PMID 里所有疾病\u002F药物\u002F基因列出来\"\n\n1. `annotate_pmid([...20 PMIDs...])`\n2. 按 `entity_type ∈ {Gene, Disease, Chemical}` 过滤 → 去重计数 → 输出频次表\n\n### 用例 C:实体规范化\n> \"ibrutinib 的 MeSH 是什么?DrugBank 呢?\"\n\n1. `entity_normalize(\"ibrutinib\", \"chemical\")`\n2. 取首条 hit 的 `id` 字段(MeSH);若需 DrugBank 走 cross-ref(PubTator3 主返回 MeSH)\n\n---\n\n## 8. 实现要点\n\n- 使用 `requests` + `tenacity` 做指数退避(429 \u002F 5xx)\n- `concept` 参数小写:`gene | disease | chemical | variant | species | cellline`\n- BioC-JSON 路径:`documents[*].passages[*].annotations[*].infons.{type,identifier}` + `text` + `locations[0].offset\u002Flength`\n- 一次 `annotate_pmid` 上限 100 PMID(超过自动分批)\n- 自由文本 + 实体混合查询语法:`text=ibrutinib AND @DISEASE_MESH:D055744`\n\n---\n\n## 9. 错误处理\n\n| 错误 | 处理 |\n|---|---|\n| 429 Too Many Requests | 退避 2s → 4s → 8s,最多 5 次 |\n| 5xx | 同上退避 |\n| 实体规范化无 hit | 返回空列表 + 建议:换同义词 \u002F 改 concept |\n| BioC-JSON 缺 annotations | 该 PMID 暂未被 PubTator 标注,跳过并记录 |\n| PMID 不存在 | 在响应中按 PMID 标 `status=not_found` |\n\n不要静默吞错;每个失败请求记录 `{pmid, endpoint, status_code, message}`。\n\n---\n\n## 10. 安全 \u002F 合规\n\n- 公共 NLM API,无 PHI\n- 不要把用户上传的非公开文本发给 PubTator3 — 仅检索公开 PMID\n- 输出注明 \"Source: NLM PubTator3, retrieved \u003Cdate>\"\n- PubTator3 标注属机器抽取,**置信度 \u003C 0.8 的关系应人工核对**\n\n---\n\n## 11. 与其他 skill 的协同\n\n| 用户问题 | 路由 |\n|---|---|\n| \"哪些研究讨论 X 与 Y 的关系\" \u002F \"实体级关联\" | **本技能** |\n| \"近 5 年所有 X 的 RCT\" \u002F \"MeSH + 出版类型筛选\" | `pubmed-eutils` + Clinical Queries |\n| \"PMID 12345 全文写了什么\" | `BioC-PubMed\u002FPMC` |\n| \"正在招募的 X 临床试验\" | `ct-v2` (ClinicalTrials.gov) |\n| \"Europe PMC 综合检索 + 引文\" | `europepmc-search` |\n\n本技能输出的 PMID 集合可直接喂给 `pubmed-eutils` \u002F `BioC` 做下游展开。\n\n---\n\n## 12. 快速 cheatsheet\n\n```text\n# 1) 文本 → 实体 ID\nGET \u002Fentity\u002Fautocomplete\u002F?query=ibrutinib&concept=chemical\n\n# 2) 实体检索文献\nGET \u002Fsearch\u002F?text=@CHEMICAL_MESH:D000077594\n\n# 3) 关系挖掘\nGET \u002Frelations?e1=MESH:D000077594&e2=695&type=inhibits\n\n# 4) PMID 批量标注\nGET \u002Fpublications\u002Fexport\u002Fbiocjson?pmids=12345,67890\n\n# 5) 共现:先 search,各拿 PMID 集合 → 求交 → 按引用\u002F年份排序\n```\n\n实体类型缩写(查询前缀):`@GENE_`、`@DISEASE_MESH:`、`@CHEMICAL_MESH:`、`@VARIANT_`、`@SPECIES_`、`@CELLLINE_`。\n\n---\n\n**版本**: v1.0  ·  **维护**: 跟随 NLM PubTator3 API 文档更新(关注 endpoints 变更与新增 concept)。\n",{"name":5,"license":15,"keywords":44,"description":7},[34,32,33,45,25,31,29,30,27,28,38,26,23],"NER","mine","1e7390741dffd3d5041fca4ebc056071ee3ba137","archives\u002Fuser-installed-skills\u002Fpubtator-entity-search\u002F36ed1a3ea059827e\u002Fpubtator-entity-search",5,"https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub","https:\u002F\u002Fgithub.com\u002FEthanYoQ","www.orz.md","Part Marketer, Part AI Explorer.","2026-11-07 14:52:29",{"source":8,"skillName":5,"commands":56,"prompt":66,"zipAvailable":67},[57,60,63],{"tool":58,"command":59},"npx","npx skills add EthanYoQ\u002FSkill-hub --skill pubtator-entity-search",{"tool":61,"command":62},"bunx","bunx skills add EthanYoQ\u002FSkill-hub --skill pubtator-entity-search",{"tool":64,"command":65},"pnpm","pnpm dlx skills add EthanYoQ\u002FSkill-hub --skill pubtator-entity-search","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Farchives\u002Fuser-installed-skills\u002Fpubtator-entity-search\u002F36ed1a3ea059827e\u002Fpubtator-entity-search\u002FSKILL.md",true,[],[70,97,122,145,162,176],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":39},"01M713CBDSYARG4PXFXK2R2NNN","xhs-pharma-social-listening","Run evidence-disciplined Xiaohongshu social listening for foreign pharma employee pain points. Use when the user asks to collect and analyze notes\u002Fcomments about pharma companies, aliases, roles, compliance, medical affairs, or AI topics, then produce a cited and scored sampled-insight report. Includes independent-evidence counting, MediaCrawler batch collection, and CAPTCHA\u002F461 fallback to Agent Reach\u002FOpenCLI.","https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Fskills\u002F10-business-industry\u002Fxhs-pharma-social-listening\u002FSKILL.md",[],[77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96],"social","xhs pharma social listening","social listening","xhs","medical","counting","when","collection","batch","analyze","notes","run","opencli","fallback","captcha","agent reach","evidence","for","collect","produce",{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":39},"01M713C8Q76ZP0WXXBRAFKS6EE","healthcare-phi-compliance","Protected Health Information (PHI) and Personally Identifiable Information (PII) compliance patterns for healthcare applications. Covers data classification, access control, audit trails, encryption, and common leak vectors. Use when code touches PHI or PII in a healthcare system, or when auditing access control, audit trails, or leak vectors.","https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Fskills\u002F10-business-industry\u002Fhealthcare-phi-compliance\u002FSKILL.md",[],[104,105,106,107,108,109,110,111,83,112,113,114,115,116,117,118,94,119,120,121],"healthcare","phi","compliance","healthcare phi compliance","pii","compliance patterns","information","access","encryption","code","common","audit","data","patterns","Access Control","system","applications","Auditing Access Control",{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":39},"01M713C5R2GE43X45T2K75TB76","healthcare-eval-harness","Patient safety evaluation harness for healthcare application deployments. Automated test suites for CDSS accuracy, PHI exposure, clinical workflow integrity, and integration compliance. Blocks deployments on safety failures. Use when a healthcare deployment must be gated on patient-safety tests for CDSS accuracy, PHI exposure, and workflow integrity.","https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Fskills\u002F10-business-industry\u002Fhealthcare-eval-harness\u002FSKILL.md",[],[104,129,130,131,132,133,134,83,135,136,137,138,105,94,139,140,141,142,143,144],"eval","harness","healthcare eval harness","eval harness","clinical","patient","workflow","Evaluation","Safety","integrity","deployment","accuracy","tests","deployments","use","super",{"skillNo":146,"name":147,"nameZh":6,"description":148,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":149,"categories":150,"keywords":151,"publishedAt":39},"01M713C2J17S91VYR7A8M696VR","healthcare-emr-patterns","EMR\u002FEHR development patterns for healthcare applications. Clinical safety, encounter workflows, prescription generation, clinical decision support integration, and accessibility-first UI for medical data entry. Use when building EMR or EHR features such as encounter workflows, prescription generation, or clinical data entry UI.","https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Fskills\u002F10-business-industry\u002Fhealthcare-emr-patterns\u002FSKILL.md",[],[104,152,117,153,154,81,133,155,83,156,157,158,137,116,159,160,161,94,120,143],"EMR","healthcare emr patterns","decision","workflows","support","clinical decision support","features","ui","as","development",{"skillNo":163,"name":164,"nameZh":6,"description":165,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":166,"categories":167,"keywords":168,"publishedAt":39},"01M713BZERTXV0N8X6SW9DDVWZ","healthcare-cdss-patterns","Clinical Decision Support System (CDSS) development patterns. Drug interaction checking, dose validation, clinical scoring (NEWS2, qSOFA), alert severity classification, and integration into EMR workflows. Use when building clinical decision support — drug interaction checks, dose validation, clinical scoring, or alert severity.","https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Fskills\u002F10-business-industry\u002Fhealthcare-cdss-patterns\u002FSKILL.md",[],[104,117,169,154,133,152,155,83,170,171,156,157,172,161,119,173,143,174,144,175],"healthcare cdss patterns","scoring","interaction","severity","classification","alert","decision support",{"skillNo":177,"name":178,"nameZh":6,"description":179,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":180,"categories":181,"keywords":182,"publishedAt":39},"01M713BVK3PQR7V4ZKYGMWMXJD","dxy-task-clarify","用户的请求含糊、缺背景、缺资料说明、缺读者或用途时使用。先用少量带选项的追问把任务问清楚，写成任务卡，用户确认后再执行。尤其适用于医生、科研人员和药企各岗位的工作，例如「帮我分析一下这些数据」「帮我准备明天的拜访」「写个总结」「做个 PPT」「回一下这封邮件」「整理一下会议纪要」「整理一下这些文献」「帮我准备下周的讲课」「写个病例汇报」「帮我写个提示词」。用户说「先问我」「帮我理清需求」「我不知道怎么描述」「我不会问 AI」时也使用。用途、资料、读者都已说清的请求，纯翻译，以及写代码、改代码，不使用。","https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Fskills\u002F10-business-industry\u002Fdxy-task-clarify\u002FSKILL.md",[],[183,184,185,186,187,188,189,190],"clarify","dxy task clarify","task","pptx","整理","翻译","数据","总结"]