mining-pubmed-literature
하는 일
이 스킬은 PubMed와 PubMed Central에서 주제에 관한 의학 연구를 검색한 다음, 초록이나 전문을 내려받습니다. 인용 문헌, 초록, 논문 모음이 필요한 연구자를 위한 스킬입니다.
사용하는 경우
- ✓질환, 약물, 유전자에 관한 인용 문헌이나 초록이 필요할 때.
- ✓개체 추출을 위해 생의학 논문 모음이 필요할 때.
- ✓날짜 제한이 있는 재현 가능한 MeSH 기반 문헌 검색을 원할 때.
스킬 링크
https://github.com/maziyarpanahi/openmed/blob/master/skills/mining-pubmed-literature/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“메트포르민과 심부전에 관한 최근 PubMed 초록을 찾아 인용 문헌을 알려 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 공개 NCBI 서비스에서 검색을 실행해 논문 ID를 얻은 다음, 서비스의 속도 제한을 지키며 그 ID의 기록을 배치로 내려받습니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
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
자주 묻는 질문
API 키가 필요한가요?
아니요. 무료 키는 선택 사항이며, 대량 일괄 작업에서 허용 요청 속도를 높여 줍니다.
임상시험을 위한 것인가요?
아니요. 등록된 임상시험은 별도의 시험 검색 스킬이 다룹니다.
MeSH 용어로 검색할 수 있나요?
네. MeSH 기반 검색과 날짜 범위를 지원합니다.
상세 정보
작성자의 원본 설명
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
인기도
- GitHub 스타
- 5.8k
- 순위
- #14713
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
annotating-variants
5.8k에이전트가 유전 변이의 효과를 예측하고, HGVS 이름을 게놈 위치로 바꾸고, 무료 공개 주석 도구를 사용해 인구 빈도를 붙이도록 돕습니다.
ask-openmed
5.8k에이전트가 임상 텍스트 요청에 맞는 OpenMed 워크플로를 고르도록 돕되, 환자 데이터가 있을 수 있으면 먼저 개인 정보 확인을 거치게 합니다.
assembling-fhir-bundles
5.8k여러 FHIR 건강 기록을 EHR로 보낼 수 있도록 하나의 트랜잭션 Bundle로 묶고, 내부 참조를 올바르게 연결하도록 에이전트를 돕습니다.
auditing-deid-leakage
5.8k비식별화된 임상 텍스트에 남은 SSN, 카드 번호, 이메일, 날짜 같은 식별자를 검사하고, 남은 것이 있으면 공개를 막도록 돕습니다.
비슷한 스킬
graincrawl
394k에이전트가 저장된 Granola 회의 메모와 기록을 검색하고, 최신 상태를 확인하며, 일정 기간 동안 개수를 세도록 돕습니다.
notcrawl
394k에이전트가 저장된 Notion 워크스페이스 사본을 검색하고, 페이지와 데이터베이스를 찾아보며, 페이지를 Markdown 파일로 내보내도록 돕습니다.
knowledge-entities
394k에이전트가 사람, 회사, 프로젝트가 무엇인지 식별한 뒤, Knowledge 볼트에 출처가 있는 프로필 페이지를 작성하도록 돕습니다.