Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

fetch-pubmed-recent

БесплатноБез исполняемых скриптовНе проверен

Fetches PubMed articles posted in a given date window matching a keyword set, returning normalized records (PMID, title, authors, abstract, journal, date…

lyndonklот lyndonkl★ 208 звёзд на GitHub

Об этом скилле

fetch-pubmed-recent

Fetch PubMed records for a date window + keyword set. Normalize the output to the same shape as fetch-preprint-recent so a calling agent can dedupe across sources.

Return contract and cache ownership

Follow the shared literature handoff contract. Return one source envelope with server, records, existing counts, status (complete, partial, or failed), warnings, and fetch_errors. Diagnostics are objects with code, message, and optional record_id/cursor; keep them inside the JSON. A complete retrieval with zero matches is distinct from a failed or capped retrieval. Source records retain server; the search worker maps it to source in the combined result.

Keep absent/blank abstracts as null, match against the title when necessary, and add missing_abstract; do not fabricate text or discard a title match. A failed abstract request additionally makes coverage partial. This skill does not independently cache anything. Only a file-capable caller with actual raw responses and an assigned cache location may persist them; a search-only worker returns records and diagnostics without writes.

Workflow

- [ ] Step 1: Detect transport — prefer PubMed MCP if available, else E-utilities via WebFetch
- [ ] Step 2: Build the keyword query with explicit date bounds
- [ ] Step 3: Execute search → list of PMIDs (page if > 100)
- [ ] Step 4: Fetch metadata + abstracts for each PMID batch
- [ ] Step 5: Normalize records to canonical shape
- [ ] Step 6: Return matched records + summary

Step 1 — Detect transport

At session start the runtime exposes any connected MCP servers. Check whether tools matching mcp__*PubMed*__search_articles and mcp__*PubMed*__get_article_metadata are available.

  • MCP available: use it. The MCP wraps the same E-utilities but handles pagination and field extraction. Pass the keyword query as the search string with the date filter appended (see Step 2).
  • MCP not available: fall back to direct E-utilities calls via WebFetch. Endpoints:
    • Search: https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term={query}&retmode=json&retmax=200
    • Summary: https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=pubmed&id={pmids_csv}&retmode=json
    • Abstract: https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=pubmed&id={pmids_csv}&rettype=abstract&retmode=xml

Both transports return the same downstream shape. The skill caller should not need to care which was used (record transport_used in the return summary so debugging is possible).

Step 2 — Build the date-bounded query

PubMed accepts boolean keyword expressions plus a date filter. The canonical date filter for "papers indexed in PubMed during this window" is:

("YYYY/MM/DD"[PDAT] : "YYYY/MM/DD"[PDAT])

PDAT is the publication date — the most stable choice for a weekly digest. (EDAT is the entry-into-PubMed date, useful if you want "newly indexed even if old"; MHDA is the MeSH-indexed date. Default PDAT.)

For each watchlist keyword, expand into a sub-query:

  • Plain term: "protein language model"[Title/Abstract]
  • Term + MeSH: ("Alzheimer Disease"[MeSH] OR "alzheimer's disease"[Title/Abstract]) — only when the keyword has a clean MeSH match the caller has confirmed; do not auto-MeSH-expand or you'll widen the net unpredictably.

Combine sub-queries with OR, then AND the date filter:

(("term1"[Title/Abstract]) OR ("term2"[Title/Abstract]) OR ...) AND ("2026/05/04"[PDAT] : "2026/05/10"[PDAT])

Watch out for special characters — escape () inside terms by quoting the term.

Step 3 — Execute search

Call the search tool. Expected output is a list of PMIDs and a count.

If count > 200, page: rerun the search with retstart=200, retstart=400, etc. Cap at 1,000 PMIDs (5 pages). If a 7-day window matches more than 1,000 records, the keyword set is too broad — surface this and ask the calling agent to tighten.

Step 4 — Fetch metadata + abstracts

Batch the PMIDs (200 per esummary call). Pull:

  • PMID
  • Title
  • Authors (full list — keep in order; et al. truncation is the digest's job, not this skill's)
  • Journal name (fulljournalname)
  • Publication date (pubdate, sortpubdate)
  • DOI (articleids[].idtype == 'doi')
  • Abstract (separate efetch call with rettype=abstract since esummary doesn't return abstracts)

Abstract fetch is the slow part. Batch 100 PMIDs at a time. If abstract fetch fails for a record, keep it but with abstract: null and a missing_abstract warning; record the failed request in fetch_errors and set status: partial.

Step 5 — Normalize

Same canonical shape as fetch-preprint-recent:

{
  "id": "PMID:39123456",                                  // PMID-prefixed for source clarity
  "title": "...",
  "authors": ["Smith J", "Doe A", ...],
  "abstract": "...",
  "date": "2026-05-07",
Полный SKILL.md на GitHub

Установить fetch-pubmed-recent в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл fetch-pubmed-recent?

Fetches PubMed articles posted in a given date window matching a keyword set, returning normalized records (PMID, title, authors, abstract, journal, date, DOI, URL). Uses NCBI E-utilities (`esearch` + `esummary` + `efetch`) via WebFetch for portability, but prefers a PubMed MCP server's `search_articles` + `get_article_metadata` tools when one is connected (faster, paginated, parsed). Builds date-bounded queries with optional MeSH expansion. Domain-neutral - usable for any PubMed scan, not just one project. Use when user mentions PubMed, NCBI, last-N-days PubMed, weekly PubMed scan, MeSH search, or when a literature-scan agent needs structured PubMed records.

Как установить скилл fetch-pubmed-recent?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл fetch-pubmed-recent запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить fetch-pubmed-recent с