mining-pubmed-literature
Skill này làm gì
Skill này tìm nghiên cứu y khoa về một chủ đề trên PubMed và PubMed Central, rồi tải về tóm tắt hoặc toàn văn. Dành cho nhà nghiên cứu cần trích dẫn, tóm tắt hoặc một kho bài báo.
Khi nào nên dùng
- ✓Khi bạn muốn trích dẫn hoặc tóm tắt về một bệnh, thuốc hoặc gen.
- ✓Khi bạn cần một kho bài báo y sinh để trích xuất thực thể.
- ✓Khi bạn muốn một tìm kiếm tài liệu có thể tái lập dựa trên MeSH với giới hạn ngày.
Liên kết skill
https://github.com/maziyarpanahi/openmed/blob/master/skills/mining-pubmed-literature/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tìm các tóm tắt PubMed gần đây về metformin và suy tim, và cho tôi các trích dẫn.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent chạy tìm kiếm trên dịch vụ NCBI công khai để lấy các ID bài báo, rồi tải bản ghi theo lô cho các ID đó, tuân theo giới hạn tốc độ của dịch vụ.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Mining PubMed & PMC literature (NCBI E-utilities)
Search PubMed (citations/abstracts) and PMC (full text) programmatically
with NCBI E-utilities — the stable HTTP interface to Entrez. The core pattern
is two steps: ESearch returns matching record IDs (PMIDs), then EFetch (or
ESummary) downloads the records. The Entrez History server (usehistory=y)
lets you chain the two without re-sending thousands of IDs.
E-utilities are public. No key is required, but a free API key raises your limit from 3 to 10 requests/second and is strongly recommended for batch work.
When to use
- OpenMed extracted a diagnosis, drug, or gene and you want supporting literature.
- You need abstracts to summarize or to assemble a corpus for biomedical NER.
- You want MeSH-anchored, reproducible searches (date ranges, article types).
For ClinicalTrials.gov use searching-clinicaltrials; this skill is for the
published literature.
Quick start (real E-utilities calls)
Base URL: https://eutils.ncbi.nlm.nih.gov/entrez/eutils/. JSON for ESearch/
ESummary via retmode=json; EFetch returns text or XML (no JSON for PubMed).
import requests, time
BASE = "https://eutils.ncbi.nlm.nih.gov/entrez/eutils"
API_KEY = None # set to your free NCBI key to get 10 req/s instead of 3
def _params(**kw):
if API_KEY:
kw["api_key"] = API_KEY
return kw
def esearch(term: str, retmax: int = 50) -> dict:
"""Find PMIDs; usehistory=y stores them on the Entrez History server."""
r = requests.get(f"{BASE}/esearch.fcgi", params=_params(
db="pubmed", term=term, retmax=retmax,
usehistory="y", retmode="json"), timeout=30)
r.raise_for_status()
res = r.json()["esearchresult"]
return {"count": int(res["count"]), "ids": res["idlist"],
"webenv": res["webenv"], "query_key": res["querykey"]}
def efetch_abstracts(webenv: str, query_key: str, retmax: int = 50) -> str:
"""Pull abstracts by reference to the stored result set (no ID list needed)."""
r = requests.get(f"{BASE}/efetch.fcgi", params=_params(
db="pubmed", WebEnv=webenv, query_key=query_key,
retmax=retmax, rettype="abstract", retmode="text"), timeout=60)
r.raise_for_status()
return r.text
hits = esearch('("type 2 diabetes"[MeSH]) AND metformin AND 2023:2025[pdat]')
print(hits["count"], "papers")
abstracts = efetch_abstracts(hits["webenv"], hits["query_key"])
Equivalent cURL (search then fetch one PMID's abstract):
curl "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term=metformin&retmode=json"
curl "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=pubmed&id=38000000&rettype=abstract&retmode=text"
ESummary for structured metadata
When you need titles/authors/journal/date as JSON (not the full abstract), use ESummary — it returns one record per ID:
def esummary(ids: list[str]) -> dict:
r = requests.get(f"{BASE}/esummary.fcgi", params=_params(
db="pubmed", id=",".join(ids), retmode="json"), timeout=30)
r.raise_for_status()
return r.json()["result"] # keyed by PMID: title, pubdate, source, authors…
For PMC full text, repeat with db=pmc and EFetch rettype=""/retmode=xml
(JATS XML). Respect each article's license before redistributing full text.
Workflow
- Build the query. Combine OpenMed-extracted terms with MeSH tags and field
filters:
"<disease>"[MeSH] AND <drug>[tiab] AND 2020:2025[pdat]. Use[tiab](title/abstract),[au](author),[pdat](publication date). - ESearch with
usehistory=yto captureWebEnv+query_keyand the count. - Batch-fetch with EFetch/ESummary in pages of ≤ ~200 IDs (or by history), sleeping to stay under your rate limit.
- Parse abstracts/metadata; store PMID, title, journal, date, abstract text.
- NER the abstracts with
openmed.analyze_textto extract diseases, drugs, genes, and oncology entities for downstream synthesis.
Hand-off to / from OpenMed
- OpenMed facts → query.
openmed.analyze_text(note)yields Disease, Pharmaceutical, Genomics, and Oncology entities. Turn the top spans into the ESearchterm(optionally grounded: ICD-10 label, RxNorm ingredient, gene symbol) to retrieve targeted evidence. - Abstracts → OpenMed. Feed fetched abstracts straight into
openmed.analyze_text(abstract, model_name="disease_detection_superclinical")(or a Genomics/Oncology mod
Câu hỏi thường gặp
Nó có cần khóa API không?
Không. Khóa miễn phí là tùy chọn, và nó tăng tốc độ yêu cầu cho công việc lô lớn.
Đây có dành cho thử nghiệm lâm sàng không?
Không. Các thử nghiệm lâm sàng đã đăng ký do một skill tìm thử nghiệm riêng đảm nhận.
Nó có tìm theo thuật ngữ MeSH không?
Có. Skill hỗ trợ tìm kiếm neo theo MeSH và khoảng thời gian.
Chi tiết
Mô tả gốc của tác giả
Searches and fetches PubMed and PMC via NCBI E-utilities (ESearch then EFetch/ESummary) to gather biomedical evidence and build text corpora. Use when the user wants citations for a condition or drug, abstracts to summarize, MeSH-based searches, or a corpus of literature to run NER over. Trigger keywords: PubMed, PMC, NCBI, E-utilities, ESearch, EFetch, ESummary, MeSH, PMID, literature search, abstracts, evidence. Pairs adjacent to OpenMed: fetched abstracts feed openmed.analyze_text for biomedical NER, and OpenMed-extracted diagnoses/drugs/genes become the search terms. E-utilities are public
repo: maziyarpanahi/openmed
Độ phổ biến
- Sao GitHub
- 5.8k
- Vị trí xếp hạng
- #14713
- Giấy phép
- Apache-2.0
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
annotating-variants
5.8kGiúp agent dự đoán tác động của biến thể di truyền, đổi tên HGVS sang vị trí bộ gen và gắn tần suất quần thể bằng công cụ chú giải miễn phí.
ask-openmed
5.8kGiúp agent chọn đúng quy trình OpenMed cho yêu cầu về văn bản lâm sàng, luôn kiểm tra quyền riêng tư trước khi có thể có dữ liệu bệnh nhân.
assembling-fhir-bundles
5.8kGói nhiều bản ghi y tế FHIR thành một Bundle giao dịch để gửi tới EHR, với các tham chiếu nội bộ được liên kết đúng.
auditing-deid-leakage
5.8kQuét văn bản lâm sàng đã khử nhận dạng để tìm định danh còn sót như SSN, số thẻ, email và ngày tháng, và chặn phát hành nếu còn sót.
Skill tương tự
graincrawl
394kCho phép agent của bạn tìm trong ghi chú cuộc họp và bản chép lời Granola đã lưu, kiểm tra độ mới và đếm số cuộc họp trong một khoảng thời gian.
notcrawl
394kCho phép agent của bạn tìm trong bản sao đã lưu của workspace Notion, tra cứu trang và database, rồi xuất trang ra file Markdown.
knowledge-entities
394kGiúp agent của bạn xác định người, công ty và dự án, rồi viết trang hồ sơ có nguồn cho họ trong kho Knowledge của bạn.